; 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.13 = external hidden unnamed_addr constant [57 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__sanitizer17SymbolizerProcess11SendCommandEPKc(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, 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
  br label %9

9:                                                ; preds = %25, %2
  %10 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %8, i32 0, i32 5
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = icmp ult i64 %11, 5
  br i1 %12, label %13, label %29

13:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef ptr @_ZN11__sanitizer17SymbolizerProcess15SendCommandImplEPKc(ptr noundef nonnull align 8 dereferenceable(16419) %8, ptr noundef %14)
  store ptr %15, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %13
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %19, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %21

20:                                               ; preds = %13
  store i32 0, ptr %7, align 4
  br label %21

21:                                               ; preds = %20, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %22 = load i32, ptr %7, align 4
  switch i32 %22, label %38 [
    i32 0, label %23
    i32 1, label %36
  ]

23:                                               ; preds = %21
  %24 = call noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess7RestartEv(ptr noundef nonnull align 8 dereferenceable(16419) %8)
  br label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %8, i32 0, i32 5
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = add i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !9
  br label %9, !llvm.loop !14

29:                                               ; preds = %9
  %30 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %8, i32 0, i32 6
  %31 = load i8, ptr %30, align 8, !tbaa !16, !range !17, !noundef !18
  %32 = trunc i8 %31 to i1
  br i1 %32, label %35, label %33

33:                                               ; preds = %29
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef @.str.13)
  %34 = getelementptr inbounds %"class.__sanitizer::SymbolizerProcess", ptr %8, i32 0, i32 6
  store i8 1, ptr %34, align 8, !tbaa !16
  br label %35

35:                                               ; preds = %33, %29
  store ptr null, ptr %3, align 8
  br label %36

36:                                               ; preds = %35, %21
  %37 = load ptr, ptr %3, align 8
  ret ptr %37

38:                                               ; preds = %21
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11__sanitizer17SymbolizerProcess15SendCommandImplEPKc(ptr noundef nonnull align 8 dereferenceable(16419), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess7RestartEv(ptr noundef nonnull align 8 dereferenceable(16419)) #1 align 2

declare void @_ZN11__sanitizer6ReportEPKcz(ptr 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 = { 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, !12, i64 16408}
!10 = !{!"_ZTSN11__sanitizer17SymbolizerProcessE", !6, i64 8, !11, i64 16, !11, i64 20, !7, i64 24, !12, i64 16408, !13, i64 16416, !13, i64 16417, !13, i64 16418}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!10, !13, i64 16416}
!17 = !{i8 0, i8 2}
!18 = !{}


; 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.13 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11__sanitizer17SymbolizerProcess11SendCommandEPKc(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16408
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = icmp ult i64 %4, 5
  br i1 %5, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %7
  %6 = tail call noundef ptr @_ZN11__sanitizer17SymbolizerProcess15SendCommandImplEPKc(ptr noundef nonnull align 8 dereferenceable(16419) %0, ptr noundef %1)
  %.not.not = icmp eq ptr %6, null
  br i1 %.not.not, label %7, label %.loopexit

7:                                                ; preds = %.lr.ph
  %8 = tail call noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess7RestartEv(ptr noundef nonnull align 8 dereferenceable(16419) %0)
  %9 = load i64, ptr %3, align 8, !tbaa !5
  %10 = add i64 %9, 1
  store i64 %10, ptr %3, align 8, !tbaa !5
  %11 = icmp ult i64 %10, 5
  br i1 %11, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %7, %2
  %12 = getelementptr inbounds i8, ptr %0, i64 16416
  %13 = load i8, ptr %12, align 8, !tbaa !15, !range !16, !noundef !17
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %.loopexit, label %15

15:                                               ; preds = %._crit_edge
  tail call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef nonnull @.str.13)
  store i8 1, ptr %12, align 8, !tbaa !15
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %._crit_edge, %15
  %.2 = phi ptr [ null, %15 ], [ null, %._crit_edge ], [ %6, %.lr.ph ]
  ret ptr %.2
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11__sanitizer17SymbolizerProcess15SendCommandImplEPKc(ptr noundef nonnull align 8 dereferenceable(16419), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer17SymbolizerProcess7RestartEv(ptr noundef nonnull align 8 dereferenceable(16419)) local_unnamed_addr #0 align 2

declare void @_ZN11__sanitizer6ReportEPKcz(ptr 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" }

!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, !11, i64 16408}
!6 = !{!"_ZTSN11__sanitizer17SymbolizerProcessE", !7, i64 8, !10, i64 16, !10, i64 20, !8, i64 24, !11, i64 16408, !12, i64 16416, !12, i64 16417, !12, i64 16418}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!6, !12, i64 16416}
!16 = !{i8 0, i8 2}
!17 = !{}


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