; 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::SymbolizerProcess" = type <{ ptr, ptr, i32, i32, [16384 x i8], i64, i8, i8, i8, [5 x i8] }>

@.str.14 = 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess18ReadFromSymbolizerEPcm(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  %12 = load ptr, ptr %5, align 8
  %13 = load i64, ptr %7, align 8, !tbaa !9
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  store i1 true, ptr %4, align 1
  br label %58

16:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %52, %16
  br label %18

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %19 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %12, i32 0, i32 2
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load i64, ptr %8, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %21, i64 %22
  %24 = load i64, ptr %7, align 8, !tbaa !9
  %25 = load i64, ptr %8, align 8, !tbaa !9
  %26 = sub i64 %24, %25
  %27 = sub i64 %26, 1
  %28 = call noundef zeroext i1 @_ZN11__sanitizer12ReadFromFileEiPvmPmPi(i32 noundef %20, ptr noundef %23, i64 noundef %27, ptr noundef %9, ptr noundef null)
  %29 = zext i1 %28 to i8
  store i8 %29, ptr %10, align 1, !tbaa !15
  %30 = load i8, ptr %10, align 1, !tbaa !15, !range !16, !noundef !17
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %35

32:                                               ; preds = %18
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = icmp eq i64 %33, 0
  br i1 %34, label %35, label %38

35:                                               ; preds = %32, %18
  %36 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %12, i32 0, i32 2
  %37 = load i32, ptr %36, align 8, !tbaa !11
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef @.str.14, i32 noundef %37)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %50

38:                                               ; preds = %32
  %39 = load i64, ptr %9, align 8, !tbaa !9
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = add i64 %40, %39
  store i64 %41, ptr %8, align 8, !tbaa !9
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load i64, ptr %8, align 8, !tbaa !9
  %44 = load ptr, ptr %12, align 8, !tbaa !18
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef zeroext i1 %46(ptr noundef nonnull align 8 dereferenceable(16419) %12, ptr noundef %42, i64 noundef %43)
  br i1 %47, label %48, label %49

48:                                               ; preds = %38
  store i32 3, ptr %11, align 4
  br label %50

49:                                               ; preds = %38
  store i32 0, ptr %11, align 4
  br label %50

50:                                               ; preds = %49, %48, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %51 = load i32, ptr %11, align 4
  switch i32 %51, label %57 [
    i32 0, label %52
    i32 3, label %53
  ]

52:                                               ; preds = %50
  br label %17, !llvm.loop !20

53:                                               ; preds = %50
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %54, i64 %55
  store i8 0, ptr %56, align 1, !tbaa !22
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %57

57:                                               ; preds = %53, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %58

58:                                               ; preds = %57, %15
  %59 = load i1, ptr %4, align 1
  ret i1 %59
}

declare noundef zeroext i1 @_ZN11__sanitizer12ReadFromFileEiPvmPmPi(i32 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!12, !13, i64 16}
!12 = !{!"_ZTSN11__sanitizer17SymbolizerProcessE", !6, i64 8, !13, i64 16, !13, i64 20, !7, i64 24, !10, i64 16408, !14, i64 16416, !14, i64 16417, !14, i64 16418}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!7, !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.14 = external hidden unnamed_addr constant [46 x i8], align 1

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess18ReadFromSymbolizerEPcm(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca i64, align 8
  %5 = icmp eq i64 %2, 0
  br i1 %5, label %28, label %.preheader

.preheader:                                       ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store i64 0, ptr %4, align 8, !tbaa !5
  %7 = load i32, ptr %6, align 8, !tbaa !9
  %8 = add i64 %2, -1
  %9 = call noundef zeroext i1 @_ZN11__sanitizer12ReadFromFileEiPvmPmPi(i32 noundef %7, ptr noundef %1, i64 noundef %8, ptr noundef nonnull %4, ptr noundef null)
  %10 = load i64, ptr %4, align 8
  %11 = icmp ne i64 %10, 0
  %or.cond.not28 = select i1 %9, i1 %11, i1 false
  br i1 %or.cond.not28, label %.lr.ph, label %.thread

.thread:                                          ; preds = %18, %.preheader
  %12 = load i32, ptr %6, align 8, !tbaa !9
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef nonnull @.str.14, i32 noundef %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %28

.lr.ph:                                           ; preds = %.preheader, %18
  %13 = phi i64 [ %24, %18 ], [ %10, %.preheader ]
  %.01529 = phi i64 [ %14, %18 ], [ 0, %.preheader ]
  %14 = add i64 %13, %.01529
  %15 = load ptr, ptr %0, align 8, !tbaa !14
  %16 = load ptr, ptr %15, align 8
  %17 = call noundef zeroext i1 %16(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1, i64 noundef %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %17, label %26, label %18

18:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store i64 0, ptr %4, align 8, !tbaa !5
  %19 = load i32, ptr %6, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %1, i64 %14
  %21 = xor i64 %14, -1
  %22 = add i64 %21, %2
  %23 = call noundef zeroext i1 @_ZN11__sanitizer12ReadFromFileEiPvmPmPi(i32 noundef %19, ptr noundef %20, i64 noundef %22, ptr noundef nonnull %4, ptr noundef null)
  %24 = load i64, ptr %4, align 8
  %25 = icmp ne i64 %24, 0
  %or.cond.not = select i1 %23, i1 %25, i1 false
  br i1 %or.cond.not, label %.lr.ph, label %.thread

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %1, i64 %14
  store i8 0, ptr %27, align 1, !tbaa !16
  br label %28

28:                                               ; preds = %.thread, %26, %3
  %.3 = phi i1 [ true, %3 ], [ true, %26 ], [ false, %.thread ]
  ret i1 %.3
}

declare noundef zeroext i1 @_ZN11__sanitizer12ReadFromFileEiPvmPmPi(i32 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 16}
!10 = !{!"_ZTSN11__sanitizer17SymbolizerProcessE", !11, i64 8, !12, i64 16, !12, i64 20, !7, i64 24, !6, i64 16408, !13, i64 16416, !13, i64 16417, !13, i64 16418}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!7, !7, i64 0}


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