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

; 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::Symbolizer" = type { %"class.__sanitizer::Symbolizer::ModuleNameOwner", %"class.__sanitizer::ListOfModules", i8, %"class.__sanitizer::BlockingMutex", %"struct.__sanitizer::IntrusiveList", ptr, ptr }
%"class.__sanitizer::Symbolizer::ModuleNameOwner" = type { %"class.__sanitizer::InternalMmapVector", ptr, ptr }
%"class.__sanitizer::InternalMmapVector" = type { %"class.__sanitizer::InternalMmapVectorNoCtor" }
%"class.__sanitizer::InternalMmapVectorNoCtor" = type { ptr, i64, i64 }
%"class.__sanitizer::ListOfModules" = type { %"class.__sanitizer::InternalMmapVector.0" }
%"class.__sanitizer::InternalMmapVector.0" = type { %"class.__sanitizer::InternalMmapVectorNoCtor.1" }
%"class.__sanitizer::InternalMmapVectorNoCtor.1" = type { ptr, i64, i64 }
%"class.__sanitizer::BlockingMutex" = type { [10 x i64], i64 }
%"struct.__sanitizer::IntrusiveList" = type { i64, ptr, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1

; 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 ptr @_ZN11__sanitizer10Symbolizer20FindModuleForAddressEm(ptr noundef nonnull align 8 dereferenceable(200) %0, i64 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %9 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !11
  %10 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 2
  %11 = load i8, ptr %10, align 8, !tbaa !13, !range !23, !noundef !24
  %12 = trunc i8 %11 to i1
  br i1 %12, label %30, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 1
  call void @_ZN11__sanitizer13ListOfModules4initEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  br label %15

15:                                               ; preds = %13
  %16 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 1
  %17 = call noundef i64 @_ZNK11__sanitizer13ListOfModules4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = icmp ugt i64 %17, 0
  %19 = xor i1 %18, true
  %20 = xor i1 %19, true
  %21 = xor i1 %20, true
  %22 = zext i1 %21 to i64
  %23 = call i64 @llvm.expect.i64(i64 %22, i64 0)
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %15
  call void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef @.str)
  call void @_ZN11__sanitizer3DieEv() #6
  unreachable

26:                                               ; preds = %15
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 2
  store i8 1, ptr %29, align 8, !tbaa !13
  store i8 1, ptr %6, align 1, !tbaa !11
  br label %30

30:                                               ; preds = %28, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %48, %30
  %32 = load i64, ptr %7, align 8, !tbaa !9
  %33 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 1
  %34 = call noundef i64 @_ZNK11__sanitizer13ListOfModules4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33)
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  store i32 4, ptr %8, align 4
  br label %51

37:                                               ; preds = %31
  %38 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 1
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11__sanitizer13ListOfModulesixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %39)
  %41 = load i64, ptr %5, align 8, !tbaa !9
  %42 = call noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40) %40, i64 noundef %41)
  br i1 %42, label %43, label %47

43:                                               ; preds = %37
  %44 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 1
  %45 = load i64, ptr %7, align 8, !tbaa !9
  %46 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11__sanitizer13ListOfModulesixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %45)
  store ptr %46, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %51

47:                                               ; preds = %37
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %7, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %7, align 8, !tbaa !9
  br label %31, !llvm.loop !25

51:                                               ; preds = %43, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %52 = load i32, ptr %8, align 4
  switch i32 %52, label %61 [
    i32 4, label %53
  ]

53:                                               ; preds = %51
  %54 = load i8, ptr %6, align 1, !tbaa !11, !range !23, !noundef !24
  %55 = trunc i8 %54 to i1
  br i1 %55, label %60, label %56

56:                                               ; preds = %53
  %57 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 2
  store i8 0, ptr %57, align 8, !tbaa !13
  %58 = load i64, ptr %5, align 8, !tbaa !9
  %59 = call noundef ptr @_ZN11__sanitizer10Symbolizer20FindModuleForAddressEm(ptr noundef nonnull align 8 dereferenceable(200) %9, i64 noundef %58)
  store ptr %59, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %61

60:                                               ; preds = %53
  store ptr null, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %61

61:                                               ; preds = %60, %56, %51
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  %62 = load ptr, ptr %3, align 8
  ret ptr %62
}

declare void @_ZN11__sanitizer13ListOfModules4initEv(ptr noundef nonnull align 8 dereferenceable(24)) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

declare void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef) #2

; Function Attrs: noreturn
declare void @_ZN11__sanitizer3DieEv() #4

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

declare noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #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 = { "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 nosync nounwind willreturn memory(none) }
attributes #4 = { noreturn "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 }
attributes #6 = { noreturn }

!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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 64}
!14 = !{!"_ZTSN11__sanitizer10SymbolizerE", !15, i64 0, !18, i64 40, !12, i64 64, !21, i64 72, !22, i64 160, !6, i64 184, !6, i64 192}
!15 = !{!"_ZTSN11__sanitizer10Symbolizer15ModuleNameOwnerE", !16, i64 0, !6, i64 24, !6, i64 32}
!16 = !{!"_ZTSN11__sanitizer18InternalMmapVectorIPKcEE", !17, i64 0}
!17 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorIPKcEE", !6, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"_ZTSN11__sanitizer13ListOfModulesE", !19, i64 0}
!19 = !{!"_ZTSN11__sanitizer18InternalMmapVectorINS_12LoadedModuleEEE", !20, i64 0}
!20 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorINS_12LoadedModuleEEE", !6, i64 0, !10, i64 8, !10, i64 16}
!21 = !{!"_ZTSN11__sanitizer13BlockingMutexE", !7, i64 0, !10, i64 80}
!22 = !{!"_ZTSN11__sanitizer13IntrusiveListINS_14SymbolizerToolEEE", !10, i64 0, !6, i64 8, !6, i64 16}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !26}
!26 = !{!"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"

@.str = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11__sanitizer10Symbolizer20FindModuleForAddressEm(ptr noundef nonnull align 8 dereferenceable(200) %0, i64 noundef %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %.pre = load i8, ptr %3, align 8, !tbaa !5, !range !20
  %5 = trunc nuw i8 %.pre to i1
  br label %tailrecurse

tailrecurse:                                      ; preds = %19, %2
  %6 = phi i1 [ false, %19 ], [ %5, %2 ]
  br i1 %6, label %11, label %7

7:                                                ; preds = %tailrecurse
  tail call void @_ZN11__sanitizer13ListOfModules4initEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %8 = tail call noundef i64 @_ZNK11__sanitizer13ListOfModules4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %9, label %10, !prof !21

9:                                                ; preds = %7
  tail call void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef nonnull @.str)
  tail call void @_ZN11__sanitizer3DieEv() #3
  unreachable

10:                                               ; preds = %7
  store i8 1, ptr %3, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %10, %tailrecurse
  %12 = tail call noundef i64 @_ZNK11__sanitizer13ListOfModules4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not1221 = icmp eq i64 %12, 0
  br i1 %.not1221, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11, %16
  %.0922 = phi i64 [ %17, %16 ], [ 0, %11 ]
  %13 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11__sanitizer13ListOfModulesixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.0922)
  %14 = tail call noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %1)
  br i1 %14, label %.thread, label %16

.thread:                                          ; preds = %.lr.ph
  %15 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11__sanitizer13ListOfModulesixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.0922)
  br label %.loopexit

16:                                               ; preds = %.lr.ph
  %17 = add nuw i64 %.0922, 1
  %18 = tail call noundef i64 @_ZNK11__sanitizer13ListOfModules4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not12.not = icmp ult i64 %17, %18
  br i1 %.not12.not, label %.lr.ph, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %16, %11
  br i1 %6, label %19, label %.loopexit

19:                                               ; preds = %._crit_edge
  store i8 0, ptr %3, align 8, !tbaa !5
  br label %tailrecurse

.loopexit:                                        ; preds = %._crit_edge, %.thread
  %.1 = phi ptr [ %15, %.thread ], [ null, %._crit_edge ]
  ret ptr %.1
}

declare void @_ZN11__sanitizer13ListOfModules4initEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

declare void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn
declare void @_ZN11__sanitizer3DieEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11__sanitizer13ListOfModulesixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZNK11__sanitizer12LoadedModule15containsAddressEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1

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 = { "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 = { noreturn "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 = { noreturn }

!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, !17, i64 64}
!6 = !{!"_ZTSN11__sanitizer10SymbolizerE", !7, i64 0, !14, i64 40, !17, i64 64, !18, i64 72, !19, i64 160, !10, i64 184, !10, i64 192}
!7 = !{!"_ZTSN11__sanitizer10Symbolizer15ModuleNameOwnerE", !8, i64 0, !10, i64 24, !10, i64 32}
!8 = !{!"_ZTSN11__sanitizer18InternalMmapVectorIPKcEE", !9, i64 0}
!9 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorIPKcEE", !10, i64 0, !13, i64 8, !13, i64 16}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSN11__sanitizer13ListOfModulesE", !15, i64 0}
!15 = !{!"_ZTSN11__sanitizer18InternalMmapVectorINS_12LoadedModuleEEE", !16, i64 0}
!16 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorINS_12LoadedModuleEEE", !10, i64 0, !13, i64 8, !13, i64 16}
!17 = !{!"bool", !11, i64 0}
!18 = !{!"_ZTSN11__sanitizer13BlockingMutexE", !11, i64 0, !13, i64 80}
!19 = !{!"_ZTSN11__sanitizer13IntrusiveListINS_14SymbolizerToolEEE", !13, i64 0, !10, i64 8, !10, i64 16}
!20 = !{i8 0, i8 2}
!21 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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