; LLVM IR from schostac/Advanced-Algorithms-and-Complexity :: week1/airline_crews.ll (Z9read_datav)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.FlowGraph = type { %"class.std::vector", %"class.std::vector.0", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9read_datav(ptr dead_on_unwind noalias writable sret(%class.FlowGraph) align 8 %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i1, align 1
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i1 false, ptr %5, align 1
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = add nsw i32 %16, %17
  %19 = add nsw i32 %18, 2
  %20 = sext i32 %19 to i64
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = add nsw i32 %21, %22
  %24 = add nsw i32 %23, 2
  %25 = sext i32 %24 to i64
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  call void @_ZN9FlowGraphC2Emmm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %20, i64 noundef %25, i64 noundef %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %37, %1
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %44

33:                                               ; preds = %28
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %35, i32 noundef 1)
          to label %36 unwind label %40

36:                                               ; preds = %33
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !5
  br label %28, !llvm.loop !9

40:                                               ; preds = %33
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %108

44:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %77, %44
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %80

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %73, %50
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %76

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %58 unwind label %68

58:                                               ; preds = %56
  %59 = load i32, ptr %12, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %72

61:                                               ; preds = %58
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = add nsw i32 %63, %64
  %66 = add nsw i32 %65, 1
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %62, i32 noundef %66, i32 noundef 1)
          to label %67 unwind label %68

67:                                               ; preds = %61
  br label %72

68:                                               ; preds = %61, %56
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %7, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %108

72:                                               ; preds = %67, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %11, align 4, !tbaa !5
  br label %51, !llvm.loop !11

76:                                               ; preds = %55
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !5
  br label %45, !llvm.loop !12

80:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %13, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %97, %80
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = add nsw i32 %85, %86
  %88 = icmp sle i32 %84, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %83
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %104

90:                                               ; preds = %83
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = add nsw i32 %92, %93
  %95 = add nsw i32 %94, 1
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %91, i32 noundef %95, i32 noundef 1)
          to label %96 unwind label %100

96:                                               ; preds = %90
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %13, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %13, align 4, !tbaa !5
  br label %83, !llvm.loop !13

100:                                              ; preds = %90
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %108

104:                                              ; preds = %89
  store i1 true, ptr %5, align 1
  store i32 1, ptr %10, align 4
  %105 = load i1, ptr %5, align 1
  br i1 %105, label %107, label %106

106:                                              ; preds = %104
  call void @_ZN9FlowGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  br label %107

107:                                              ; preds = %106, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

108:                                              ; preds = %100, %68, %40
  call void @_ZN9FlowGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %7, align 8
  %111 = load i32, ptr %8, align 4
  %112 = insertvalue { ptr, i32 } poison, ptr %110, 0
  %113 = insertvalue { ptr, i32 } %112, i32 %111, 1
  resume { ptr, i32 } %113
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FlowGraphC2Emmm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, i64 noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.FlowGraph = type { %"class.std::vector", %"class.std::vector.0", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FlowGraph::Edge, std::allocator<FlowGraph::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9read_datav(ptr dead_on_unwind noalias writable sret(%class.FlowGraph) align 8 %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = add i32 %7, 2
  %10 = add i32 %9, %8
  %11 = sext i32 %10 to i64
  %12 = sext i32 %7 to i64
  call void @_ZN9FlowGraphC2Emmm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %11, i64 noundef %11, i64 noundef %12)
  br label %13

13:                                               ; preds = %18, %1
  %.018 = phi i32 [ 0, %1 ], [ %19, %18 ]
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp slt i32 %.018, %14
  br i1 %15, label %18, label %.preheader24

.preheader24:                                     ; preds = %13
  %.not27 = icmp sgt i32 %14, 0
  %16 = load i32, ptr %3, align 4
  %17 = icmp sgt i32 %16, 0
  %or.cond = select i1 %.not27, i1 %17, i1 false
  br i1 %or.cond, label %.preheader23, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge, %.preheader24
  %.0.in.ph = phi i32 [ %14, %.preheader24 ], [ %25, %._crit_edge ]
  br label %.preheader

18:                                               ; preds = %13
  %19 = add nuw nsw i32 %.018, 1
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %19, i32 noundef 1)
          to label %13 unwind label %20, !llvm.loop !9

20:                                               ; preds = %18
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %49

.preheader23:                                     ; preds = %.preheader24, %._crit_edge
  %22 = phi i32 [ %25, %._crit_edge ], [ %14, %.preheader24 ]
  %23 = phi i32 [ %26, %._crit_edge ], [ %16, %.preheader24 ]
  %.01528 = phi i32 [ %27, %._crit_edge ], [ 1, %.preheader24 ]
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %38
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader23
  %25 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %22, %.preheader23 ]
  %26 = phi i32 [ %39, %._crit_edge.loopexit ], [ %23, %.preheader23 ]
  %27 = add nuw nsw i32 %.01528, 1
  %.not.not = icmp slt i32 %.01528, %25
  br i1 %.not.not, label %.preheader23, label %.preheader.preheader, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader23, %38
  %.01426 = phi i32 [ %.pre-phi, %38 ], [ 0, %.preheader23 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %29 unwind label %36

29:                                               ; preds = %.lr.ph
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %._crit_edge31

._crit_edge31:                                    ; preds = %29
  %.pre32 = add nuw nsw i32 %.01426, 1
  br label %38

32:                                               ; preds = %29
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nuw nsw i32 %.01426, 1
  %35 = add i32 %34, %33
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %.01528, i32 noundef %35, i32 noundef 1)
          to label %38 unwind label %36

36:                                               ; preds = %32, %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %49

38:                                               ; preds = %._crit_edge31, %32
  %.pre-phi = phi i32 [ %.pre32, %._crit_edge31 ], [ %34, %32 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = icmp slt i32 %.pre-phi, %39
  br i1 %40, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %44
  %.0.in = phi i32 [ %.0, %44 ], [ %.0.in.ph, %.preheader.preheader ]
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, %41
  %.not21.not = icmp slt i32 %.0.in, %43
  br i1 %.not21.not, label %44, label %48

44:                                               ; preds = %.preheader
  %.0 = add nsw i32 %.0.in, 1
  %45 = add nsw i32 %43, 1
  invoke void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %.0, i32 noundef %45, i32 noundef 1)
          to label %.preheader unwind label %46, !llvm.loop !14

46:                                               ; preds = %44
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %49

48:                                               ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret void

49:                                               ; preds = %46, %36, %20
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %37, %36 ], [ %47, %46 ]
  call void @_ZN9FlowGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FlowGraphC2Emmm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, i64 noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9FlowGraph8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass