; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_common)

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

@_ZN11__sanitizer17SanitizerToolNameE = external dso_local global ptr, align 8
@_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count = external hidden global i32, align 4
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11__sanitizer8RawWriteEPKc(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: noreturn
declare void @_ZN11__sanitizer3DieEv() #2

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

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

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ib(i64 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i1 noundef zeroext %4) #4 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i64 %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !11
  %13 = zext i1 %4 to i8
  store i8 %13, ptr %10, align 1, !tbaa !13
  %14 = load i8, ptr %10, align 1, !tbaa !13, !range !15, !noundef !16
  %15 = trunc i8 %14 to i1
  br i1 %15, label %19, label %16

16:                                               ; preds = %5
  %17 = load i32, ptr @_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count, align 4, !tbaa !11
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %16, %5
  call void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef @.str.8)
  call void @_ZN11__sanitizer3DieEv() #6
  unreachable

20:                                               ; preds = %16
  %21 = load i32, ptr @_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count, align 4, !tbaa !11
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr @_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count, align 4, !tbaa !11
  %23 = load ptr, ptr @_ZN11__sanitizer17SanitizerToolNameE, align 8, !tbaa !9
  %24 = load ptr, ptr %8, align 8, !tbaa !9
  %25 = load i64, ptr %6, align 8, !tbaa !5
  %26 = load i64, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = load i32, ptr %9, align 4, !tbaa !11
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef @.str.9, ptr noundef %23, ptr noundef %24, i64 noundef %25, i64 noundef %26, ptr noundef %27, i32 noundef %28)
  call void @_ZN11__sanitizer14DumpProcessMapEv()
  br label %29

29:                                               ; preds = %20
  br label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !17
  %31 = load i64, ptr %11, align 8, !tbaa !17
  %32 = load i64, ptr %12, align 8, !tbaa !17
  %33 = icmp ne i64 %31, %32
  %34 = xor i1 %33, true
  %35 = xor i1 %34, true
  %36 = xor i1 %35, true
  %37 = zext i1 %36 to i64
  %38 = call i64 @llvm.expect.i64(i64 %37, i64 0)
  %39 = icmp ne i64 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %30
  %41 = load i64, ptr %11, align 8, !tbaa !17
  %42 = load i64, ptr %12, align 8, !tbaa !17
  call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef @.str.10, i32 noundef 120, ptr noundef @.str.11, i64 noundef %41, i64 noundef %42) #6
  unreachable

43:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %44

44:                                               ; preds = %43
  call void @_ZN11__sanitizer3DieEv() #6
  unreachable

45:                                               ; No predecessors!
  unreachable
}

declare void @_ZN11__sanitizer14DumpProcessMapEv() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #5

; Function Attrs: noreturn
declare void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef, i32 noundef, ptr noundef, i64 noundef, i64 noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn "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 = { mustprogress noreturn 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { noreturn }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !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"

@_ZN11__sanitizer17SanitizerToolNameE = external dso_local local_unnamed_addr global ptr, align 8
@_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count = external hidden local_unnamed_addr global i32, align 4
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

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

; Function Attrs: noreturn
declare void @_ZN11__sanitizer3DieEv() local_unnamed_addr #1

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

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ib(i64 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #3 {
  %6 = load i32, ptr @_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count, align 4
  %7 = icmp ne i32 %6, 0
  %or.cond = select i1 %4, i1 true, i1 %7
  br i1 %or.cond, label %8, label %9

8:                                                ; preds = %5
  tail call void @_ZN11__sanitizer8RawWriteEPKc(ptr noundef nonnull @.str.8)
  tail call void @_ZN11__sanitizer3DieEv() #4
  unreachable

9:                                                ; preds = %5
  store i32 1, ptr @_ZZN11__sanitizer23ReportMmapFailureAndDieEmPKcS1_ibE15recursion_count, align 4, !tbaa !5
  %10 = load ptr, ptr @_ZN11__sanitizer17SanitizerToolNameE, align 8, !tbaa !9
  tail call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef nonnull @.str.9, ptr noundef %10, ptr noundef %2, i64 noundef %0, i64 noundef %0, ptr noundef %1, i32 noundef %3)
  tail call void @_ZN11__sanitizer14DumpProcessMapEv()
  tail call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef nonnull @.str.10, i32 noundef 120, ptr noundef nonnull @.str.11, i64 noundef 0, i64 noundef 0) #4
  unreachable
}

declare void @_ZN11__sanitizer14DumpProcessMapEv() local_unnamed_addr #2

; Function Attrs: noreturn
declare void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef, i32 noundef, ptr noundef, i64 noundef, i64 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 = { noreturn "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 = { mustprogress noreturn 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 = { noreturn }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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