; LLVM IR from facebook/redex :: libredex/ControlFlow.ll (ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_)

; 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::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.113" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [51 x i8], align 1
@__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_ = external hidden unnamed_addr constant [68 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [52 x i8], align 1

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: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg16ControlFlowGraph8add_edgeIJRPNS_5BlockES4_NS_8EdgeTypeEEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg16ControlFlowGraph15set_edge_targetEPNS_4EdgeEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef, ptr noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::vector.11", align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3cfg5Block5succsEv(ptr noundef nonnull align 8 dereferenceable(104) %23)
          to label %25 unwind label %35

25:                                               ; preds = %4
  store ptr %24, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %73, %25
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %33, label %39, label %34

34:                                               ; preds = %32
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %76

35:                                               ; preds = %4
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %11, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %12, align 4
  br label %75

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  store ptr %41, ptr %16, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = invoke noundef ptr @_ZNK3cfg4Edge6targetEv(ptr noundef nonnull align 8 dereferenceable(32) %42)
          to label %44 unwind label %48

44:                                               ; preds = %39
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = icmp ne ptr %43, %45
  br i1 %46, label %47, label %52

47:                                               ; preds = %44
  store i32 3, ptr %15, align 4
  br label %70

48:                                               ; preds = %68, %65, %58, %52, %39
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %11, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %75

52:                                               ; preds = %44
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = invoke noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %53)
          to label %55 unwind label %48

55:                                               ; preds = %52
  %56 = zext i8 %54 to i32
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %64, label %58

58:                                               ; preds = %55
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = invoke noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %59)
          to label %61 unwind label %48

61:                                               ; preds = %58
  %62 = zext i8 %60 to i32
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %65

64:                                               ; preds = %61, %55
  br label %68

65:                                               ; preds = %61
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.105, ptr noundef @.str.8, i32 noundef 2764, ptr noundef @__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_, i32 noundef 2, ptr noundef @.str.106) #6
          to label %66 unwind label %48

66:                                               ; preds = %65
  unreachable

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %64
  invoke void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %69 unwind label %48

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

70:                                               ; preds = %69, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %71 = load i32, ptr %15, align 4
  switch i32 %71, label %120 [
    i32 0, label %72
    i32 3, label %73
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %70
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %32

75:                                               ; preds = %48, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %114

76:                                               ; preds = %34
  %77 = call noundef zeroext i1 @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  br label %86

79:                                               ; preds = %76
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.107, ptr noundef @.str.8, i32 noundef 2768, ptr noundef @__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_, i32 noundef 2, ptr noundef @.str.108) #6
          to label %80 unwind label %81

80:                                               ; preds = %79
  unreachable

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

85:                                               ; No predecessors!
  br label %86

86:                                               ; preds = %85, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store ptr %9, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %87 = load ptr, ptr %17, align 8, !tbaa !5
  %88 = call ptr @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %87) #5
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %18, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %90 = load ptr, ptr %17, align 8, !tbaa !5
  %91 = call ptr @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #5
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %19, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  br label %93

93:                                               ; preds = %102, %86
  %94 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %94, label %96, label %95

95:                                               ; preds = %93
  store i32 4, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %108

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  store ptr %98, ptr %20, align 8, !tbaa !5
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3cfg16ControlFlowGraph15set_edge_targetEPNS_4EdgeEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160) %22, ptr noundef %99, ptr noundef %100)
          to label %101 unwind label %104

101:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %102

102:                                              ; preds = %101
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br label %93

104:                                              ; preds = %96
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %11, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %114

108:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  store i8 0, ptr %21, align 1, !tbaa !9
  invoke void @_ZN3cfg16ControlFlowGraph8add_edgeIJRPNS_5BlockES4_NS_8EdgeTypeEEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(160) %22, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %109 unwind label %110

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  ret void

110:                                              ; preds = %108
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  br label %114

114:                                              ; preds = %110, %104, %81, %75
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %11, align 8
  %117 = load i32, ptr %12, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119

120:                                              ; preds = %70
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "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 = { 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 = { 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 = { 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, !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 = !{!"_ZTSN3cfg8EdgeTypeE", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.113" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [51 x i8], align 1
@__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_ = external hidden unnamed_addr constant [68 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [52 x i8], align 1

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: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg16ControlFlowGraph8add_edgeIJRPNS_5BlockES4_NS_8EdgeTypeEEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg16ControlFlowGraph15set_edge_targetEPNS_4EdgeEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector.11", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %13 = alloca i8, align 1
  store ptr %2, ptr %5, align 8, !tbaa !5
  store ptr %3, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3cfg5Block5succsEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %15 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  store ptr %15, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %16 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  store ptr %16, ptr %9, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %34, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %18 = call noundef zeroext i1 @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br i1 %18, label %37, label %41

.lr.ph:                                           ; preds = %4, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %20, ptr %10, align 8, !tbaa !5
  %21 = call noundef ptr @_ZNK3cfg4Edge6targetEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %.not = icmp eq ptr %21, %2
  br i1 %.not, label %23, label %34

.loopexit:                                        ; preds = %33
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %22

.loopexit.split-lp:                               ; preds = %31
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %22

22:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %55

23:                                               ; preds = %.lr.ph
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  %26 = icmp eq i8 %25, 0
  br i1 %26, label %33, label %27

27:                                               ; preds = %23
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = call noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %28)
  %30 = icmp eq i8 %29, 1
  br i1 %30, label %33, label %31

31:                                               ; preds = %27
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.105, ptr noundef nonnull @.str.8, i32 noundef 2764, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_, i32 noundef 2, ptr noundef nonnull @.str.106) #6
          to label %32 unwind label %.loopexit.split-lp

32:                                               ; preds = %31
  unreachable

33:                                               ; preds = %23, %27
  invoke void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %33, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %36, label %.lr.ph, label %._crit_edge

37:                                               ; preds = %._crit_edge
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.107, ptr noundef nonnull @.str.8, i32 noundef 2768, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3cfg16ControlFlowGraph12insert_blockEPNS_5BlockES2_S2_, i32 noundef 2, ptr noundef nonnull @.str.108) #6
          to label %38 unwind label %39

38:                                               ; preds = %37
  unreachable

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

41:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %42 = call ptr @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  store ptr %42, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %43 = call ptr @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  store ptr %43, ptr %12, align 8
  %44 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %44, label %.lr.ph11, label %._crit_edge12

._crit_edge12:                                    ; preds = %47, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  store i8 0, ptr %13, align 1, !tbaa !9
  invoke void @_ZN3cfg16ControlFlowGraph8add_edgeIJRPNS_5BlockES4_NS_8EdgeTypeEEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %52 unwind label %53

.lr.ph11:                                         ; preds = %41, %47
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  invoke void @_ZN3cfg16ControlFlowGraph15set_edge_targetEPNS_4EdgeEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef %46, ptr noundef %3)
          to label %47 unwind label %50

47:                                               ; preds = %.lr.ph11
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %49, label %.lr.ph11, label %._crit_edge12

50:                                               ; preds = %.lr.ph11
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %55

52:                                               ; preds = %._crit_edge12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  ret void

53:                                               ; preds = %._crit_edge12
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  br label %55

55:                                               ; preds = %53, %50, %39, %22
  %.pn = phi { ptr, i32 } [ %lpad.phi, %22 ], [ %40, %39 ], [ %51, %50 ], [ %54, %53 ]
  call void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3cfg4EdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "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 = { 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 = { 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 = { 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, !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 = !{!"_ZTSN3cfg8EdgeTypeE", !7, i64 0}


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