; 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::ModuleNameOwner" = type { %"class.__sanitizer::InternalMmapVector", ptr, ptr }
%"class.__sanitizer::InternalMmapVector" = type { %"class.__sanitizer::InternalMmapVectorNoCtor" }
%"class.__sanitizer::InternalMmapVectorNoCtor" = type { ptr, i64, i64 }

declare noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11__sanitizer10Symbolizer15ModuleNameOwner12GetOwnedCopyEPKc(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  %9 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 2
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZN11__sanitizer13BlockingMutex11CheckLockedEv(ptr noundef nonnull align 8 dereferenceable(88) %10)
  %11 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %23

14:                                               ; preds = %2
  %15 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef %16, ptr noundef %17)
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %23, label %20

20:                                               ; preds = %14
  %21 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  store ptr %22, ptr %3, align 8
  br label %60

23:                                               ; preds = %14, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !15
  br label %24

24:                                               ; preds = %47, %23
  %25 = load i64, ptr %6, align 8, !tbaa !15
  %26 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 0
  %27 = call noundef i64 @_ZNK11__sanitizer24InternalMmapVectorNoCtorIPKcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %28 = icmp ult i64 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %24
  store i32 2, ptr %7, align 4
  br label %50

30:                                               ; preds = %24
  %31 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 0
  %32 = load i64, ptr %6, align 8, !tbaa !15
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32)
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef %34, ptr noundef %35)
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %46, label %38

38:                                               ; preds = %30
  %39 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 0
  %40 = load i64, ptr %6, align 8, !tbaa !15
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %40)
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  store ptr %42, ptr %43, align 8, !tbaa !14
  %44 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  store ptr %45, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %50

46:                                               ; preds = %30
  br label %47

47:                                               ; preds = %46
  %48 = load i64, ptr %6, align 8, !tbaa !15
  %49 = add i64 %48, 1
  store i64 %49, ptr %6, align 8, !tbaa !15
  br label %24, !llvm.loop !16

50:                                               ; preds = %38, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %51 = load i32, ptr %7, align 4
  switch i32 %51, label %62 [
    i32 2, label %52
    i32 1, label %60
  ]

52:                                               ; preds = %50
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef %53)
  %55 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  store ptr %54, ptr %55, align 8, !tbaa !14
  %56 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 0
  %57 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  call void @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(8) %57)
  %58 = getelementptr inbounds %"class.__sanitizer::Symbolizer::ModuleNameOwner", ptr %8, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !14
  store ptr %59, ptr %3, align 8
  br label %60

60:                                               ; preds = %52, %50, %20
  %61 = load ptr, ptr %3, align 8
  ret ptr %61

62:                                               ; preds = %50
  unreachable
}

declare void @_ZN11__sanitizer13BlockingMutex11CheckLockedEv(ptr noundef nonnull align 8 dereferenceable(88)) #0

declare noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef, ptr noundef) #0

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

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

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

attributes #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 = { 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, !6, i64 32}
!10 = !{!"_ZTSN11__sanitizer10Symbolizer15ModuleNameOwnerE", !11, i64 0, !6, i64 24, !6, i64 32}
!11 = !{!"_ZTSN11__sanitizer18InternalMmapVectorIPKcEE", !12, i64 0}
!12 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorIPKcEE", !6, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 24}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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"

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11__sanitizer10Symbolizer15ModuleNameOwner12GetOwnedCopyEPKc(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  tail call void @_ZN11__sanitizer13BlockingMutex11CheckLockedEv(ptr noundef nonnull align 8 dereferenceable(88) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load ptr, ptr %5, align 8, !tbaa !13
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %11, label %7

7:                                                ; preds = %2
  %8 = tail call noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef nonnull %6, ptr noundef %1)
  %.not12 = icmp eq i32 %8, 0
  br i1 %.not12, label %9, label %11

9:                                                ; preds = %7
  %10 = load ptr, ptr %5, align 8, !tbaa !13
  br label %25

11:                                               ; preds = %7, %2
  %12 = tail call noundef i64 @_ZNK11__sanitizer24InternalMmapVectorNoCtorIPKcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not20 = icmp eq i64 %12, 0
  br i1 %.not20, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11, %16
  %.0919 = phi i64 [ %17, %16 ], [ 0, %11 ]
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.0919)
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = tail call noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef %14, ptr noundef %1)
  %.not13 = icmp eq i32 %15, 0
  br i1 %.not13, label %20, label %16

16:                                               ; preds = %.lr.ph
  %17 = add nuw i64 %.0919, 1
  %18 = tail call noundef i64 @_ZNK11__sanitizer24InternalMmapVectorNoCtorIPKcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %19 = icmp ult i64 %17, %18
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !15

20:                                               ; preds = %.lr.ph
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.0919)
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  store ptr %22, ptr %5, align 8, !tbaa !13
  br label %25

._crit_edge:                                      ; preds = %16, %11
  %23 = tail call noundef ptr @_ZN11__sanitizer15internal_strdupEPKc(ptr noundef %1)
  store ptr %23, ptr %5, align 8, !tbaa !13
  tail call void @_ZN11__sanitizer24InternalMmapVectorNoCtorIPKcE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %24 = load ptr, ptr %5, align 8, !tbaa !13
  br label %25

25:                                               ; preds = %20, %._crit_edge, %9
  %.1 = phi ptr [ %22, %20 ], [ %24, %._crit_edge ], [ %10, %9 ]
  ret ptr %.1
}

declare void @_ZN11__sanitizer13BlockingMutex11CheckLockedEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0

declare noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

attributes #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 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" }

!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, !9, i64 32}
!6 = !{!"_ZTSN11__sanitizer10Symbolizer15ModuleNameOwnerE", !7, i64 0, !9, i64 24, !9, i64 32}
!7 = !{!"_ZTSN11__sanitizer18InternalMmapVectorIPKcEE", !8, i64 0}
!8 = !{!"_ZTSN11__sanitizer24InternalMmapVectorNoCtorIPKcEE", !9, i64 0, !12, i64 8, !12, i64 16}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!6, !9, i64 24}
!14 = !{!9, !9, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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