; LLVM IR from facebook/redex :: libredex/BigBlocks.ll (ZN10big_blocks19InstructionIteratorppEv)

; 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" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.big_blocks::InstructionIterator" = type <{ %"class.cfg::InstructionIteratorImpl", i8, [7 x i8] }>

; 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

declare noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104)) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZN10big_blocks19InstructionIteratorppEv(ptr noundef nonnull align 8 dereferenceable(33) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %9 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %10 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %11 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %12 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %13 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %14 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #4
  %16 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 0
  call void @_ZN3cfg23InstructionIteratorImplILb0EEppEi(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 0)
  %17 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EE5blockEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #4
  store ptr %17, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 0
  %19 = call noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EE6is_endEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  br i1 %19, label %26, label %20

20:                                               ; preds = %1
  %21 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 0
  %22 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EE5blockEv(ptr noundef nonnull align 8 dereferenceable(32) %21)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = icmp eq ptr %22, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  store ptr %15, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %57

26:                                               ; preds = %20, %1
  br label %27

27:                                               ; preds = %56, %26
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104) %29)
  store ptr %30, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %39

33:                                               ; preds = %28
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 1
  %36 = load i8, ptr %35, align 8, !tbaa !9, !range !17, !noundef !18
  %37 = trunc i8 %36 to i1
  %38 = call noundef zeroext i1 @_ZN12_GLOBAL__N_122is_big_block_successorEPN3cfg5BlockEb(ptr noundef %34, i1 noundef zeroext %37)
  br i1 %38, label %44, label %39

39:                                               ; preds = %33, %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %40)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %9, ptr noundef nonnull align 8 dereferenceable(104) %41, ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext false)
  %42 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 0
  %43 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  store ptr %15, ptr %2, align 8
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  br label %54

44:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %45)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %46 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  br i1 %46, label %47, label %51

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #4
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %14, ptr noundef nonnull align 8 dereferenceable(104) %48, ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext false)
  %49 = getelementptr inbounds %"class.big_blocks::InstructionIterator", ptr %15, i32 0, i32 0
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull align 8 dereferenceable(32) %14)
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  store ptr %15, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %53

51:                                               ; preds = %44
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %52, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  br label %53

53:                                               ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %54

54:                                               ; preds = %53, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %55 = load i32, ptr %6, align 4
  switch i32 %55, label %57 [
    i32 0, label %56
  ]

56:                                               ; preds = %54
  br label %27, !llvm.loop !19

57:                                               ; preds = %54, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %58 = load ptr, ptr %2, align 8
  ret ptr %58
}

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

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

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

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

declare void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind 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

; 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)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 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)) #2 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)) #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !16, i64 32}
!10 = !{!"_ZTSN10big_blocks19InstructionIteratorE", !11, i64 0, !16, i64 32}
!11 = !{!"_ZTSN3cfg23InstructionIteratorImplILb0EEE", !6, i64 0, !12, i64 8, !13, i64 16}
!12 = !{!"_ZTSSt23_Rb_tree_const_iteratorISt4pairIKmPN3cfg5BlockEEE", !6, i64 0}
!13 = !{!"_ZTSN7ir_list23InstructionIteratorImplILb0EEE", !14, i64 0, !14, i64 8}
!14 = !{!"_ZTSN5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEE", !15, i64 0}
!15 = !{!"_ZTSN5boost9intrusive17iiterator_membersIPNS0_9list_nodeIPvEEPKNS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS7_10list_hook_EEEEELb0EEE", !6, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }

; 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

declare noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZN10big_blocks19InstructionIteratorppEv(ptr noundef nonnull returned align 8 dereferenceable(33) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %3 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %4 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %5 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %6 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %7 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %8 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %9 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN3cfg23InstructionIteratorImplILb0EEppEi(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0)
  %10 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EE5blockEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  %11 = call noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EE6is_endEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %11, label %15, label %12

12:                                               ; preds = %1
  %13 = call noundef ptr @_ZNK3cfg23InstructionIteratorImplILb0EE5blockEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %14 = icmp eq ptr %13, %10
  br i1 %14, label %31, label %15

15:                                               ; preds = %12, %1
  %16 = call noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104) %10)
  %.not28 = icmp eq ptr %16, null
  br i1 %.not28, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %15
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = load i8, ptr %17, align 8, !tbaa !5, !range !16, !noundef !17
  %19 = trunc nuw i8 %18 to i1
  %20 = call noundef zeroext i1 @_ZN12_GLOBAL__N_122is_big_block_successorEPN3cfg5BlockEb(ptr noundef nonnull %16, i1 noundef zeroext %19)
  br i1 %20, label %.lr.ph35, label %.thread

21:                                               ; preds = %29
  %22 = load i8, ptr %17, align 8, !tbaa !5, !range !16, !noundef !17
  %23 = trunc nuw i8 %22 to i1
  %24 = call noundef zeroext i1 @_ZN12_GLOBAL__N_122is_big_block_successorEPN3cfg5BlockEb(ptr noundef nonnull %30, i1 noundef zeroext %23)
  br i1 %24, label %.lr.ph35, label %.thread, !llvm.loop !18

.thread:                                          ; preds = %29, %21, %.lr.ph, %15
  %.013.lcssa = phi ptr [ %10, %15 ], [ %10, %.lr.ph ], [ %26, %21 ], [ %26, %29 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %.013.lcssa)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) %.013.lcssa, ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext false)
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %31

.lr.ph35:                                         ; preds = %.lr.ph, %21
  %26 = phi ptr [ %30, %21 ], [ %16, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN7ir_list23InstructionIterableImplILb0EEC2IN3cfg5BlockEEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %26)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %27 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br i1 %27, label %.thread21, label %29

.thread21:                                        ; preds = %.lr.ph35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %9, ptr noundef nonnull align 8 dereferenceable(104) %26, ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext false)
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(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) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %31

29:                                               ; preds = %.lr.ph35
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  %30 = call noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104) %26)
  %.not = icmp eq ptr %30, null
  br i1 %.not, label %.thread, label %21, !llvm.loop !18

31:                                               ; preds = %.thread21, %.thread, %12
  ret ptr %0
}

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

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

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

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

declare void @_ZN3cfg5Block27to_cfg_instruction_iteratorERKN7ir_list23InstructionIteratorImplILb0EEEb(ptr dead_on_unwind 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

; 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 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 #2 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 #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !15, i64 32}
!6 = !{!"_ZTSN10big_blocks19InstructionIteratorE", !7, i64 0, !15, i64 32}
!7 = !{!"_ZTSN3cfg23InstructionIteratorImplILb0EEE", !8, i64 0, !11, i64 8, !12, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt23_Rb_tree_const_iteratorISt4pairIKmPN3cfg5BlockEEE", !8, i64 0}
!12 = !{!"_ZTSN7ir_list23InstructionIteratorImplILb0EEE", !13, i64 0, !13, i64 8}
!13 = !{!"_ZTSN5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEE", !14, i64 0}
!14 = !{!"_ZTSN5boost9intrusive17iiterator_membersIPNS0_9list_nodeIPvEEPKNS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS7_10list_hook_EEEEELb0EEE", !8, i64 0}
!15 = !{!"bool", !9, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass