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

; 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 [113 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [46 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 void @_ZN11__sanitizer10Symbolizer8AddHooksEPFvvES2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1, ptr noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  br label %10

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %11 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 5
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %18

14:                                               ; preds = %10
  %15 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 6
  %16 = load ptr, ptr %15, align 8, !tbaa !21
  %17 = icmp eq ptr %16, null
  br label %18

18:                                               ; preds = %14, %10
  %19 = phi i1 [ false, %10 ], [ %17, %14 ]
  %20 = zext i1 %19 to i64
  store i64 %20, ptr %7, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !22
  %21 = load i64, ptr %7, align 8, !tbaa !22
  %22 = load i64, ptr %8, align 8, !tbaa !22
  %23 = icmp ne i64 %21, %22
  %24 = xor i1 %23, true
  %25 = xor i1 %24, true
  %26 = xor i1 %25, true
  %27 = zext i1 %26 to i64
  %28 = call i64 @llvm.expect.i64(i64 %27, i64 0)
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %18
  %31 = load i64, ptr %7, align 8, !tbaa !22
  %32 = load i64, ptr %8, align 8, !tbaa !22
  call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef @.str, i32 noundef 74, ptr noundef @.str.1, i64 noundef %31, i64 noundef %32) #5
  unreachable

33:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 5
  store ptr %35, ptr %36, align 8, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.__sanitizer::Symbolizer", ptr %9, i32 0, i32 6
  store ptr %37, ptr %38, align 8, !tbaa !21
  ret void
}

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

; Function Attrs: noreturn
declare void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef, i32 noundef, ptr noundef, i64 noundef, i64 noundef) #3

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { 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, !6, i64 184}
!10 = !{!"_ZTSN11__sanitizer10SymbolizerE", !11, i64 0, !15, i64 40, !18, i64 64, !19, i64 72, !20, i64 160, !6, i64 184, !6, i64 192}
!11 = !{!"_ZTSN11__sanitizer10Symbolizer15ModuleNameOwnerE", !12, i64 0, !6, i64 24, !6, i64 32}
!12 = !{!"_ZTSN11__sanitizer18InternalMmapVectorIPKcEE", !13, i64 0}
!13 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorIPKcEE", !6, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN11__sanitizer13ListOfModulesE", !16, i64 0}
!16 = !{!"_ZTSN11__sanitizer18InternalMmapVectorINS_12LoadedModuleEEE", !17, i64 0}
!17 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorINS_12LoadedModuleEEE", !6, i64 0, !14, i64 8, !14, i64 16}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN11__sanitizer13BlockingMutexE", !7, i64 0, !14, i64 80}
!20 = !{!"_ZTSN11__sanitizer13IntrusiveListINS_14SymbolizerToolEEE", !14, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!10, !6, i64 192}
!22 = !{!23, !23, i64 0}
!23 = !{!"long long", !7, i64 0}


; 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 [113 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer10Symbolizer8AddHooksEPFvvES2_(ptr nocapture noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 184
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  %7 = getelementptr inbounds i8, ptr %0, i64 192
  %8 = load ptr, ptr %7, align 8
  %9 = icmp eq ptr %8, null
  %10 = select i1 %6, i1 %9, i1 false
  br i1 %10, label %12, label %11, !prof !20

11:                                               ; preds = %3
  tail call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef nonnull @.str, i32 noundef 74, ptr noundef nonnull @.str.1, i64 noundef 0, i64 noundef 0) #2
  unreachable

12:                                               ; preds = %3
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !21
  ret void
}

; Function Attrs: noreturn
declare void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef, i32 noundef, ptr noundef, i64 noundef, 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 = { 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 #2 = { 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, !10, i64 184}
!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 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!21 = !{!6, !10, i64 192}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass