; 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"

%"struct.__sanitizer::DataInfo" = type { ptr, i64, ptr, i64, ptr, i64, i64 }

; 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
declare dso_local void @_ZN11__sanitizer24ParseSymbolizeDataOutputEPKcPNS_8DataInfoE(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11__sanitizer14LLVMSymbolizer11SendCommandEbPKcm(ptr noundef nonnull align 8 dereferenceable(16408), i1 noundef zeroext, ptr noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer14LLVMSymbolizer13SymbolizeDataEmPNS_8DataInfoE(ptr noundef nonnull align 8 dereferenceable(16408) %0, i64 noundef %1, ptr noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  %11 = load ptr, ptr %7, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.__sanitizer::DataInfo", ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.__sanitizer::DataInfo", ptr %14, i32 0, i32 1
  %16 = load i64, ptr %15, align 8, !tbaa !13
  %17 = call noundef ptr @_ZN11__sanitizer14LLVMSymbolizer11SendCommandEbPKcm(ptr noundef nonnull align 8 dereferenceable(16408) %10, i1 noundef zeroext true, ptr noundef %13, i64 noundef %16)
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %32

20:                                               ; preds = %3
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11__sanitizer24ParseSymbolizeDataOutputEPKcPNS_8DataInfoE(ptr noundef %21, ptr noundef %22)
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.__sanitizer::DataInfo", ptr %24, i32 0, i32 1
  %26 = load i64, ptr %25, align 8, !tbaa !13
  %27 = sub i64 %23, %26
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.__sanitizer::DataInfo", ptr %28, i32 0, i32 5
  %30 = load i64, ptr %29, align 8, !tbaa !14
  %31 = add i64 %30, %27
  store i64 %31, ptr %29, align 8, !tbaa !14
  store i1 true, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %33

32:                                               ; preds = %3
  store i32 0, ptr %9, align 4
  br label %33

33:                                               ; preds = %32, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  %34 = load i32, ptr %9, align 4
  switch i32 %34, label %38 [
    i32 0, label %35
    i32 1, label %36
  ]

35:                                               ; preds = %33
  store i1 false, ptr %4, align 1
  br label %36

36:                                               ; preds = %35, %33
  %37 = load i1, ptr %4, align 1
  ret i1 %37

38:                                               ; preds = %33
  unreachable
}

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 = { 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, !6, i64 0}
!12 = !{!"_ZTSN11__sanitizer8DataInfoE", !6, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !10, i64 48}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 40}


; 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"

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11__sanitizer24ParseSymbolizeDataOutputEPKcPNS_8DataInfoE(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11__sanitizer14LLVMSymbolizer11SendCommandEbPKcm(ptr noundef nonnull align 8 dereferenceable(16408), i1 noundef zeroext, ptr noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer14LLVMSymbolizer13SymbolizeDataEmPNS_8DataInfoE(ptr noundef nonnull align 8 dereferenceable(16408) %0, i64 noundef %1, ptr noundef %2) unnamed_addr #0 align 2 {
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  %6 = load i64, ptr %5, align 8, !tbaa !11
  %7 = tail call noundef ptr @_ZN11__sanitizer14LLVMSymbolizer11SendCommandEbPKcm(ptr noundef nonnull align 8 dereferenceable(16408) %0, i1 noundef zeroext true, ptr noundef %4, i64 noundef %6)
  %.not = icmp ne ptr %7, null
  br i1 %.not, label %8, label %14

8:                                                ; preds = %3
  tail call void @_ZN11__sanitizer24ParseSymbolizeDataOutputEPKcPNS_8DataInfoE(ptr noundef nonnull %7, ptr noundef nonnull %2)
  %9 = load i64, ptr %5, align 8, !tbaa !11
  %10 = sub i64 %1, %9
  %11 = getelementptr inbounds i8, ptr %2, i64 40
  %12 = load i64, ptr %11, align 8, !tbaa !12
  %13 = add i64 %10, %12
  store i64 %13, ptr %11, align 8, !tbaa !12
  br label %14

14:                                               ; preds = %3, %8
  ret i1 %.not
}

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

!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, !7, i64 0}
!6 = !{!"_ZTSN11__sanitizer8DataInfoE", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !10, i64 40}


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