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

; 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.cfg::InstructionIteratorImpl" = type { ptr, %"struct.std::_Rb_tree_const_iterator", %"class.ir_list::InstructionIteratorImpl" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIterableImpl.578" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.cfg::InstructionIterableImpl.547" = type { ptr }
%struct.MethodItemEntry = type { %"class.boost::intrusive::list_member_hook", i32, %union.anon.16 }
%"class.boost::intrusive::list_member_hook" = type { %"class.boost::intrusive::generic_hook" }
%"class.boost::intrusive::generic_hook" = type { %"struct.boost::intrusive::list_node" }
%"struct.boost::intrusive::list_node" = type { ptr, ptr }
%union.anon.16 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph9find_insnEP13IRInstructionPNS_5BlockE(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef %2, ptr noundef %3) #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.ir_list::InstructionIterableImpl.578", align 8
  %10 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %11 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.cfg::InstructionIterableImpl.547", align 8
  %14 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  store ptr %0, ptr %5, align 8
  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
  %15 = load ptr, ptr %6, align 8
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %40

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  br label %20

20:                                               ; preds = %32, %18
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %21 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br i1 %21, label %23, label %22

22:                                               ; preds = %20
  store i32 2, ptr %12, align 4
  br label %34

23:                                               ; preds = %20
  %24 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %25 = getelementptr inbounds %struct.MethodItemEntry, ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = icmp eq ptr %26, %27
  br i1 %28, label %29, label %31

29:                                               ; preds = %23
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(104) %30, ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext false)
  store i32 1, ptr %12, align 4
  br label %34

31:                                               ; preds = %23
  br label %32

32:                                               ; preds = %31
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  br label %20, !llvm.loop !10

34:                                               ; preds = %29, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  %35 = load i32, ptr %12, align 4
  switch i32 %35, label %37 [
    i32 2, label %36
  ]

36:                                               ; preds = %34
  store i32 0, ptr %12, align 4
  br label %37

37:                                               ; preds = %36, %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %38 = load i32, ptr %12, align 4
  switch i32 %38, label %56 [
    i32 0, label %39
    i32 1, label %55
  ]

39:                                               ; preds = %37
  br label %40

40:                                               ; preds = %39, %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @_ZN3cfg23InstructionIterableImplILb0EEC2ERNS_16ControlFlowGraphE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(160) %15)
  call void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %13)
  br label %41

41:                                               ; preds = %51, %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #3
  call void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %42 = call noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %14)
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #3
  br i1 %42, label %43, label %53

43:                                               ; preds = %41
  %44 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %45 = getelementptr inbounds %struct.MethodItemEntry, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = icmp eq ptr %46, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  store i32 1, ptr %12, align 4
  br label %54

50:                                               ; preds = %43
  br label %51

51:                                               ; preds = %50
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br label %41, !llvm.loop !12

53:                                               ; preds = %41
  call void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %13)
  store i32 1, ptr %12, align 4
  br label %54

54:                                               ; preds = %53, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %55

55:                                               ; preds = %54, %37
  ret void

56:                                               ; preds = %37
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; 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.cfg::InstructionIteratorImpl" = type { ptr, %"struct.std::_Rb_tree_const_iterator", %"class.ir_list::InstructionIteratorImpl" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIterableImpl.578" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.cfg::InstructionIterableImpl.547" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph9find_insnEP13IRInstructionPNS_5BlockE(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef readnone %2, ptr noundef %3) local_unnamed_addr #1 align 2 {
  %5 = alloca %"class.ir_list::InstructionIterableImpl.578", align 8
  %6 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %7 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %8 = alloca %"class.cfg::InstructionIterableImpl.547", align 8
  %9 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %20, label %10

10:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %11 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  br i1 %11, label %.lr.ph, label %.thread

.thread:                                          ; preds = %16, %10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %20

.lr.ph:                                           ; preds = %10, %16
  %12 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = icmp eq ptr %14, %2
  br i1 %15, label %19, label %16

16:                                               ; preds = %.lr.ph
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %18 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  br i1 %18, label %.lr.ph, label %.thread, !llvm.loop !8

19:                                               ; preds = %.lr.ph
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(104) %3, ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %29

20:                                               ; preds = %.thread, %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @_ZN3cfg23InstructionIterableImplILb0EEC2ERNS_16ControlFlowGraphE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(160) %1)
  call void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #3
  call void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %21 = call noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #3
  br i1 %21, label %.lr.ph9, label %._crit_edge

.lr.ph9:                                          ; preds = %20, %26
  %22 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = icmp eq ptr %24, %2
  br i1 %25, label %.loopexit, label %26

26:                                               ; preds = %.lr.ph9
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #3
  call void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %28 = call noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #3
  br i1 %28, label %.lr.ph9, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %26, %20
  call void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph9, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br label %29

29:                                               ; preds = %19, %.loopexit
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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