; LLVM IR from PaddlePaddle/Paddle :: paddle/phi/core/memory/allocation (memory_block)

; 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.common::ErrorSummary" = type { i32, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.paddle::memory::detail::MemoryBlock::Desc" = type { i64, i32, i64, i64, i64, ptr, ptr, i64 }

@.str.4 = external hidden unnamed_addr constant [103 x i8], align 1
@_ZTIN6common7enforce13EnforceNotMetE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 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

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

declare noundef ptr @_ZN6paddle6memory6detail13MetadataCache8LoadDescEPNS1_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) unnamed_addr #4 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

declare void @_ZN6paddle6memory6detail11MemoryBlock4Desc12UpdateGuardsEv(ptr noundef nonnull align 8 dereferenceable(64)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind noalias writable sret(%"class.common::ErrorSummary") align 8, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cS8_S7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6paddle6memory6detail11MemoryBlock10MarkAsFreeEPNS1_13MetadataCacheE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca %"class.common::ErrorSummary", align 8
  %10 = alloca i8, align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.common::ErrorSummary", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i1, align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca %"class.common::ErrorSummary", align 8
  %23 = alloca i8, align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.common::ErrorSummary", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call noundef ptr @_ZN6paddle6memory6detail13MetadataCache8LoadDescEPNS1_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(57) %31, ptr noundef %30)
  store ptr %32, ptr %5, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.paddle::memory::detail::MemoryBlock::Desc", ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !9
  store i32 %36, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  %37 = load i32, ptr %6, align 4, !tbaa !13
  %38 = load i32, ptr %7, align 4, !tbaa !13
  %39 = icmp ne i32 %37, %38
  %40 = zext i1 %39 to i8
  store i8 %40, ptr %8, align 1, !tbaa !14
  %41 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %42 = trunc i8 %41 to i1
  %43 = xor i1 %42, true
  %44 = zext i1 %43 to i64
  %45 = call i64 @llvm.expect.i64(i64 %44, i64 0)
  %46 = icmp ne i64 %45, 0
  br i1 %46, label %47, label %97

47:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #6
  call void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind writable sret(%"class.common::ErrorSummary") align 8 %9, ptr noundef @.str.11)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 1, ptr %10, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %48 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %49 unwind label %59

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %50 unwind label %63

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef @.str.8, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %51 unwind label %67

51:                                               ; preds = %50
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cS8_S7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef @.str.12, ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 1 dereferenceable(11) @.str.7, ptr noundef nonnull align 1 dereferenceable(11) @.str.8, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %52 unwind label %71

52:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %53

53:                                               ; preds = %52
  store i1 true, ptr %18, align 1
  %54 = call ptr @__cxa_allocate_exception(i64 88) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #6
  %55 = invoke noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %56 unwind label %77

56:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %16, i32 noundef %55, ptr noundef %17)
          to label %57 unwind label %81

57:                                               ; preds = %56
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %54, ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef @.str.4, i32 noundef 135)
          to label %58 unwind label %85

58:                                               ; preds = %57
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %54, ptr @_ZTIN6common7enforce13EnforceNotMetE, ptr @_ZN6common7enforce13EnforceNotMetD2Ev) #7
          to label %176 unwind label %85

59:                                               ; preds = %47
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %12, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %13, align 4
  br label %96

63:                                               ; preds = %49
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %12, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %13, align 4
  br label %76

67:                                               ; preds = %50
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %12, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %13, align 4
  br label %75

71:                                               ; preds = %51
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %12, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %76

76:                                               ; preds = %75, %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %96

77:                                               ; preds = %53
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %12, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %13, align 4
  br label %90

81:                                               ; preds = %56
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %12, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %13, align 4
  br label %89

85:                                               ; preds = %58, %57
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %12, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %13, align 4
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #6
  br label %89

89:                                               ; preds = %85, %81
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %90

90:                                               ; preds = %89, %77
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  %91 = load i1, ptr %18, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @__cxa_free_exception(ptr %54) #6
  br label %93

93:                                               ; preds = %92, %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %96

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #6
  br label %97

96:                                               ; preds = %93, %76, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %170

97:                                               ; preds = %95, %33
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.paddle::memory::detail::MemoryBlock::Desc", ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !9
  store i32 %103, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 3, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %104 = load i32, ptr %19, align 4, !tbaa !13
  %105 = load i32, ptr %20, align 4, !tbaa !13
  %106 = icmp ne i32 %104, %105
  %107 = zext i1 %106 to i8
  store i8 %107, ptr %21, align 1, !tbaa !14
  %108 = load i8, ptr %21, align 1, !tbaa !14, !range !16, !noundef !17
  %109 = trunc i8 %108 to i1
  %110 = xor i1 %109, true
  %111 = zext i1 %110 to i64
  %112 = call i64 @llvm.expect.i64(i64 %111, i64 0)
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %164

114:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #6
  call void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind writable sret(%"class.common::ErrorSummary") align 8 %22, ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i8 1, ptr %23, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  %115 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %116 unwind label %126

116:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %117 unwind label %130

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %26, ptr noundef @.str.14, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %118 unwind label %134

118:                                              ; preds = %117
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cA14_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef @.str.12, ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef nonnull align 1 dereferenceable(11) @.str.7, ptr noundef nonnull align 1 dereferenceable(14) @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %119 unwind label %138

119:                                              ; preds = %118
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  br label %120

120:                                              ; preds = %119
  store i1 true, ptr %29, align 1
  %121 = call ptr @__cxa_allocate_exception(i64 88) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %27) #6
  %122 = invoke noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %123 unwind label %144

123:                                              ; preds = %120
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %27, i32 noundef %122, ptr noundef %28)
          to label %124 unwind label %148

124:                                              ; preds = %123
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %121, ptr noundef nonnull align 8 dereferenceable(40) %27, ptr noundef @.str.4, i32 noundef 139)
          to label %125 unwind label %152

125:                                              ; preds = %124
  store i1 false, ptr %29, align 1
  invoke void @__cxa_throw(ptr %121, ptr @_ZTIN6common7enforce13EnforceNotMetE, ptr @_ZN6common7enforce13EnforceNotMetD2Ev) #7
          to label %176 unwind label %152

126:                                              ; preds = %114
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %12, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %13, align 4
  br label %163

130:                                              ; preds = %116
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %12, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %13, align 4
  br label %143

134:                                              ; preds = %117
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %12, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %13, align 4
  br label %142

138:                                              ; preds = %118
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %12, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #6
  br label %142

142:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  br label %143

143:                                              ; preds = %142, %130
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  br label %163

144:                                              ; preds = %120
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %12, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %13, align 4
  br label %157

148:                                              ; preds = %123
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %12, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %13, align 4
  br label %156

152:                                              ; preds = %125, %124
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %12, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %13, align 4
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %27) #6
  br label %156

156:                                              ; preds = %152, %148
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #6
  br label %157

157:                                              ; preds = %156, %144
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #6
  %158 = load i1, ptr %29, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @__cxa_free_exception(ptr %121) #6
  br label %160

160:                                              ; preds = %159, %157
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %163

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #6
  br label %164

163:                                              ; preds = %160, %143, %126
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %170

164:                                              ; preds = %162, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.paddle::memory::detail::MemoryBlock::Desc", ptr %167, i32 0, i32 1
  store i32 0, ptr %168, align 8, !tbaa !9
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6paddle6memory6detail11MemoryBlock4Desc12UpdateGuardsEv(ptr noundef nonnull align 8 dereferenceable(64) %169)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void

170:                                              ; preds = %163, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %12, align 8
  %173 = load i32, ptr %13, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175

176:                                              ; preds = %125, %58
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cA14_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 1 dereferenceable(14), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

!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, !12, i64 8}
!10 = !{!"_ZTSN6paddle6memory6detail11MemoryBlock4DescE", !11, i64 0, !12, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !6, i64 48, !11, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN6paddle6memory6detail11MemoryBlock4TypeE", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


; 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.common::ErrorSummary" = type { i32, %"class.std::__cxx11::basic_string" }
%"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] }

@.str.4 = external hidden unnamed_addr constant [103 x i8], align 1
@_ZTIN6common7enforce13EnforceNotMetE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 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

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

declare noundef ptr @_ZN6paddle6memory6detail13MetadataCache8LoadDescEPNS1_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @_ZN6paddle6memory6detail11MemoryBlock4Desc12UpdateGuardsEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind noalias writable sret(%"class.common::ErrorSummary") align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cS8_S7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6paddle6memory6detail11MemoryBlock10MarkAsFreeEPNS1_13MetadataCacheE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.common::ErrorSummary", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.common::ErrorSummary", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.common::ErrorSummary", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.common::ErrorSummary", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = tail call noundef ptr @_ZN6paddle6memory6detail13MetadataCache8LoadDescEPNS1_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(57) %1, ptr noundef nonnull %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !5
  store i32 %21, ptr %3, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !12
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %22, label %45, !prof !13

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind nonnull writable sret(%"class.common::ErrorSummary") align 8 %5, ptr noundef nonnull @.str.11)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %24 unwind label %31

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull @.str.8, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %25 unwind label %33

25:                                               ; preds = %24
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cS8_S7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull @.str.12, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 1 dereferenceable(11) @.str.7, ptr noundef nonnull align 1 dereferenceable(11) @.str.8, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %26 unwind label %35

26:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  %27 = call ptr @__cxa_allocate_exception(i64 88) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #5
  %28 = call noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %28, ptr noundef nonnull %10)
          to label %29 unwind label %.thread

29:                                               ; preds = %26
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %27, ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull @.str.4, i32 noundef 135)
          to label %30 unwind label %40

30:                                               ; preds = %29
  invoke void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTIN6common7enforce13EnforceNotMetE, ptr nonnull @_ZN6common7enforce13EnforceNotMetD2Ev) #6
          to label %71 unwind label %40

31:                                               ; preds = %22
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %38

33:                                               ; preds = %24
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %37

37:                                               ; preds = %35, %33
  %.pn30 = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %38

38:                                               ; preds = %37, %31
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %37 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %44

.thread:                                          ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  br label %42

40:                                               ; preds = %29, %30
  %.022 = phi i1 [ false, %30 ], [ true, %29 ]
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  br i1 %.022, label %42, label %43

42:                                               ; preds = %.thread, %40
  %.pn3340 = phi { ptr, i32 } [ %39, %.thread ], [ %41, %40 ]
  call void @__cxa_free_exception(ptr %27) #5
  br label %43

43:                                               ; preds = %42, %40
  %.pn3339 = phi { ptr, i32 } [ %.pn3340, %42 ], [ %41, %40 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %44

44:                                               ; preds = %43, %38
  %.pn33.pn = phi { ptr, i32 } [ %.pn3339, %43 ], [ %.pn30.pn, %38 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %70

45:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  store i32 %21, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 3, ptr %12, align 4, !tbaa !12
  %.not24 = icmp eq i32 %21, 3
  br i1 %.not24, label %46, label %69, !prof !13

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #5
  call void @_ZN6common6errors18PreconditionNotMetIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind nonnull writable sret(%"class.common::ErrorSummary") align 8 %13, ptr noundef nonnull @.str.13)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %13)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %48 unwind label %55

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #5
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIN6paddle6memory6detail11MemoryBlock4TypeEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull @.str.14, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %49 unwind label %57

49:                                               ; preds = %48
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cA14_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull @.str.12, ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 1 dereferenceable(11) @.str.7, ptr noundef nonnull align 1 dereferenceable(14) @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %50 unwind label %59

50:                                               ; preds = %49
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  %51 = call ptr @__cxa_allocate_exception(i64 88) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #5
  %52 = call noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %13)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %17, i32 noundef %52, ptr noundef nonnull %18)
          to label %53 unwind label %.thread41

53:                                               ; preds = %50
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %51, ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull @.str.4, i32 noundef 139)
          to label %54 unwind label %64

54:                                               ; preds = %53
  invoke void @__cxa_throw(ptr nonnull %51, ptr nonnull @_ZTIN6common7enforce13EnforceNotMetE, ptr nonnull @_ZN6common7enforce13EnforceNotMetD2Ev) #6
          to label %71 unwind label %64

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %62

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %62

62:                                               ; preds = %61, %55
  %.pn.pn = phi { ptr, i32 } [ %.pn, %61 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  br label %68

.thread41:                                        ; preds = %50
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #5
  br label %66

64:                                               ; preds = %53, %54
  %.0 = phi i1 [ false, %54 ], [ true, %53 ]
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #5
  br i1 %.0, label %66, label %67

66:                                               ; preds = %.thread41, %64
  %.pn2745 = phi { ptr, i32 } [ %63, %.thread41 ], [ %65, %64 ]
  call void @__cxa_free_exception(ptr %51) #5
  br label %67

67:                                               ; preds = %66, %64
  %.pn2744 = phi { ptr, i32 } [ %.pn2745, %66 ], [ %65, %64 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %68

68:                                               ; preds = %67, %62
  %.pn27.pn = phi { ptr, i32 } [ %.pn2744, %67 ], [ %.pn.pn, %62 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %70

69:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  store i32 0, ptr %20, align 8, !tbaa !5
  tail call void @_ZN6paddle6memory6detail11MemoryBlock4Desc12UpdateGuardsEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
  ret void

70:                                               ; preds = %68, %44
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %44 ], [ %.pn27.pn, %68 ]
  resume { ptr, i32 } %.pn33.pn.pn

71:                                               ; preds = %54, %30
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cA14_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(11), ptr noundef nonnull align 1 dereferenceable(14), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

!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, !10, i64 8}
!6 = !{!"_ZTSN6paddle6memory6detail11MemoryBlock4DescE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 48, !7, i64 56}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6paddle6memory6detail11MemoryBlock4TypeE", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!"branch_weights", !"expected", i32 1, i32 2000}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass