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

; 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::GenericScopedLock" = type { ptr }
%"class.__sanitizer::LibIgnore" = type { %"struct.__sanitizer::atomic_uintptr_t", [128 x %"struct.__sanitizer::LibIgnore::LibCodeRange"], %"class.__sanitizer::BlockingMutex", i64, [128 x %"struct.__sanitizer::LibIgnore::Lib"] }
%"struct.__sanitizer::atomic_uintptr_t" = type { i64 }
%"struct.__sanitizer::LibIgnore::LibCodeRange" = type { i64, i64 }
%"class.__sanitizer::BlockingMutex" = type { [10 x i64], i64 }
%"struct.__sanitizer::LibIgnore::Lib" = type { ptr, ptr, ptr, i8 }

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@_ZN11__sanitizer17SanitizerToolNameE = external global ptr, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer9LibIgnore17AddIgnoredLibraryEPKc(ptr noundef nonnull align 8 dereferenceable(6248) %0, ptr noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__sanitizer::GenericScopedLock", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %10 = getelementptr inbounds %"class.__sanitizer::LibIgnore", ptr %9, i32 0, i32 2
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %10)
  %11 = getelementptr inbounds %"class.__sanitizer::LibIgnore", ptr %9, i32 0, i32 3
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = icmp uge i64 %12, 128
  br i1 %13, label %14, label %22

14:                                               ; preds = %2
  %15 = load ptr, ptr @_ZN11__sanitizer17SanitizerToolNameE, align 8, !tbaa !5
  invoke void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef @.str, ptr noundef %15, i64 noundef 128)
          to label %16 unwind label %18

16:                                               ; preds = %14
  invoke void @_ZN11__sanitizer3DieEv() #6
          to label %17 unwind label %18

17:                                               ; preds = %16
  unreachable

18:                                               ; preds = %16, %14
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %6, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %7, align 4
  br label %43

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %23 = getelementptr inbounds %"class.__sanitizer::LibIgnore", ptr %9, i32 0, i32 4
  %24 = getelementptr inbounds %"class.__sanitizer::LibIgnore", ptr %9, i32 0, i32 3
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = add i64 %25, 1
  store i64 %26, ptr %24, align 8, !tbaa !9
  %27 = getelementptr inbounds [128 x %"struct.__sanitizer::LibIgnore::Lib"], ptr %23, i64 0, i64 %25
  store ptr %27, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = invoke noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef %28)
          to label %30 unwind label %39

30:                                               ; preds = %22
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.__sanitizer::LibIgnore::Lib", ptr %31, i32 0, i32 0
  store ptr %29, ptr %32, align 8, !tbaa !14
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.__sanitizer::LibIgnore::Lib", ptr %33, i32 0, i32 1
  store ptr null, ptr %34, align 8, !tbaa !17
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.__sanitizer::LibIgnore::Lib", ptr %35, i32 0, i32 2
  store ptr null, ptr %36, align 8, !tbaa !18
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.__sanitizer::LibIgnore::Lib", ptr %37, i32 0, i32 3
  store i8 0, ptr %38, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %43

43:                                               ; preds = %39, %18
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr %6, align 8
  %46 = load i32, ptr %7, align 4
  %47 = insertvalue { ptr, i32 } poison, ptr %45, 0
  %48 = insertvalue { ptr, i32 } %47, i32 %46, 1
  resume { ptr, i32 } %48
}

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

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

declare void @_ZN11__sanitizer6ReportEPKcz(ptr noundef, ...) #2

declare i32 @__gxx_personality_v0(...)

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

declare noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef) #2

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #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, !12, i64 2144}
!10 = !{!"_ZTSN11__sanitizer9LibIgnoreE", !11, i64 0, !7, i64 8, !13, i64 2056, !12, i64 2144, !7, i64 2152}
!11 = !{!"_ZTSN11__sanitizer16atomic_uintptr_tE", !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN11__sanitizer13BlockingMutexE", !7, i64 0, !12, i64 80}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN11__sanitizer9LibIgnore3LibE", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!16 = !{!"bool", !7, i64 0}
!17 = !{!15, !6, i64 8}
!18 = !{!15, !6, i64 16}
!19 = !{!15, !16, i64 24}


; 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::GenericScopedLock" = type { ptr }
%"struct.__sanitizer::LibIgnore::Lib" = type { ptr, ptr, ptr, i8 }

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@_ZN11__sanitizer17SanitizerToolNameE = external local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer9LibIgnore17AddIgnoredLibraryEPKc(ptr noundef nonnull align 8 dereferenceable(6248) %0, ptr noundef %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__sanitizer::GenericScopedLock", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 2056
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 2144
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = icmp ugt i64 %6, 127
  br i1 %7, label %8, label %14

8:                                                ; preds = %2
  %9 = load ptr, ptr @_ZN11__sanitizer17SanitizerToolNameE, align 8, !tbaa !12
  invoke void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef nonnull @.str, ptr noundef %9, i64 noundef 128)
          to label %10 unwind label %12

10:                                               ; preds = %8
  invoke void @_ZN11__sanitizer3DieEv() #7
          to label %11 unwind label %12

11:                                               ; preds = %10
  unreachable

12:                                               ; preds = %10, %8
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %23

14:                                               ; preds = %2
  %15 = add nuw nsw i64 %6, 1
  store i64 %15, ptr %5, align 8, !tbaa !5
  %16 = invoke noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef %1)
          to label %17 unwind label %21

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 2152
  %19 = getelementptr inbounds [128 x %"struct.__sanitizer::LibIgnore::Lib"], ptr %18, i64 0, i64 %6
  store ptr %16, ptr %19, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(17) %20, i8 0, i64 17, i1 false)
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret void

21:                                               ; preds = %14
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %23

23:                                               ; preds = %21, %12
  %.pn = phi { ptr, i32 } [ %13, %12 ], [ %22, %21 ]
  call void @_ZN11__sanitizer17GenericScopedLockINS_13BlockingMutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn
}

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

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

declare void @_ZN11__sanitizer6ReportEPKcz(ptr noundef, ...) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

declare noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { 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, !8, i64 2144}
!6 = !{!"_ZTSN11__sanitizer9LibIgnoreE", !7, i64 0, !9, i64 8, !11, i64 2056, !8, i64 2144, !9, i64 2152}
!7 = !{!"_ZTSN11__sanitizer16atomic_uintptr_tE", !8, i64 0}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN11__sanitizer13BlockingMutexE", !9, i64 0, !8, i64 80}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTSN11__sanitizer9LibIgnore3LibE", !13, i64 0, !13, i64 8, !13, i64 16, !16, i64 24}
!16 = !{!"bool", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass