; LLVM IR from p4lang/p4c :: backends/tofino/bf-asm/json_diff.ll (Z14sort_map_equivPN4json3mapES1_)

; 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.std::map.58" = type { %"class.std::_Rb_tree.59" }
%"class.std::_Rb_tree.59" = type { %"struct.std::_Rb_tree<json::obj *, std::pair<json::obj *const, json::obj *>, std::_Select1st<std::pair<json::obj *const, json::obj *>>, json::obj::ptrless>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<json::obj *, std::pair<json::obj *const, json::obj *>, std::_Select1st<std::pair<json::obj *const, json::obj *>>, json::obj::ptrless>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_List_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator.54" = type { ptr }
%"struct.std::pair.50" = type { ptr, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.18" }
%"struct.std::_Head_base.18" = type { ptr }
%"struct.std::pair.55" = type { ptr, ptr }

@_ZL13show_deletion = external hidden global i8, align 1
@_ZL13show_addition = external hidden global 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5equivPN4json3objES1_S1_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14build_sort_mapPN4json3mapE(ptr dead_on_unwind noalias writable sret(%"class.std::map.58") align 8, ptr noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z14sort_map_equivPN4json3mapES1_(ptr noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::map.58", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator.54", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator.54", align 8
  %18 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_Z14build_sort_mapPN4json3mapE(ptr dead_on_unwind writable sret(%"class.std::map.58") align 8 %6, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %20, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = call ptr @_ZN2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %22) #3
  %24 = getelementptr inbounds %"struct.std::_List_iterator", ptr %8, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = call ptr @_ZN2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %26) #3
  %28 = getelementptr inbounds %"struct.std::_List_iterator", ptr %9, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %77, %2
  %30 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  br i1 %30, label %32, label %31

31:                                               ; preds = %29
  store i32 2, ptr %10, align 4
  br label %79

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  store ptr %33, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.std::pair.50", ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = invoke noundef i64 @_ZNKSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %38 unwind label %48

38:                                               ; preds = %32
  %39 = icmp ne i64 %37, 0
  br i1 %39, label %53, label %40

40:                                               ; preds = %38
  %41 = load i8, ptr @_ZL13show_deletion, align 1, !tbaa !17, !range !19, !noundef !20
  %42 = trunc i8 %41 to i1
  br i1 %42, label %43, label %52

43:                                               ; preds = %40
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %44)
          to label %46 unwind label %48

46:                                               ; preds = %43
  br i1 %45, label %52, label %47

47:                                               ; preds = %46
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %71

48:                                               ; preds = %68, %62, %57, %53, %43, %32
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %13, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %118

52:                                               ; preds = %46, %40
  store i32 3, ptr %10, align 4
  br label %71

53:                                               ; preds = %38
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %54)
          to label %56 unwind label %48

56:                                               ; preds = %53
  br i1 %55, label %68, label %57

57:                                               ; preds = %56
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.std::pair.50", ptr %58, i32 0, i32 1
  %60 = call noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %59) #3
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %62 unwind label %48

62:                                               ; preds = %57
  %63 = load ptr, ptr %61, align 8, !tbaa !5
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = invoke noundef zeroext i1 @_Z5equivPN4json3objES1_S1_(ptr noundef %60, ptr noundef %63, ptr noundef %64)
          to label %66 unwind label %48

66:                                               ; preds = %62
  br i1 %65, label %68, label %67

67:                                               ; preds = %66
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %71

68:                                               ; preds = %66, %56
  %69 = invoke noundef i64 @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %70 unwind label %48

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

71:                                               ; preds = %70, %67, %52, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %72 = load i32, ptr %10, align 4
  switch i32 %72, label %74 [
    i32 0, label %73
  ]

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

74:                                               ; preds = %73, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %75 = load i32, ptr %10, align 4
  switch i32 %75, label %79 [
    i32 0, label %76
    i32 3, label %77
  ]

76:                                               ; preds = %74
  br label %77

77:                                               ; preds = %76, %74
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br label %29

79:                                               ; preds = %74, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %80 = load i32, ptr %10, align 4
  switch i32 %80, label %116 [
    i32 2, label %81
  ]

81:                                               ; preds = %79
  %82 = load i8, ptr @_ZL13show_addition, align 1, !tbaa !17, !range !19, !noundef !20
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %115

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = call ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %85) #3
  %87 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.54", ptr %16, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = call ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %88) #3
  %90 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.54", ptr %17, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  br label %91

91:                                               ; preds = %110, %84
  %92 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EES8_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  br i1 %92, label %94, label %93

93:                                               ; preds = %91
  store i32 4, ptr %10, align 4
  br label %112

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  store ptr %95, ptr %18, align 8, !tbaa !5
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.std::pair.55", ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !21
  %99 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %98)
          to label %100 unwind label %102

100:                                              ; preds = %94
  br i1 %99, label %106, label %101

101:                                              ; preds = %100
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %107

102:                                              ; preds = %94
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %13, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %118

106:                                              ; preds = %100
  store i32 0, ptr %10, align 4
  br label %107

107:                                              ; preds = %106, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %108 = load i32, ptr %10, align 4
  switch i32 %108, label %112 [
    i32 0, label %109
  ]

109:                                              ; preds = %107
  br label %110

110:                                              ; preds = %109
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  br label %91

112:                                              ; preds = %107, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %113 = load i32, ptr %10, align 4
  switch i32 %113, label %116 [
    i32 4, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %81
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %116

116:                                              ; preds = %115, %112, %79
  call void @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #3
  %117 = load i1, ptr %3, align 1
  ret i1 %117

118:                                              ; preds = %102, %48
  call void @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #3
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %13, align 8
  %121 = load i32, ptr %14, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIKPN4json3objESt10unique_ptrIS1_St14default_deleteIS1_EEE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSSt10unique_ptrIN4json3objESt14default_deleteIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_dataIN4json3objESt14default_deleteIS1_ELb1ELb1EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_implIN4json3objESt14default_deleteIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt5tupleIJPN4json3objESt14default_deleteIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Tuple_implILm0EJPN4json3objESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_Head_baseILm0EPN4json3objELb0EE", !6, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSSt4pairIKPN4json3objES2_E", !6, i64 0, !6, i64 8}


; 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.std::map.58" = type { %"class.std::_Rb_tree.59" }
%"class.std::_Rb_tree.59" = type { %"struct.std::_Rb_tree<json::obj *, std::pair<json::obj *const, json::obj *>, std::_Select1st<std::pair<json::obj *const, json::obj *>>, json::obj::ptrless>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<json::obj *, std::pair<json::obj *const, json::obj *>, std::_Select1st<std::pair<json::obj *const, json::obj *>>, json::obj::ptrless>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_List_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator.54" = type { ptr }

@_ZL13show_deletion = external hidden local_unnamed_addr global i8, align 1
@_ZL13show_addition = external hidden local_unnamed_addr global 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5equivPN4json3objES1_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z14sort_map_equivPN4json3mapES1_(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::map.58", align 8
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator.54", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator.54", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #3
  call void @_Z14build_sort_mapPN4json3mapE(ptr dead_on_unwind nonnull writable sret(%"class.std::map.58") align 8 %3, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = call ptr @_ZN2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %9) #3
  store ptr %10, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %11 = call ptr @_ZN2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %9) #3
  store ptr %11, ptr %5, align 8
  %12 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %41
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %14, ptr %6, align 8, !tbaa !16
  %15 = invoke noundef i64 @_ZNKSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %16 unwind label %24

16:                                               ; preds = %.lr.ph
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %17, label %26

17:                                               ; preds = %16
  %18 = load i8, ptr @_ZL13show_deletion, align 1, !tbaa !17, !range !19, !noundef !20
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %20, label %41

20:                                               ; preds = %17
  %21 = load ptr, ptr %6, align 8, !tbaa !16
  %22 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %21)
          to label %23 unwind label %24

23:                                               ; preds = %20
  br i1 %22, label %41, label %44

24:                                               ; preds = %39, %34, %30, %26, %20, %.lr.ph
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %62

26:                                               ; preds = %16
  %27 = load ptr, ptr %6, align 8, !tbaa !16
  %28 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %27)
          to label %29 unwind label %24

29:                                               ; preds = %26
  br i1 %28, label %39, label %30

30:                                               ; preds = %29
  %31 = getelementptr inbounds i8, ptr %13, i64 8
  %32 = call noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #3
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %34 unwind label %24

34:                                               ; preds = %30
  %35 = load ptr, ptr %33, align 8, !tbaa !16
  %36 = load ptr, ptr %6, align 8, !tbaa !16
  %37 = invoke noundef zeroext i1 @_Z5equivPN4json3objES1_S1_(ptr noundef %32, ptr noundef %35, ptr noundef %36)
          to label %38 unwind label %24

38:                                               ; preds = %34
  br i1 %37, label %39, label %44

39:                                               ; preds = %38, %29
  %40 = invoke noundef i64 @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %41 unwind label %24

41:                                               ; preds = %17, %23, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %43 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %43, label %.lr.ph, label %._crit_edge

44:                                               ; preds = %23, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %61

._crit_edge:                                      ; preds = %41, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  %45 = load i8, ptr @_ZL13show_addition, align 1, !tbaa !17, !range !19, !noundef !20
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %47, label %61

47:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %48 = call ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  store ptr %48, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %49 = call ptr @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  store ptr %49, ptr %8, align 8
  %50 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EES8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %50, label %.lr.ph30, label %.critedge27

.lr.ph30:                                         ; preds = %47, %57
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = invoke noundef zeroext i1 @_Z6ignorePN4json3objE(ptr noundef %52)
          to label %56 unwind label %54

54:                                               ; preds = %.lr.ph30
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %62

56:                                               ; preds = %.lr.ph30
  br i1 %53, label %57, label %60

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %59 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EES8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %59, label %.lr.ph30, label %.critedge27

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %61

.critedge27:                                      ; preds = %57, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %61

61:                                               ; preds = %._crit_edge, %.critedge27, %60, %44
  %.6 = phi i1 [ false, %60 ], [ false, %44 ], [ true, %.critedge27 ], [ true, %._crit_edge ]
  call void @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #3
  ret i1 %.6

62:                                               ; preds = %54, %24
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %25, %24 ]
  call void @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #3
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIPN4json3objES2_NS1_7ptrlessESaISt4pairIKS2_S2_EEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKPN4json3objES3_EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSSt4pairIKPN4json3objESt10unique_ptrIS1_St14default_deleteIS1_EEE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10unique_ptrIN4json3objESt14default_deleteIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt15__uniq_ptr_dataIN4json3objESt14default_deleteIS1_ELb1ELb1EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_implIN4json3objESt14default_deleteIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt5tupleIJPN4json3objESt14default_deleteIS1_EEE", !14, i64 0}
!14 = !{!"_ZTSSt11_Tuple_implILm0EJPN4json3objESt14default_deleteIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSSt10_Head_baseILm0EPN4json3objELb0EE", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !7, i64 0}
!22 = !{!"_ZTSSt4pairIKPN4json3objES2_E", !7, i64 0, !7, i64 8}


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