; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_common)

; 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.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase" = type { ptr }
%"struct.__sanitizer::LoadedModule::AddressRange" = type <{ ptr, i64, i64, 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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %1) #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", align 8
  %8 = alloca %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", align 8
  %9 = alloca %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %13 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11__sanitizer12LoadedModule6rangesEv(ptr noundef nonnull align 8 dereferenceable(40) %12)
  store ptr %13, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = call ptr @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %16 = getelementptr inbounds %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", ptr %7, i32 0, i32 0
  store ptr %15, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call ptr @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %19 = getelementptr inbounds %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", ptr %8, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  br label %20

20:                                               ; preds = %43, %2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %8, i64 8, i1 false), !tbaa.struct !11
  %21 = getelementptr inbounds %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", ptr %9, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8
  %23 = call noundef zeroext i1 @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EneES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr %22)
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 2, ptr %10, align 4
  br label %45

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %26 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  store ptr %26, ptr %11, align 8, !tbaa !5
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.__sanitizer::LoadedModule::AddressRange", ptr %27, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !12
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = icmp ule i64 %29, %30
  br i1 %31, label %32, label %39

32:                                               ; preds = %25
  %33 = load i64, ptr %5, align 8, !tbaa !9
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.__sanitizer::LoadedModule::AddressRange", ptr %34, i32 0, i32 2
  %36 = load i64, ptr %35, align 8, !tbaa !15
  %37 = icmp ult i64 %33, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %40

39:                                               ; preds = %32, %25
  store i32 0, ptr %10, align 4
  br label %40

40:                                               ; preds = %39, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %41 = load i32, ptr %10, align 4
  switch i32 %41, label %45 [
    i32 0, label %42
  ]

42:                                               ; preds = %40
  br label %43

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %20

45:                                               ; preds = %40, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %46 = load i32, ptr %10, align 4
  switch i32 %46, label %50 [
    i32 2, label %47
    i32 1, label %48
  ]

47:                                               ; preds = %45
  store i1 false, ptr %3, align 1
  br label %48

48:                                               ; preds = %47, %45
  %49 = load i1, ptr %3, align 1
  ret i1 %49

50:                                               ; preds = %45
  unreachable
}

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 8, !5}
!12 = !{!13, !10, i64 8}
!13 = !{!"_ZTSN11__sanitizer12LoadedModule12AddressRangeE", !6, i64 0, !10, i64 8, !10, i64 16, !14, i64 24}
!14 = !{!"bool", !7, i64 0}
!15 = !{!13, !10, i64 16}


; 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.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase" = 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
define dso_local noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.__sanitizer::IntrusiveList<__sanitizer::LoadedModule::AddressRange>::IteratorBase", align 8
  %4 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11__sanitizer12LoadedModule6rangesEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %5 = tail call ptr @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  store ptr %5, ptr %3, align 8
  %6 = tail call ptr @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %7 = call noundef zeroext i1 @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EneES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr %6)
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %.critedge
  %8 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !5
  %.not = icmp ule i64 %10, %1
  %11 = getelementptr inbounds i8, ptr %8, i64 16
  %12 = load i64, ptr %11, align 8
  %13 = icmp ugt i64 %12, %1
  %or.cond = select i1 %.not, i1 %13, i1 false
  br i1 %or.cond, label %._crit_edge, label %.critedge

.critedge:                                        ; preds = %.lr.ph
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EppEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %15 = call noundef zeroext i1 @_ZNK11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EneES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr %6)
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.critedge, %.lr.ph, %2
  %.lcssa = phi i1 [ false, %2 ], [ %or.cond, %.lr.ph ], [ %or.cond, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i1 %.lcssa
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer13IntrusiveListINS_12LoadedModule12AddressRangeEE12IteratorBaseIKS2_EppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 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, !10, i64 8}
!6 = !{!"_ZTSN11__sanitizer12LoadedModule12AddressRangeE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"bool", !8, i64 0}


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