; LLVM IR from PaddlePaddle/Paddle :: paddle/pir/src/core (region)

; 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.pir::PointerListIterator" = type { %"struct.std::_List_iterator" }
%"struct.std::_List_iterator" = type { ptr }
%"class.pir::PointerListConstIterator" = type { %"struct.std::_List_const_iterator" }
%"struct.std::_List_const_iterator" = type { ptr }
%"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] }
%"class.pir::Region" = type { ptr, %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<pir::Block *, std::allocator<pir::Block *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<pir::Block *, std::allocator<pir::Block *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [83 x i8], align 1
@_ZTIN6common7enforce13EnforceNotMetE = external dso_local constant { ptr, ptr, ptr }, align 8

declare i32 @__gxx_personality_v0(...)

; 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @_ZN3pir6Region5eraseENS_24PointerListConstIteratorINS_5BlockEEE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.pir::PointerListIterator", align 8
  %4 = alloca %"class.pir::PointerListConstIterator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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 %"struct.std::_List_iterator", align 8
  %20 = alloca %"struct.std::_List_const_iterator", align 8
  %21 = getelementptr inbounds %"class.pir::PointerListConstIterator", ptr %4, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %21, i32 0, i32 0
  store ptr %1, ptr %22, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %5, align 8
  br label %24

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %25 = call noundef ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %26 = call noundef ptr @_ZNK3pir5Block9GetParentEv(ptr noundef nonnull align 8 dereferenceable(120) %25)
  store ptr %26, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp eq ptr %27, %28
  %30 = zext i1 %29 to i8
  store i8 %30, ptr %8, align 1, !tbaa !9
  %31 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %32 = trunc i8 %31 to i1
  %33 = xor i1 %32, true
  %34 = zext i1 %33 to i64
  %35 = call i64 @llvm.expect.i64(i64 %34, i64 0)
  %36 = icmp ne i64 %35, 0
  br i1 %36, label %37, label %87

37:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #7
  call void @_ZN6common6errors15InvalidArgumentIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind writable sret(%"class.common::ErrorSummary") align 8 %9, ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  store i8 1, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %39 unwind label %49

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIPN3pir6RegionEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef @.str.2, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %40 unwind label %53

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIPN3pir6RegionEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef @.str.3, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %41 unwind label %57

41:                                               ; preds = %40
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA22_cA5_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 1 dereferenceable(22) @.str.2, ptr noundef nonnull align 1 dereferenceable(5) @.str.3, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %42 unwind label %61

42:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %43

43:                                               ; preds = %42
  store i1 true, ptr %18, align 1
  %44 = call ptr @__cxa_allocate_exception(i64 88) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #7
  %45 = invoke noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %46 unwind label %67

46:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %16, i32 noundef %45, ptr noundef %17)
          to label %47 unwind label %71

47:                                               ; preds = %46
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %44, ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef @.str.4, i32 noundef 43)
          to label %48 unwind label %75

48:                                               ; preds = %47
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %44, ptr @_ZTIN6common7enforce13EnforceNotMetE, ptr @_ZN6common7enforce13EnforceNotMetD2Ev) #8
          to label %108 unwind label %75

49:                                               ; preds = %37
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %12, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %13, align 4
  br label %86

53:                                               ; preds = %39
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %12, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %13, align 4
  br label %66

57:                                               ; preds = %40
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %12, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %13, align 4
  br label %65

61:                                               ; preds = %41
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %12, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %65

65:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %66

66:                                               ; preds = %65, %53
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %86

67:                                               ; preds = %43
  %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 %80

71:                                               ; preds = %46
  %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
  br label %79

75:                                               ; preds = %48, %47
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %12, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %13, align 4
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #7
  br label %79

79:                                               ; preds = %75, %71
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %80

80:                                               ; preds = %79, %67
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  %81 = load i1, ptr %18, align 1
  br i1 %81, label %82, label %83

82:                                               ; preds = %80
  call void @__cxa_free_exception(ptr %44) #7
  br label %83

83:                                               ; preds = %82, %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %86

84:                                               ; No predecessors!
  br label %85

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

86:                                               ; preds = %83, %66, %49
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %103

87:                                               ; preds = %85, %24
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %88

88:                                               ; preds = %87
  %89 = call noundef ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %90 = icmp eq ptr %89, null
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @_ZN3pir5BlockD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %89) #7
  call void @_ZdlPvm(ptr noundef %89, i64 noundef 120) #9
  br label %92

92:                                               ; preds = %91, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %93 = getelementptr inbounds %"class.pir::Region", ptr %23, i32 0, i32 1
  %94 = call ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEcvSt20_List_const_iteratorIPS1_EEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %95 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %20, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %20, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = call ptr @_ZNSt7__cxx114listIPN3pir5BlockESaIS3_EE5eraseESt20_List_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(24) %93, ptr %97) #7
  %99 = getelementptr inbounds %"struct.std::_List_iterator", ptr %19, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  call void @_ZN3pir19PointerListIteratorINS_5BlockEEC2ERKSt14_List_iteratorIPS1_E(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %100 = getelementptr inbounds %"class.pir::PointerListIterator", ptr %3, i32 0, i32 0
  %101 = getelementptr inbounds %"struct.std::_List_iterator", ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  ret ptr %102

103:                                              ; preds = %86
  %104 = load ptr, ptr %12, align 8
  %105 = load i32, ptr %13, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107

108:                                              ; preds = %48
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA22_cA5_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(22), ptr noundef nonnull align 1 dereferenceable(5), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #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)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6common7enforce13EnforceNotMetD2Ev(ptr noundef nonnull align 8 dereferenceable(81)) unnamed_addr #1 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 #4 align 2

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: nounwind
declare void @_ZN3pir5BlockD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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.pir::PointerListIterator" = type { %"struct.std::_List_iterator" }
%"struct.std::_List_iterator" = type { ptr }
%"class.pir::PointerListConstIterator" = type { %"struct.std::_List_const_iterator" }
%"struct.std::_List_const_iterator" = type { ptr }
%"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 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [83 x i8], align 1
@_ZTIN6common7enforce13EnforceNotMetE = external dso_local constant { ptr, ptr, ptr }, align 8

declare i32 @__gxx_personality_v0(...)

; 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @_ZN3pir6Region5eraseENS_24PointerListConstIteratorINS_5BlockEEE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.pir::PointerListIterator", align 8
  %4 = alloca %"class.pir::PointerListConstIterator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.common::ErrorSummary", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.common::ErrorSummary", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"struct.std::_List_iterator", align 8
  store ptr %1, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %14 = call noundef ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %15 = call noundef ptr @_ZNK3pir5Block9GetParentEv(ptr noundef nonnull align 8 dereferenceable(120) %14)
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store ptr %0, ptr %6, align 8, !tbaa !5
  %.not = icmp eq ptr %15, %0
  br i1 %.not, label %39, label %16, !prof !9

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  call void @_ZN6common6errors15InvalidArgumentIJPKcEEENS_12ErrorSummaryEDpT_(ptr dead_on_unwind nonnull writable sret(%"class.common::ErrorSummary") align 8 %7, ptr noundef nonnull @.str)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %17 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6common12ErrorSummary13error_messageB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIPN3pir6RegionEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull @.str.2, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %18 unwind label %25

18:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZN6common7enforce7details29BinaryCompareMessageConverterILb1EE7ConvertIPN3pir6RegionEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull @.str.3, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %19 unwind label %27

19:                                               ; preds = %18
  invoke void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA22_cA5_cS7_S7_EEES7_PKcDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 1 dereferenceable(22) @.str.2, ptr noundef nonnull align 1 dereferenceable(5) @.str.3, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %20 unwind label %29

20:                                               ; preds = %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  %21 = call ptr @__cxa_allocate_exception(i64 88) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #6
  %22 = call noundef i32 @_ZNK6common12ErrorSummary4codeEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  invoke void @_ZN6common12ErrorSummaryC2ENS_9ErrorCodeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %11, i32 noundef %22, ptr noundef nonnull %12)
          to label %23 unwind label %.thread

23:                                               ; preds = %20
  invoke void @_ZN6common7enforce13EnforceNotMetC2ERKNS_12ErrorSummaryEPKci(ptr noundef nonnull align 8 dereferenceable(81) %21, ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull @.str.4, i32 noundef 43)
          to label %24 unwind label %34

24:                                               ; preds = %23
  invoke void @__cxa_throw(ptr nonnull %21, ptr nonnull @_ZTIN6common7enforce13EnforceNotMetE, ptr nonnull @_ZN6common7enforce13EnforceNotMetD2Ev) #7
          to label %48 unwind label %34

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

27:                                               ; preds = %18
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %31

29:                                               ; preds = %19
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %31

31:                                               ; preds = %29, %27
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %32

32:                                               ; preds = %31, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %31 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %38

.thread:                                          ; preds = %20
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  br label %36

34:                                               ; preds = %23, %24
  %.04 = phi i1 [ false, %24 ], [ true, %23 ]
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  br i1 %.04, label %36, label %37

36:                                               ; preds = %.thread, %34
  %.pn1319 = phi { ptr, i32 } [ %33, %.thread ], [ %35, %34 ]
  call void @__cxa_free_exception(ptr %21) #6
  br label %37

37:                                               ; preds = %36, %34
  %.pn1318 = phi { ptr, i32 } [ %.pn1319, %36 ], [ %35, %34 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %38

38:                                               ; preds = %37, %32
  %.pn13.pn = phi { ptr, i32 } [ %.pn1318, %37 ], [ %.pn.pn, %32 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @_ZN6common12ErrorSummaryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, 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
  resume { ptr, i32 } %.pn13.pn

39:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %40 = call noundef ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %41 = icmp eq ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @_ZN3pir5BlockD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %40) #6
  call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef 120) #8
  br label %43

43:                                               ; preds = %42, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = call ptr @_ZNK3pir24PointerListConstIteratorINS_5BlockEEcvSt20_List_const_iteratorIPS1_EEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %46 = call ptr @_ZNSt7__cxx114listIPN3pir5BlockESaIS3_EE5eraseESt20_List_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr %45) #6
  store ptr %46, ptr %13, align 8
  call void @_ZN3pir19PointerListIteratorINS_5BlockEEC2ERKSt14_List_iteratorIPS1_E(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %47 = load ptr, ptr %3, align 8
  ret ptr %47

48:                                               ; preds = %24
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6paddle6string7SprintfIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA22_cA5_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(22), ptr noundef nonnull align 1 dereferenceable(5), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #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)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6common7enforce13EnforceNotMetD2Ev(ptr noundef nonnull align 8 dereferenceable(81)) unnamed_addr #1 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 #3 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: nounwind
declare void @_ZN3pir5BlockD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4

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

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

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }
attributes #8 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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