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

; 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::DTLS" = type { i64, ptr, i64, i64 }
%"struct.__sanitizer::atomic_uintptr_t" = type { i64 }
%"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::TlsGetAddrParam" = type { i64, i64 }
%"struct.__sanitizer::DTLS::DTV" = type { i64, i64 }
%"struct.__sanitizer::Glibc_2_19_tls_header" = type { i64, i64 }

@_ZN11__sanitizerL4dtlsE = external hidden thread_local(initialexec) global %"struct.__sanitizer::DTLS", align 8
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@_ZN11__sanitizerL19number_of_live_dtlsE = external hidden global %"struct.__sanitizer::atomic_uintptr_t", align 8
@.str.2 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

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

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

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

20:                                               ; preds = %4
  store ptr null, ptr %5, align 8
  br label %162

21:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %22, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.__sanitizer::TlsGetAddrParam", ptr %23, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !17
  store i64 %25, ptr %11, align 8, !tbaa !9
  %26 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %27 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !19
  %29 = icmp eq i64 %28, -1
  br i1 %29, label %30, label %31

30:                                               ; preds = %21
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %161

31:                                               ; preds = %21
  %32 = load i64, ptr %11, align 8, !tbaa !9
  %33 = add i64 %32, 1
  call void @_ZN11__sanitizerL11DTLS_ResizeEm(i64 noundef %33)
  %34 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %35 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = load i64, ptr %11, align 8, !tbaa !9
  %38 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %36, i64 %37
  %39 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %38, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !22
  %41 = icmp ne i64 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %31
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %161

43:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = ptrtoint ptr %44 to i64
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.__sanitizer::TlsGetAddrParam", ptr %46, i32 0, i32 1
  %48 = load i64, ptr %47, align 8, !tbaa !24
  %49 = sub i64 %45, %48
  %50 = sub i64 %49, 0
  store i64 %50, ptr %14, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %43
  %52 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %53 = sext i32 %52 to i64
  %54 = icmp uge i64 %53, 2
  br i1 %54, label %55, label %66

55:                                               ; preds = %51
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.__sanitizer::TlsGetAddrParam", ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !17
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.__sanitizer::TlsGetAddrParam", ptr %60, i32 0, i32 1
  %62 = load i64, ptr %61, align 8, !tbaa !24
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load i64, ptr %14, align 8, !tbaa !9
  %65 = call noundef i64 @_ZN11__sanitizer11atomic_loadINS_16atomic_uintptr_tEEENT_4TypeEPVKS2_NS_12memory_orderE(ptr noundef @_ZN11__sanitizerL19number_of_live_dtlsE, i32 noundef 1)
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.1, ptr noundef %56, i64 noundef %59, i64 noundef %62, ptr noundef %63, i64 noundef %64, ptr noundef %14, i64 noundef %65)
  br label %66

66:                                               ; preds = %55, %51
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %70 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %69, i32 0, i32 3
  %71 = load i64, ptr %70, align 8, !tbaa !25
  %72 = load i64, ptr %14, align 8, !tbaa !9
  %73 = icmp eq i64 %71, %72
  br i1 %73, label %74, label %88

74:                                               ; preds = %68
  %75 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %76 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %75, i32 0, i32 2
  %77 = load i64, ptr %76, align 8, !tbaa !26
  store i64 %77, ptr %13, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %74
  %79 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %80 = sext i32 %79 to i64
  %81 = icmp uge i64 %80, 2
  br i1 %81, label %82, label %85

82:                                               ; preds = %78
  %83 = load i64, ptr %14, align 8, !tbaa !9
  %84 = load i64, ptr %13, align 8, !tbaa !9
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.2, i64 noundef %83, i64 noundef %84)
  br label %85

85:                                               ; preds = %82, %78
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  br label %141

88:                                               ; preds = %68
  %89 = load i64, ptr %14, align 8, !tbaa !9
  %90 = load i64, ptr %8, align 8, !tbaa !9
  %91 = icmp uge i64 %89, %90
  br i1 %91, label %92, label %106

92:                                               ; preds = %88
  %93 = load i64, ptr %14, align 8, !tbaa !9
  %94 = load i64, ptr %9, align 8, !tbaa !9
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %96, label %106

96:                                               ; preds = %92
  br label %97

97:                                               ; preds = %96
  %98 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %99 = sext i32 %98 to i64
  %100 = icmp uge i64 %99, 2
  br i1 %100, label %101, label %103

101:                                              ; preds = %97
  %102 = load i64, ptr %14, align 8, !tbaa !9
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.3, i64 noundef %102)
  br label %103

103:                                              ; preds = %101, %97
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %140

106:                                              ; preds = %92, %88
  %107 = load i64, ptr %14, align 8, !tbaa !9
  %108 = urem i64 %107, 4096
  %109 = icmp eq i64 %108, 16
  br i1 %109, label %110, label %130

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %111 = load i64, ptr %14, align 8, !tbaa !9
  %112 = inttoptr i64 %111 to ptr
  %113 = getelementptr inbounds %"struct.__sanitizer::Glibc_2_19_tls_header", ptr %112, i64 -1
  store ptr %113, ptr %15, align 8, !tbaa !5
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.__sanitizer::Glibc_2_19_tls_header", ptr %114, i32 0, i32 0
  %116 = load i64, ptr %115, align 8, !tbaa !27
  store i64 %116, ptr %13, align 8, !tbaa !9
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.__sanitizer::Glibc_2_19_tls_header", ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !29
  store i64 %119, ptr %14, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %110
  %121 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %122 = sext i32 %121 to i64
  %123 = icmp uge i64 %122, 2
  br i1 %123, label %124, label %127

124:                                              ; preds = %120
  %125 = load i64, ptr %14, align 8, !tbaa !9
  %126 = load i64, ptr %13, align 8, !tbaa !9
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.4, i64 noundef %125, i64 noundef %126)
  br label %127

127:                                              ; preds = %124, %120
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %139

130:                                              ; preds = %106
  br label %131

131:                                              ; preds = %130
  %132 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %133 = sext i32 %132 to i64
  %134 = icmp uge i64 %133, 2
  br i1 %134, label %135, label %136

135:                                              ; preds = %131
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef @.str.5)
  br label %136

136:                                              ; preds = %135, %131
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %138, %129
  br label %140

140:                                              ; preds = %139, %105
  br label %141

141:                                              ; preds = %140, %87
  %142 = load i64, ptr %14, align 8, !tbaa !9
  %143 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %144 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %143, i32 0, i32 1
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  %146 = load i64, ptr %11, align 8, !tbaa !9
  %147 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %145, i64 %146
  %148 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %147, i32 0, i32 0
  store i64 %142, ptr %148, align 8, !tbaa !22
  %149 = load i64, ptr %13, align 8, !tbaa !9
  %150 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %151 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !21
  %153 = load i64, ptr %11, align 8, !tbaa !9
  %154 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %152, i64 %153
  %155 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %154, i32 0, i32 1
  store i64 %149, ptr %155, align 8, !tbaa !30
  %156 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %157 = getelementptr inbounds %"struct.__sanitizer::DTLS", ptr %156, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !21
  %159 = load i64, ptr %11, align 8, !tbaa !9
  %160 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %158, i64 %159
  store ptr %160, ptr %5, align 8
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %161

161:                                              ; preds = %141, %42, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %162

162:                                              ; preds = %161, %20
  %163 = load ptr, ptr %5, align 8
  ret ptr %163
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN11__sanitizerL11DTLS_ResizeEm(i64 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer11atomic_loadINS_16atomic_uintptr_tEEENT_4TypeEPVKS2_NS_12memory_orderE(ptr noundef, i32 noundef) #0

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 = { 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 #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 speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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, !13, i64 89}
!12 = !{!"_ZTSN11__sanitizer11CommonFlagsE", !13, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !13, i64 33, !13, i64 34, !13, i64 35, !14, i64 36, !6, i64 40, !13, i64 48, !13, i64 49, !14, i64 52, !13, i64 56, !13, i64 57, !13, i64 58, !13, i64 59, !13, i64 60, !13, i64 61, !13, i64 62, !13, i64 63, !13, i64 64, !13, i64 65, !13, i64 66, !13, i64 67, !10, i64 72, !6, i64 80, !13, i64 88, !13, i64 89, !13, i64 90, !10, i64 96, !10, i64 104, !10, i64 112, !13, i64 120, !13, i64 121, !13, i64 122, !13, i64 123, !13, i64 124, !13, i64 125, !13, i64 126, !13, i64 127, !13, i64 128, !6, i64 136, !13, i64 144, !13, i64 145, !13, i64 146, !13, i64 147, !13, i64 148, !13, i64 149, !14, i64 152, !6, i64 160, !13, i64 168, !13, i64 169, !13, i64 170, !13, i64 171, !13, i64 172, !13, i64 173, !13, i64 174, !13, i64 175, !13, i64 176, !13, i64 177, !13, i64 178, !13, i64 179, !13, i64 180, !13, i64 181, !14, i64 184, !13, i64 188, !13, i64 189, !13, i64 190, !13, i64 191, !6, i64 192}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTSN11__sanitizer15TlsGetAddrParamE", !10, i64 0, !10, i64 8}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSN11__sanitizer4DTLSE", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!21 = !{!20, !6, i64 8}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTSN11__sanitizer4DTLS3DTVE", !10, i64 0, !10, i64 8}
!24 = !{!18, !10, i64 8}
!25 = !{!20, !10, i64 24}
!26 = !{!20, !10, i64 16}
!27 = !{!28, !10, i64 0}
!28 = !{!"_ZTSN11__sanitizer21Glibc_2_19_tls_headerE", !10, i64 0, !10, i64 8}
!29 = !{!28, !10, i64 8}
!30 = !{!23, !10, i64 8}


; 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.__sanitizer::DTLS" = type { i64, ptr, i64, i64 }
%"struct.__sanitizer::atomic_uintptr_t" = type { i64 }
%"struct.__sanitizer::DTLS::DTV" = type { i64, i64 }

@_ZN11__sanitizerL4dtlsE = external hidden thread_local(initialexec) local_unnamed_addr global %"struct.__sanitizer::DTLS", align 8
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@_ZN11__sanitizerL19number_of_live_dtlsE = external hidden global %"struct.__sanitizer::atomic_uintptr_t", align 8
@.str.2 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11__sanitizer20DTLS_on_tls_get_addrEPvS0_mm(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #5 {
  %5 = alloca i64, align 8
  %6 = tail call noundef ptr @_ZN11__sanitizer12common_flagsEv()
  %7 = getelementptr inbounds i8, ptr %6, i64 89
  %8 = load i8, ptr %7, align 1, !tbaa !5, !range !13, !noundef !14
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %73

10:                                               ; preds = %4
  %11 = load i64, ptr %0, align 8, !tbaa !15
  %12 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZN11__sanitizerL4dtlsE)
  %13 = load i64, ptr %12, align 8, !tbaa !17
  %14 = icmp eq i64 %13, -1
  br i1 %14, label %73, label %15

15:                                               ; preds = %10
  %16 = add i64 %11, 1
  tail call void @_ZN11__sanitizerL11DTLS_ResizeEm(i64 noundef %16)
  %17 = getelementptr inbounds i8, ptr %12, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !19
  %19 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %18, i64 %11
  %20 = load i64, ptr %19, align 8, !tbaa !20
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %21, label %73

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %22 = ptrtoint ptr %1 to i64
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !22
  %25 = sub i64 %22, %24
  store i64 %25, ptr %5, align 8, !tbaa !23
  %26 = tail call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %27 = icmp ugt i32 %26, 1
  br i1 %27, label %28, label %32

28:                                               ; preds = %21
  %29 = load i64, ptr %0, align 8, !tbaa !15
  %30 = load i64, ptr %23, align 8, !tbaa !22
  %31 = tail call noundef i64 @_ZN11__sanitizer11atomic_loadINS_16atomic_uintptr_tEEENT_4TypeEPVKS2_NS_12memory_orderE(ptr noundef nonnull @_ZN11__sanitizerL19number_of_live_dtlsE, i32 noundef 1)
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.1, ptr noundef nonnull %0, i64 noundef %29, i64 noundef %30, ptr noundef %1, i64 noundef %25, ptr noundef nonnull %5, i64 noundef %31)
  %.pre = load i64, ptr %5, align 8, !tbaa !23
  br label %32

32:                                               ; preds = %28, %21
  %33 = phi i64 [ %.pre, %28 ], [ %25, %21 ]
  %34 = getelementptr inbounds i8, ptr %12, i64 24
  %35 = load i64, ptr %34, align 8, !tbaa !24
  %36 = icmp eq i64 %35, %33
  br i1 %36, label %37, label %44

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %12, i64 16
  %39 = load i64, ptr %38, align 8, !tbaa !25
  %40 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %41 = icmp ugt i32 %40, 1
  br i1 %41, label %42, label %68

42:                                               ; preds = %37
  %43 = load i64, ptr %5, align 8, !tbaa !23
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.2, i64 noundef %43, i64 noundef %39)
  br label %68

44:                                               ; preds = %32
  %.not22 = icmp uge i64 %33, %2
  %45 = icmp ult i64 %33, %3
  %or.cond = and i1 %.not22, %45
  br i1 %or.cond, label %46, label %51

46:                                               ; preds = %44
  %47 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %48 = icmp ugt i32 %47, 1
  br i1 %48, label %49, label %68

49:                                               ; preds = %46
  %50 = load i64, ptr %5, align 8, !tbaa !23
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.3, i64 noundef %50)
  br label %68

51:                                               ; preds = %44
  %52 = and i64 %33, 4095
  %53 = icmp eq i64 %52, 16
  br i1 %53, label %54, label %64

54:                                               ; preds = %51
  %55 = inttoptr i64 %33 to ptr
  %56 = getelementptr inbounds i8, ptr %55, i64 -16
  %57 = load i64, ptr %56, align 8, !tbaa !26
  %58 = getelementptr inbounds i8, ptr %55, i64 -8
  %59 = load i64, ptr %58, align 8, !tbaa !28
  store i64 %59, ptr %5, align 8, !tbaa !23
  %60 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %61 = icmp ugt i32 %60, 1
  br i1 %61, label %62, label %68

62:                                               ; preds = %54
  %63 = load i64, ptr %5, align 8, !tbaa !23
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.4, i64 noundef %63, i64 noundef %57)
  br label %68

64:                                               ; preds = %51
  %65 = call noundef i32 @_ZN11__sanitizer9VerbosityEv()
  %66 = icmp ugt i32 %65, 1
  br i1 %66, label %67, label %68

67:                                               ; preds = %64
  call void (ptr, ...) @_ZN11__sanitizer6PrintfEPKcz(ptr noundef nonnull @.str.5)
  br label %68

68:                                               ; preds = %64, %67, %54, %62, %46, %49, %37, %42
  %.020 = phi i64 [ %39, %42 ], [ %39, %37 ], [ 0, %49 ], [ 0, %46 ], [ %57, %62 ], [ %57, %54 ], [ 0, %67 ], [ 0, %64 ]
  %69 = load i64, ptr %5, align 8, !tbaa !23
  %70 = load ptr, ptr %17, align 8, !tbaa !19
  %71 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %70, i64 %11
  store i64 %69, ptr %71, align 8, !tbaa !20
  %72 = getelementptr inbounds %"struct.__sanitizer::DTLS::DTV", ptr %70, i64 %11, i32 1
  store i64 %.020, ptr %72, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %73

73:                                               ; preds = %68, %10, %15, %4
  %.1 = phi ptr [ null, %4 ], [ %71, %68 ], [ null, %10 ], [ null, %15 ]
  ret ptr %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN11__sanitizerL11DTLS_ResizeEm(i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer11atomic_loadINS_16atomic_uintptr_tEEENT_4TypeEPVKS2_NS_12memory_orderE(ptr noundef, i32 noundef) local_unnamed_addr #0

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 = { 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 #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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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, !7, i64 89}
!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, !12, i64 0}
!16 = !{!"_ZTSN11__sanitizer15TlsGetAddrParamE", !12, i64 0, !12, i64 8}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTSN11__sanitizer4DTLSE", !12, i64 0, !10, i64 8, !12, i64 16, !12, i64 24}
!19 = !{!18, !10, i64 8}
!20 = !{!21, !12, i64 0}
!21 = !{!"_ZTSN11__sanitizer4DTLS3DTVE", !12, i64 0, !12, i64 8}
!22 = !{!16, !12, i64 8}
!23 = !{!12, !12, i64 0}
!24 = !{!18, !12, i64 24}
!25 = !{!18, !12, i64 16}
!26 = !{!27, !12, i64 0}
!27 = !{!"_ZTSN11__sanitizer21Glibc_2_19_tls_headerE", !12, i64 0, !12, i64 8}
!28 = !{!27, !12, i64 8}
!29 = !{!21, !12, i64 8}


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