; LLVM IR from fdabrandao/vpsolver :: src/graph.ll (ZNK3ArcltERKS_)

; 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.Arc = type { i32, i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK3ArcltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 0
  %7 = load i32, ptr %6, align 4, !tbaa !9
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = getelementptr inbounds %class.Arc, ptr %8, i32 0, i32 0
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %11 = icmp slt i32 %7, %10
  br i1 %11, label %49, label %12

12:                                               ; preds = %2
  %13 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.Arc, ptr %15, i32 0, i32 0
  %17 = load i32, ptr %16, align 4, !tbaa !9
  %18 = icmp eq i32 %14, %17
  br i1 %18, label %19, label %26

19:                                               ; preds = %12
  %20 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 1
  %21 = load i32, ptr %20, align 4, !tbaa !12
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.Arc, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !12
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %49, label %26

26:                                               ; preds = %19, %12
  %27 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 0
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.Arc, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp eq i32 %28, %31
  br i1 %32, label %33, label %47

33:                                               ; preds = %26
  %34 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !12
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.Arc, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !12
  %39 = icmp eq i32 %35, %38
  br i1 %39, label %40, label %47

40:                                               ; preds = %33
  %41 = getelementptr inbounds %class.Arc, ptr %5, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.Arc, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !13
  %46 = icmp slt i32 %42, %45
  br label %47

47:                                               ; preds = %40, %33, %26
  %48 = phi i1 [ false, %33 ], [ false, %26 ], [ %46, %40 ]
  br label %49

49:                                               ; preds = %47, %19, %2
  %50 = phi i1 [ true, %19 ], [ true, %2 ], [ %48, %47 ]
  ret i1 %50
}

attributes #0 = { 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" }

!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, !11, i64 0}
!10 = !{!"_ZTS3Arc", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, 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"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local noundef zeroext i1 @_ZNK3ArcltERKS_(ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %1) local_unnamed_addr #0 align 2 {
  %3 = load i32, ptr %0, align 4, !tbaa !5
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp slt i32 %3, %4
  br i1 %5, label %22, label %6

6:                                                ; preds = %2
  %7 = icmp eq i32 %3, %4
  br i1 %7, label %8, label %22

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !10
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !10
  %13 = icmp slt i32 %10, %12
  br i1 %13, label %22, label %14

14:                                               ; preds = %8
  %15 = icmp eq i32 %10, %12
  br i1 %15, label %16, label %22

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp slt i32 %18, %20
  br label %22

22:                                               ; preds = %6, %14, %16, %8, %2
  %23 = phi i1 [ true, %8 ], [ true, %2 ], [ false, %14 ], [ %21, %16 ], [ false, %6 ]
  ret i1 %23
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) 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" }

!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 = !{!"_ZTS3Arc", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass