; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_stoptheworld_linux_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.user_regs_struct = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }

@.str.9 = external hidden unnamed_addr constant [52 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

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

declare noundef i64 @_ZN11__sanitizer15internal_ptraceEiiPvS0_(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN11__sanitizer9VerbosityEv() #2

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

; 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 noundef i32 @_ZNK11__sanitizer20SuspendedThreadsList11GetThreadIDEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11__sanitizer20SuspendedThreadsList17GetRegistersAndSPEmPmS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.user_regs_struct, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %16 = load i64, ptr %7, align 8, !tbaa !9
  %17 = call noundef i32 @_ZNK11__sanitizer20SuspendedThreadsList11GetThreadIDEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %16)
  store i32 %17, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 216, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  %18 = load i32, ptr %10, align 4, !tbaa !11
  %19 = call noundef i64 @_ZN11__sanitizer15internal_ptraceEiiPvS0_(i32 noundef 12, i32 noundef %18, ptr noundef null, ptr noundef %11)
  %20 = call noundef zeroext i1 @_ZN11__sanitizer16internal_iserrorEmPi(i64 noundef %19, ptr noundef %12)
  %21 = zext i1 %20 to i8
  store i8 %21, ptr %13, align 1, !tbaa !13
  %22 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %35

24:                                               ; preds = %4
  br label %25

25:                                               ; preds = %24
  %26 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %27 = sext i32 %26 to i64
  %28 = icmp uge i64 %27, 1
  br i1 %28, label %29, label %32

29:                                               ; preds = %25
  %30 = load i32, ptr %10, align 4, !tbaa !11
  %31 = load i32, ptr %12, align 4, !tbaa !11
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef @.str.9, i32 noundef %30, i32 noundef %31)
  br label %32

32:                                               ; preds = %29, %25
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %41

35:                                               ; preds = %4
  %36 = getelementptr inbounds %struct.user_regs_struct, ptr %11, i32 0, i32 19
  %37 = load i64, ptr %36, align 8, !tbaa !17
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %37, ptr %38, align 8, !tbaa !9
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef ptr @_ZN11__sanitizer15internal_memcpyEPvPKvm(ptr noundef %39, ptr noundef %11, i64 noundef 216)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %41

41:                                               ; preds = %35, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %42 = load i32, ptr %5, align 4
  ret i32 %42
}

declare noundef ptr @_ZN11__sanitizer15internal_memcpyEPvPKvm(ptr noundef, ptr noundef, i64 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 = { inlinehint 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 = { 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 #4 = { 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, !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, !19, i64 152}
!18 = !{!"_ZTS16user_regs_struct", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !19, i64 120, !19, i64 128, !19, i64 136, !19, i64 144, !19, i64 152, !19, i64 160, !19, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !19, i64 200, !19, i64 208}
!19 = !{!"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"

%struct.user_regs_struct = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }

@.str.9 = external hidden unnamed_addr constant [52 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

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

declare noundef i64 @_ZN11__sanitizer15internal_ptraceEiiPvS0_(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN11__sanitizer9VerbosityEv() local_unnamed_addr #2

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

; Function Attrs: mustprogress 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 noundef i32 @_ZNK11__sanitizer20SuspendedThreadsList11GetThreadIDEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZNK11__sanitizer20SuspendedThreadsList17GetRegistersAndSPEmPmS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, ptr noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %struct.user_regs_struct, align 8
  %6 = alloca i32, align 4
  %7 = tail call noundef i32 @_ZNK11__sanitizer20SuspendedThreadsList11GetThreadIDEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %8 = call noundef i64 @_ZN11__sanitizer15internal_ptraceEiiPvS0_(i32 noundef 12, i32 noundef %7, ptr noundef null, ptr noundef nonnull %5)
  %9 = call noundef zeroext i1 @_ZN11__sanitizer16internal_iserrorEmPi(i64 noundef %8, ptr noundef nonnull %6)
  br i1 %9, label %10, label %14

10:                                               ; preds = %4
  %11 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %18, label %12

12:                                               ; preds = %10
  %13 = load i32, ptr %6, align 4, !tbaa !5
  call void (ptr, ...) @_ZN11__sanitizer6ReportEPKcz(ptr noundef nonnull @.str.9, i32 noundef %7, i32 noundef %13)
  br label %18

14:                                               ; preds = %4
  %15 = getelementptr inbounds i8, ptr %5, i64 152
  %16 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %16, ptr %3, align 8, !tbaa !12
  %17 = call noundef ptr @_ZN11__sanitizer15internal_memcpyEPvPKvm(ptr noundef %2, ptr noundef nonnull %5, i64 noundef 216)
  br label %18

18:                                               ; preds = %10, %12, %14
  %.0 = phi i32 [ 0, %14 ], [ -1, %12 ], [ -1, %10 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %5) #4
  ret i32 %.0
}

declare noundef ptr @_ZN11__sanitizer15internal_memcpyEPvPKvm(ptr noundef, ptr noundef, i64 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 = { inlinehint 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 = { 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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 152}
!10 = !{!"_ZTS16user_regs_struct", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208}
!11 = !{!"long long", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}


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