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

; 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::DDCallback" = type { ptr, ptr, ptr }
%"struct.__sanitizer::DD" = type <{ %"struct.__sanitizer::DDetector", %"class.__sanitizer::SpinMutex", [7 x i8], %"class.__sanitizer::DeadlockDetector", %"struct.__sanitizer::DDFlags", [7 x i8] }>
%"struct.__sanitizer::DDetector" = type { ptr }
%"class.__sanitizer::SpinMutex" = type { %"class.__sanitizer::StaticSpinMutex" }
%"class.__sanitizer::StaticSpinMutex" = type { %"struct.__sanitizer::atomic_uint8_t" }
%"struct.__sanitizer::atomic_uint8_t" = type { i8 }
%"class.__sanitizer::DeadlockDetector" = type { i64, %"class.__sanitizer::TwoLevelBitVector", %"class.__sanitizer::TwoLevelBitVector", %"class.__sanitizer::TwoLevelBitVector", %"class.__sanitizer::BVGraph", [4096 x i64], [131072 x %"struct.__sanitizer::DeadlockDetector<__sanitizer::TwoLevelBitVector<>>::Edge"], i64 }
%"class.__sanitizer::TwoLevelBitVector" = type { [1 x %"class.__sanitizer::BasicBitVector"], [1 x [64 x %"class.__sanitizer::BasicBitVector"]] }
%"class.__sanitizer::BasicBitVector" = type { i64 }
%"class.__sanitizer::BVGraph" = type { [4096 x %"class.__sanitizer::TwoLevelBitVector"], %"class.__sanitizer::TwoLevelBitVector", %"class.__sanitizer::TwoLevelBitVector" }
%"struct.__sanitizer::DeadlockDetector<__sanitizer::TwoLevelBitVector<>>::Edge" = type { i16, i16, i32, i32, i32 }
%"struct.__sanitizer::DDFlags" = type { i8 }
%"struct.__sanitizer::DDLogicalThread" = type <{ i64, %"class.__sanitizer::DeadlockDetectorTLS", %"struct.__sanitizer::DDReport", i8, [7 x i8] }>
%"class.__sanitizer::DeadlockDetectorTLS" = type { %"class.__sanitizer::TwoLevelBitVector", i64, [64 x i64], i64, [64 x %"struct.__sanitizer::DeadlockDetectorTLS<__sanitizer::TwoLevelBitVector<>>::LockWithContext"], i64 }
%"struct.__sanitizer::DeadlockDetectorTLS<__sanitizer::TwoLevelBitVector<>>::LockWithContext" = type { i32, i32 }
%"struct.__sanitizer::DDReport" = type { i32, [20 x %struct.anon] }
%struct.anon = type { i64, i64, i64, [2 x i32] }
%"struct.__sanitizer::DDMutex" = type { i64, i32, i64 }

@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [121 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 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 void @_ZN11__sanitizer2DD14ReportDeadlockEPNS_10DDCallbackEPNS_7DDMutexE(ptr noundef nonnull align 8 dereferenceable(4262473) %0, ptr noundef %1, ptr noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca [20 x i64], align 16
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.__sanitizer::DDCallback", ptr %23, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  store ptr %25, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %26 = getelementptr inbounds %"struct.__sanitizer::DD", ptr %22, i32 0, i32 3
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.__sanitizer::DDLogicalThread", ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.__sanitizer::DDMutex", ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds [20 x i64], ptr %8, i64 0, i64 0
  %33 = call noundef i64 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE14findPathToLockEPNS_19DeadlockDetectorTLSIS4_EEmPmm(ptr noundef nonnull align 8 dereferenceable(4262456) %26, ptr noundef %28, i64 noundef %31, ptr noundef %32, i64 noundef 20)
  store i64 %33, ptr %9, align 8, !tbaa !16
  %34 = load i64, ptr %9, align 8, !tbaa !16
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %3
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.1)
  store i32 1, ptr %10, align 4
  br label %137

37:                                               ; preds = %3
  br label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.__sanitizer::DDMutex", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !11
  store i64 %41, ptr %11, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %42 = getelementptr inbounds [20 x i64], ptr %8, i64 0, i64 0
  %43 = load i64, ptr %42, align 16, !tbaa !16
  store i64 %43, ptr %12, align 8, !tbaa !17
  %44 = load i64, ptr %11, align 8, !tbaa !17
  %45 = load i64, ptr %12, align 8, !tbaa !17
  %46 = icmp eq i64 %44, %45
  %47 = xor i1 %46, true
  %48 = xor i1 %47, true
  %49 = xor i1 %48, true
  %50 = zext i1 %49 to i64
  %51 = call i64 @llvm.expect.i64(i64 %50, i64 0)
  %52 = icmp ne i64 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %38
  %54 = load i64, ptr %11, align 8, !tbaa !17
  %55 = load i64, ptr %12, align 8, !tbaa !17
  call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef @.str.2, i32 noundef 129, ptr noundef @.str.3, i64 noundef %54, i64 noundef %55) #7
  unreachable

56:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.__sanitizer::DDLogicalThread", ptr %59, i32 0, i32 3
  store i8 1, ptr %60, align 8, !tbaa !18
  %61 = load i64, ptr %9, align 8, !tbaa !16
  %62 = call noundef i64 @_ZN11__sanitizer3MinImEET_S1_S1_(i64 noundef %61, i64 noundef 20)
  store i64 %62, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.__sanitizer::DDLogicalThread", ptr %63, i32 0, i32 2
  store ptr %64, ptr %13, align 8, !tbaa !5
  %65 = load i64, ptr %9, align 8, !tbaa !16
  %66 = trunc i64 %65 to i32
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %67, i32 0, i32 0
  store i32 %66, ptr %68, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !16
  br label %69

69:                                               ; preds = %133, %58
  %70 = load i64, ptr %14, align 8, !tbaa !16
  %71 = load i64, ptr %9, align 8, !tbaa !16
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %136

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %75 = load i64, ptr %14, align 8, !tbaa !16
  %76 = getelementptr inbounds [20 x i64], ptr %8, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !16
  store i64 %77, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %78 = load i64, ptr %14, align 8, !tbaa !16
  %79 = add i64 %78, 1
  %80 = load i64, ptr %9, align 8, !tbaa !16
  %81 = urem i64 %79, %80
  %82 = getelementptr inbounds [20 x i64], ptr %8, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !16
  store i64 %83, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %84 = getelementptr inbounds %"struct.__sanitizer::DD", ptr %22, i32 0, i32 3
  %85 = load i64, ptr %15, align 8, !tbaa !16
  %86 = call noundef i64 @_ZNK11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE7getDataEm(ptr noundef nonnull align 8 dereferenceable(4262456) %84, i64 noundef %85)
  %87 = inttoptr i64 %86 to ptr
  store ptr %87, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %88 = getelementptr inbounds %"struct.__sanitizer::DD", ptr %22, i32 0, i32 3
  %89 = load i64, ptr %16, align 8, !tbaa !16
  %90 = call noundef i64 @_ZNK11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE7getDataEm(ptr noundef nonnull align 8 dereferenceable(4262456) %88, i64 noundef %89)
  %91 = inttoptr i64 %90 to ptr
  store ptr %91, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 -1, ptr %19, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 -1, ptr %20, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !25
  %92 = getelementptr inbounds %"struct.__sanitizer::DD", ptr %22, i32 0, i32 3
  %93 = load i64, ptr %15, align 8, !tbaa !16
  %94 = load i64, ptr %16, align 8, !tbaa !16
  %95 = call noundef zeroext i1 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE8findEdgeEmmPjS6_Pi(ptr noundef nonnull align 8 dereferenceable(4262456) %92, i64 noundef %93, i64 noundef %94, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %96 = load i32, ptr %21, align 4, !tbaa !25
  %97 = sext i32 %96 to i64
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %98, i32 0, i32 1
  %100 = load i64, ptr %14, align 8, !tbaa !16
  %101 = getelementptr inbounds [20 x %struct.anon], ptr %99, i64 0, i64 %100
  %102 = getelementptr inbounds %struct.anon, ptr %101, i32 0, i32 0
  store i64 %97, ptr %102, align 8, !tbaa !26
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.__sanitizer::DDMutex", ptr %103, i32 0, i32 2
  %105 = load i64, ptr %104, align 8, !tbaa !28
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %106, i32 0, i32 1
  %108 = load i64, ptr %14, align 8, !tbaa !16
  %109 = getelementptr inbounds [20 x %struct.anon], ptr %107, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.anon, ptr %109, i32 0, i32 1
  store i64 %105, ptr %110, align 8, !tbaa !29
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.__sanitizer::DDMutex", ptr %111, i32 0, i32 2
  %113 = load i64, ptr %112, align 8, !tbaa !28
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %114, i32 0, i32 1
  %116 = load i64, ptr %14, align 8, !tbaa !16
  %117 = getelementptr inbounds [20 x %struct.anon], ptr %115, i64 0, i64 %116
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 2
  store i64 %113, ptr %118, align 8, !tbaa !30
  %119 = load i32, ptr %20, align 4, !tbaa !25
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %120, i32 0, i32 1
  %122 = load i64, ptr %14, align 8, !tbaa !16
  %123 = getelementptr inbounds [20 x %struct.anon], ptr %121, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.anon, ptr %123, i32 0, i32 3
  %125 = getelementptr inbounds [2 x i32], ptr %124, i64 0, i64 0
  store i32 %119, ptr %125, align 8, !tbaa !25
  %126 = load i32, ptr %19, align 4, !tbaa !25
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.__sanitizer::DDReport", ptr %127, i32 0, i32 1
  %129 = load i64, ptr %14, align 8, !tbaa !16
  %130 = getelementptr inbounds [20 x %struct.anon], ptr %128, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.anon, ptr %130, i32 0, i32 3
  %132 = getelementptr inbounds [2 x i32], ptr %131, i64 0, i64 1
  store i32 %126, ptr %132, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %133

133:                                              ; preds = %74
  %134 = load i64, ptr %14, align 8, !tbaa !16
  %135 = add i64 %134, 1
  store i64 %135, ptr %14, align 8, !tbaa !16
  br label %69, !llvm.loop !31

136:                                              ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  store i32 0, ptr %10, align 4
  br label %137

137:                                              ; preds = %136, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %138 = load i32, ptr %10, align 4
  switch i32 %138, label %140 [
    i32 0, label %139
    i32 1, label %139
  ]

139:                                              ; preds = %137, %137
  ret void

140:                                              ; preds = %137
  unreachable
}

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

declare void @_ZN11__sanitizer6PrintfEPKcz(ptr noundef, ...) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer3MinImEET_S1_S1_(i64 noundef, i64 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE8findEdgeEmmPjS6_Pi(ptr noundef nonnull align 8 dereferenceable(4262456), i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1 align 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTSN11__sanitizer10DDCallbackE", !6, i64 8, !6, i64 16}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11__sanitizer7DDMutexE", !13, i64 0, !14, i64 8, !15, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!13, !13, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!19, !23, i64 2224}
!19 = !{!"_ZTSN11__sanitizer15DDLogicalThreadE", !15, i64 0, !20, i64 8, !22, i64 1576, !23, i64 2224}
!20 = !{!"_ZTSN11__sanitizer19DeadlockDetectorTLSINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEEE", !21, i64 0, !13, i64 520, !7, i64 528, !13, i64 1040, !7, i64 1048, !13, i64 1560}
!21 = !{!"_ZTSN11__sanitizer17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEE", !7, i64 0, !7, i64 8}
!22 = !{!"_ZTSN11__sanitizer8DDReportE", !14, i64 0, !7, i64 8}
!23 = !{!"bool", !7, i64 0}
!24 = !{!22, !14, i64 0}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !15, i64 0}
!27 = !{!"_ZTSN11__sanitizer8DDReportUt0_E", !15, i64 0, !15, i64 8, !15, i64 16, !7, i64 24}
!28 = !{!12, !15, i64 16}
!29 = !{!27, !15, i64 8}
!30 = !{!27, !15, i64 16}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


; 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.anon = type { i64, i64, i64, [2 x i32] }

@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [121 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 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

; 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
define dso_local void @_ZN11__sanitizer2DD14ReportDeadlockEPNS_10DDCallbackEPNS_7DDMutexE(ptr noundef nonnull align 8 dereferenceable(4262473) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #1 align 2 {
  %4 = alloca [20 x i64], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %4) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = getelementptr inbounds i8, ptr %9, i64 8
  %12 = load i64, ptr %2, align 8, !tbaa !10
  %13 = call noundef i64 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE14findPathToLockEPNS_19DeadlockDetectorTLSIS4_EEmPmm(ptr noundef nonnull align 8 dereferenceable(4262456) %10, ptr noundef nonnull %11, i64 noundef %12, ptr noundef nonnull %4, i64 noundef 20)
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.1)
  br label %.loopexit

16:                                               ; preds = %3
  %17 = load i64, ptr %2, align 8, !tbaa !10
  %18 = load i64, ptr %4, align 16, !tbaa !15
  %.not = icmp eq i64 %17, %18
  br i1 %.not, label %20, label %19, !prof !16

19:                                               ; preds = %16
  call void @_ZN11__sanitizer11CheckFailedEPKciS1_yy(ptr noundef nonnull @.str.2, i32 noundef 129, ptr noundef nonnull @.str.3, i64 noundef %17, i64 noundef %18) #6
  unreachable

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %9, i64 2224
  store i8 1, ptr %21, align 8, !tbaa !17
  %22 = call noundef i64 @_ZN11__sanitizer3MinImEET_S1_S1_(i64 noundef %13, i64 noundef 20)
  %23 = getelementptr inbounds i8, ptr %9, i64 1576
  %24 = trunc i64 %22 to i32
  store i32 %24, ptr %23, align 8, !tbaa !23
  %.not39 = icmp eq i64 %22, 0
  br i1 %.not39, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %20
  %25 = getelementptr inbounds i8, ptr %9, i64 1584
  br label %26

26:                                               ; preds = %.lr.ph, %26
  %.038 = phi i64 [ 0, %.lr.ph ], [ %29, %26 ]
  %27 = getelementptr inbounds [20 x i64], ptr %4, i64 0, i64 %.038
  %28 = load i64, ptr %27, align 8, !tbaa !15
  %29 = add nuw i64 %.038, 1
  %30 = icmp eq i64 %29, %22
  %31 = select i1 %30, i64 0, i64 %29
  %32 = getelementptr inbounds [20 x i64], ptr %4, i64 0, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !15
  %34 = call noundef i64 @_ZNK11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE7getDataEm(ptr noundef nonnull align 8 dereferenceable(4262456) %10, i64 noundef %28)
  %35 = inttoptr i64 %34 to ptr
  %36 = call noundef i64 @_ZNK11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE7getDataEm(ptr noundef nonnull align 8 dereferenceable(4262456) %10, i64 noundef %33)
  %37 = inttoptr i64 %36 to ptr
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 -1, ptr %5, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 -1, ptr %6, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !24
  %38 = call noundef zeroext i1 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE8findEdgeEmmPjS6_Pi(ptr noundef nonnull align 8 dereferenceable(4262456) %10, i64 noundef %28, i64 noundef %33, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %39 = load i32, ptr %7, align 4, !tbaa !24
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [20 x %struct.anon], ptr %25, i64 0, i64 %.038
  store i64 %40, ptr %41, align 8, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %35, i64 16
  %43 = load i64, ptr %42, align 8, !tbaa !27
  %44 = getelementptr inbounds i8, ptr %41, i64 8
  store i64 %43, ptr %44, align 8, !tbaa !28
  %45 = getelementptr inbounds i8, ptr %37, i64 16
  %46 = load i64, ptr %45, align 8, !tbaa !27
  %47 = getelementptr inbounds i8, ptr %41, i64 16
  store i64 %46, ptr %47, align 8, !tbaa !29
  %48 = load i32, ptr %6, align 4, !tbaa !24
  %49 = getelementptr inbounds i8, ptr %41, i64 24
  store i32 %48, ptr %49, align 8, !tbaa !24
  %50 = load i32, ptr %5, align 4, !tbaa !24
  %51 = getelementptr inbounds i8, ptr %41, i64 28
  store i32 %50, ptr %51, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %exitcond.not = icmp eq i64 %29, %22
  br i1 %exitcond.not, label %.loopexit, label %26, !llvm.loop !30

.loopexit:                                        ; preds = %26, %20, %15
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %4) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE14findPathToLockEPNS_19DeadlockDetectorTLSIS4_EEmPmm(ptr noundef nonnull align 8 dereferenceable(4262456), ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

declare void @_ZN11__sanitizer6PrintfEPKcz(ptr noundef, ...) 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 #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer3MinImEET_S1_S1_(i64 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK11__sanitizer16DeadlockDetectorINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEE7getDataEm(ptr noundef nonnull align 8 dereferenceable(4262456), i64 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress 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 = { 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 #4 = { 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 }
attributes #6 = { 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, !7, i64 16}
!6 = !{!"_ZTSN11__sanitizer10DDCallbackE", !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN11__sanitizer7DDMutexE", !12, i64 0, !13, i64 8, !14, i64 16}
!12 = !{!"long", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"long long", !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!17 = !{!18, !22, i64 2224}
!18 = !{!"_ZTSN11__sanitizer15DDLogicalThreadE", !14, i64 0, !19, i64 8, !21, i64 1576, !22, i64 2224}
!19 = !{!"_ZTSN11__sanitizer19DeadlockDetectorTLSINS_17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEEEE", !20, i64 0, !12, i64 520, !8, i64 528, !12, i64 1040, !8, i64 1048, !12, i64 1560}
!20 = !{!"_ZTSN11__sanitizer17TwoLevelBitVectorILm1ENS_14BasicBitVectorImEEEE", !8, i64 0, !8, i64 8}
!21 = !{!"_ZTSN11__sanitizer8DDReportE", !13, i64 0, !8, i64 8}
!22 = !{!"bool", !8, i64 0}
!23 = !{!21, !13, i64 0}
!24 = !{!13, !13, i64 0}
!25 = !{!26, !14, i64 0}
!26 = !{!"_ZTSN11__sanitizer8DDReportUt0_E", !14, i64 0, !14, i64 8, !14, i64 16, !8, i64 24}
!27 = !{!11, !14, i64 16}
!28 = !{!26, !14, i64 8}
!29 = !{!26, !14, i64 16}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass