; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_common_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::CommonFlags" = type { i8, ptr, i8, ptr, i8, i8, i8, i8, i32, ptr, i8, i8, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i64, ptr, i8, i8, i8, i64, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, i8, i8, i8, i8, i8, i8, i32, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i8, i8, i8, i8, ptr }
%"struct.__sanitizer::StackTrace" = type { ptr, i32, i32 }
%"struct.__sanitizer::SymbolizedStack" = type { ptr, %"struct.__sanitizer::AddressInfo" }
%"struct.__sanitizer::AddressInfo" = type { i64, ptr, i64, ptr, i64, ptr, i32, i32 }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN11__sanitizer12common_flagsEv() #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer18ReportErrorSummaryEPKcPKNS_10StackTraceE(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = call noundef ptr @_ZN11__sanitizer12common_flagsEv()
  %8 = getelementptr inbounds %"struct.__sanitizer::CommonFlags", ptr %7, i32 0, i32 16
  %9 = load i8, ptr %8, align 1, !tbaa !9, !range !14, !noundef !15
  %10 = trunc i8 %9 to i1
  br i1 %10, label %12, label %11

11:                                               ; preds = %2
  br label %33

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.__sanitizer::StackTrace", ptr %13, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !16
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %19

17:                                               ; preds = %12
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11__sanitizer18ReportErrorSummaryEPKc(ptr noundef %18)
  br label %33

19:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.__sanitizer::StackTrace", ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !18
  %23 = getelementptr inbounds i64, ptr %22, i64 0
  %24 = load i64, ptr %23, align 8, !tbaa !19
  %25 = call noundef i64 @_ZN11__sanitizer10StackTrace24GetPreviousInstructionPcEm(i64 noundef %24)
  store i64 %25, ptr %5, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %26 = call noundef ptr @_ZN11__sanitizer10Symbolizer9GetOrInitEv()
  %27 = load i64, ptr %5, align 8, !tbaa !19
  %28 = call noundef ptr @_ZN11__sanitizer10Symbolizer11SymbolizePCEm(ptr noundef nonnull align 8 dereferenceable(200) %26, i64 noundef %27)
  store ptr %28, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.__sanitizer::SymbolizedStack", ptr %30, i32 0, i32 1
  call void @_ZN11__sanitizer18ReportErrorSummaryEPKcRKNS_11AddressInfoE(ptr noundef %29, ptr noundef nonnull align 8 dereferenceable(56) %31)
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11__sanitizer15SymbolizedStack8ClearAllEv(ptr noundef nonnull align 8 dereferenceable(64) %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %33

33:                                               ; preds = %19, %17, %11
  ret void
}

declare void @_ZN11__sanitizer18ReportErrorSummaryEPKc(ptr noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer10StackTrace24GetPreviousInstructionPcEm(i64 noundef) #4 align 2

declare noundef ptr @_ZN11__sanitizer10Symbolizer9GetOrInitEv() #3

declare noundef ptr @_ZN11__sanitizer10Symbolizer11SymbolizePCEm(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) #3

declare void @_ZN11__sanitizer18ReportErrorSummaryEPKcRKNS_11AddressInfoE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZN11__sanitizer15SymbolizedStack8ClearAllEv(ptr noundef nonnull align 8 dereferenceable(64)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 = { "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 = { alwaysinline 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 }

!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, !11, i64 59}
!10 = !{!"_ZTSN11__sanitizer11CommonFlagsE", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 33, !11, i64 34, !11, i64 35, !12, i64 36, !6, i64 40, !11, i64 48, !11, i64 49, !12, i64 52, !11, i64 56, !11, i64 57, !11, i64 58, !11, i64 59, !11, i64 60, !11, i64 61, !11, i64 62, !11, i64 63, !11, i64 64, !11, i64 65, !11, i64 66, !11, i64 67, !13, i64 72, !6, i64 80, !11, i64 88, !11, i64 89, !11, i64 90, !13, i64 96, !13, i64 104, !13, i64 112, !11, i64 120, !11, i64 121, !11, i64 122, !11, i64 123, !11, i64 124, !11, i64 125, !11, i64 126, !11, i64 127, !11, i64 128, !6, i64 136, !11, i64 144, !11, i64 145, !11, i64 146, !11, i64 147, !11, i64 148, !11, i64 149, !12, i64 152, !6, i64 160, !11, i64 168, !11, i64 169, !11, i64 170, !11, i64 171, !11, i64 172, !11, i64 173, !11, i64 174, !11, i64 175, !11, i64 176, !11, i64 177, !11, i64 178, !11, i64 179, !11, i64 180, !11, i64 181, !12, i64 184, !11, i64 188, !11, i64 189, !11, i64 190, !11, i64 191, !6, i64 192}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !12, i64 8}
!17 = !{!"_ZTSN11__sanitizer10StackTraceE", !6, i64 0, !12, i64 8, !12, i64 12}
!18 = !{!17, !6, i64 0}
!19 = !{!13, !13, 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"

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN11__sanitizer12common_flagsEv() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer18ReportErrorSummaryEPKcPKNS_10StackTraceE(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = tail call noundef ptr @_ZN11__sanitizer12common_flagsEv()
  %4 = getelementptr inbounds i8, ptr %3, i64 59
  %5 = load i8, ptr %4, align 1, !tbaa !5, !range !13, !noundef !14
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %19

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !15
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %7
  tail call void @_ZN11__sanitizer18ReportErrorSummaryEPKc(ptr noundef %0)
  br label %19

12:                                               ; preds = %7
  %13 = load ptr, ptr %1, align 8, !tbaa !17
  %14 = load i64, ptr %13, align 8, !tbaa !18
  %15 = tail call noundef i64 @_ZN11__sanitizer10StackTrace24GetPreviousInstructionPcEm(i64 noundef %14)
  %16 = tail call noundef ptr @_ZN11__sanitizer10Symbolizer9GetOrInitEv()
  %17 = tail call noundef ptr @_ZN11__sanitizer10Symbolizer11SymbolizePCEm(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %15)
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  tail call void @_ZN11__sanitizer18ReportErrorSummaryEPKcRKNS_11AddressInfoE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(56) %18)
  tail call void @_ZN11__sanitizer15SymbolizedStack8ClearAllEv(ptr noundef nonnull align 8 dereferenceable(64) %17)
  br label %19

19:                                               ; preds = %2, %12, %11
  ret void
}

declare void @_ZN11__sanitizer18ReportErrorSummaryEPKc(ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer10StackTrace24GetPreviousInstructionPcEm(i64 noundef) local_unnamed_addr #3 align 2

declare noundef ptr @_ZN11__sanitizer10Symbolizer9GetOrInitEv() local_unnamed_addr #2

declare noundef ptr @_ZN11__sanitizer10Symbolizer11SymbolizePCEm(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) local_unnamed_addr #2

declare void @_ZN11__sanitizer18ReportErrorSummaryEPKcRKNS_11AddressInfoE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

declare void @_ZN11__sanitizer15SymbolizedStack8ClearAllEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2

attributes #0 = { inlinehint 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 #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 = { alwaysinline 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, !7, i64 59}
!6 = !{!"_ZTSN11__sanitizer11CommonFlagsE", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !11, i64 36, !10, i64 40, !7, i64 48, !7, i64 49, !11, i64 52, !7, i64 56, !7, i64 57, !7, i64 58, !7, i64 59, !7, i64 60, !7, i64 61, !7, i64 62, !7, i64 63, !7, i64 64, !7, i64 65, !7, i64 66, !7, i64 67, !12, i64 72, !10, i64 80, !7, i64 88, !7, i64 89, !7, i64 90, !12, i64 96, !12, i64 104, !12, i64 112, !7, i64 120, !7, i64 121, !7, i64 122, !7, i64 123, !7, i64 124, !7, i64 125, !7, i64 126, !7, i64 127, !7, i64 128, !10, i64 136, !7, i64 144, !7, i64 145, !7, i64 146, !7, i64 147, !7, i64 148, !7, i64 149, !11, i64 152, !10, i64 160, !7, i64 168, !7, i64 169, !7, i64 170, !7, i64 171, !7, i64 172, !7, i64 173, !7, i64 174, !7, i64 175, !7, i64 176, !7, i64 177, !7, i64 178, !7, i64 179, !7, i64 180, !7, i64 181, !11, i64 184, !7, i64 188, !7, i64 189, !7, i64 190, !7, i64 191, !10, i64 192}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !11, i64 8}
!16 = !{!"_ZTSN11__sanitizer10StackTraceE", !10, i64 0, !11, i64 8, !11, i64 12}
!17 = !{!16, !10, i64 0}
!18 = !{!12, !12, i64 0}


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