; LLVM IR from aws/s2n-tls :: tests/unit (s2n_self_talk_key_log_test)

; 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.s2n_debug_info = type { ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [109 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strrchr(ptr noundef, i32 noundef) #2

declare i32 @s2n_calculate_stacktrace() #3

declare ptr @s2n_stuffer_raw_read(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_test_check_tls13(ptr noundef %0) #4 {
  %2 = alloca %struct.s2n_result, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.s2n_stuffer, ptr %7, i32 0, i32 2
  %9 = load i32, ptr %8, align 4, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.s2n_stuffer, ptr %10, i32 0, i32 1
  %12 = load i32, ptr %11, align 8, !tbaa !13
  %13 = sub i32 %9, %12
  %14 = zext i32 %13 to i64
  store i64 %14, ptr %4, align 8, !tbaa !14
  br label %15

15:                                               ; preds = %1
  %16 = load i64, ptr %4, align 8, !tbaa !14
  %17 = icmp ugt i64 %16, 0
  br i1 %17, label %52, label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %22 = getelementptr inbounds %struct.s2n_debug_info, ptr %21, i32 0, i32 0
  store ptr @.str.4, ptr %22, align 8, !tbaa !16
  %23 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %24 = getelementptr inbounds %struct.s2n_debug_info, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 21
  %27 = call ptr @strrchr(ptr noundef %26, i32 noundef 47) #6
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %36

29:                                               ; preds = %20
  %30 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %31 = getelementptr inbounds %struct.s2n_debug_info, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = getelementptr inbounds i8, ptr %32, i64 21
  %34 = call ptr @strrchr(ptr noundef %33, i32 noundef 47) #6
  %35 = getelementptr inbounds i8, ptr %34, i64 1
  br label %41

36:                                               ; preds = %20
  %37 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %38 = getelementptr inbounds %struct.s2n_debug_info, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = getelementptr inbounds i8, ptr %39, i64 21
  br label %41

41:                                               ; preds = %36, %29
  %42 = phi ptr [ %35, %29 ], [ %40, %36 ]
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %44 = getelementptr inbounds %struct.s2n_debug_info, ptr %43, i32 0, i32 1
  store ptr %42, ptr %44, align 8, !tbaa !18
  %45 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %45, align 4, !tbaa !19
  %46 = call i32 @s2n_calculate_stacktrace()
  br label %47

47:                                               ; preds = %41
  br label %48

48:                                               ; preds = %47
  %49 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %49, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %306

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51, %15
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = load i64, ptr %4, align 8, !tbaa !14
  %57 = trunc i64 %56 to i32
  %58 = call ptr @s2n_stuffer_raw_read(ptr noundef %55, i32 noundef %57)
  store ptr %58, ptr %6, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %54
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %96, label %62

62:                                               ; preds = %59
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %66 = getelementptr inbounds %struct.s2n_debug_info, ptr %65, i32 0, i32 0
  store ptr @.str.5, ptr %66, align 8, !tbaa !16
  %67 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %68 = getelementptr inbounds %struct.s2n_debug_info, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = getelementptr inbounds i8, ptr %69, i64 21
  %71 = call ptr @strrchr(ptr noundef %70, i32 noundef 47) #6
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %80

73:                                               ; preds = %64
  %74 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %75 = getelementptr inbounds %struct.s2n_debug_info, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = getelementptr inbounds i8, ptr %76, i64 21
  %78 = call ptr @strrchr(ptr noundef %77, i32 noundef 47) #6
  %79 = getelementptr inbounds i8, ptr %78, i64 1
  br label %85

80:                                               ; preds = %64
  %81 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %82 = getelementptr inbounds %struct.s2n_debug_info, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = getelementptr inbounds i8, ptr %83, i64 21
  br label %85

85:                                               ; preds = %80, %73
  %86 = phi ptr [ %79, %73 ], [ %84, %80 ]
  %87 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %88 = getelementptr inbounds %struct.s2n_debug_info, ptr %87, i32 0, i32 1
  store ptr %86, ptr %88, align 8, !tbaa !18
  %89 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %89, align 4, !tbaa !19
  %90 = call i32 @s2n_calculate_stacktrace()
  br label %91

91:                                               ; preds = %85
  br label %92

92:                                               ; preds = %91
  %93 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %93, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95, %59
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call ptr @strstr(ptr noundef %100, ptr noundef @.str.6) #6
  %102 = icmp ne ptr %101, null
  br i1 %102, label %137, label %103

103:                                              ; preds = %99
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %107 = getelementptr inbounds %struct.s2n_debug_info, ptr %106, i32 0, i32 0
  store ptr @.str.7, ptr %107, align 8, !tbaa !16
  %108 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %109 = getelementptr inbounds %struct.s2n_debug_info, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = getelementptr inbounds i8, ptr %110, i64 21
  %112 = call ptr @strrchr(ptr noundef %111, i32 noundef 47) #6
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %121

114:                                              ; preds = %105
  %115 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %116 = getelementptr inbounds %struct.s2n_debug_info, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = getelementptr inbounds i8, ptr %117, i64 21
  %119 = call ptr @strrchr(ptr noundef %118, i32 noundef 47) #6
  %120 = getelementptr inbounds i8, ptr %119, i64 1
  br label %126

121:                                              ; preds = %105
  %122 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %123 = getelementptr inbounds %struct.s2n_debug_info, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !16
  %125 = getelementptr inbounds i8, ptr %124, i64 21
  br label %126

126:                                              ; preds = %121, %114
  %127 = phi ptr [ %120, %114 ], [ %125, %121 ]
  %128 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %129 = getelementptr inbounds %struct.s2n_debug_info, ptr %128, i32 0, i32 1
  store ptr %127, ptr %129, align 8, !tbaa !18
  %130 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %130, align 4, !tbaa !19
  %131 = call i32 @s2n_calculate_stacktrace()
  br label %132

132:                                              ; preds = %126
  br label %133

133:                                              ; preds = %132
  %134 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %134, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

135:                                              ; No predecessors!
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136, %99
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = call ptr @strstr(ptr noundef %141, ptr noundef @.str.8) #6
  %143 = icmp ne ptr %142, null
  br i1 %143, label %178, label %144

144:                                              ; preds = %140
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %148 = getelementptr inbounds %struct.s2n_debug_info, ptr %147, i32 0, i32 0
  store ptr @.str.9, ptr %148, align 8, !tbaa !16
  %149 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %150 = getelementptr inbounds %struct.s2n_debug_info, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !16
  %152 = getelementptr inbounds i8, ptr %151, i64 21
  %153 = call ptr @strrchr(ptr noundef %152, i32 noundef 47) #6
  %154 = icmp ne ptr %153, null
  br i1 %154, label %155, label %162

155:                                              ; preds = %146
  %156 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %157 = getelementptr inbounds %struct.s2n_debug_info, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !16
  %159 = getelementptr inbounds i8, ptr %158, i64 21
  %160 = call ptr @strrchr(ptr noundef %159, i32 noundef 47) #6
  %161 = getelementptr inbounds i8, ptr %160, i64 1
  br label %167

162:                                              ; preds = %146
  %163 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %164 = getelementptr inbounds %struct.s2n_debug_info, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !16
  %166 = getelementptr inbounds i8, ptr %165, i64 21
  br label %167

167:                                              ; preds = %162, %155
  %168 = phi ptr [ %161, %155 ], [ %166, %162 ]
  %169 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %170 = getelementptr inbounds %struct.s2n_debug_info, ptr %169, i32 0, i32 1
  store ptr %168, ptr %170, align 8, !tbaa !18
  %171 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %171, align 4, !tbaa !19
  %172 = call i32 @s2n_calculate_stacktrace()
  br label %173

173:                                              ; preds = %167
  br label %174

174:                                              ; preds = %173
  %175 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %175, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

176:                                              ; No predecessors!
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177, %140
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = call ptr @strstr(ptr noundef %182, ptr noundef @.str.10) #6
  %184 = icmp ne ptr %183, null
  br i1 %184, label %219, label %185

185:                                              ; preds = %181
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  %188 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %189 = getelementptr inbounds %struct.s2n_debug_info, ptr %188, i32 0, i32 0
  store ptr @.str.11, ptr %189, align 8, !tbaa !16
  %190 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %191 = getelementptr inbounds %struct.s2n_debug_info, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !16
  %193 = getelementptr inbounds i8, ptr %192, i64 21
  %194 = call ptr @strrchr(ptr noundef %193, i32 noundef 47) #6
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %203

196:                                              ; preds = %187
  %197 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %198 = getelementptr inbounds %struct.s2n_debug_info, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !16
  %200 = getelementptr inbounds i8, ptr %199, i64 21
  %201 = call ptr @strrchr(ptr noundef %200, i32 noundef 47) #6
  %202 = getelementptr inbounds i8, ptr %201, i64 1
  br label %208

203:                                              ; preds = %187
  %204 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %205 = getelementptr inbounds %struct.s2n_debug_info, ptr %204, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8, !tbaa !16
  %207 = getelementptr inbounds i8, ptr %206, i64 21
  br label %208

208:                                              ; preds = %203, %196
  %209 = phi ptr [ %202, %196 ], [ %207, %203 ]
  %210 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %211 = getelementptr inbounds %struct.s2n_debug_info, ptr %210, i32 0, i32 1
  store ptr %209, ptr %211, align 8, !tbaa !18
  %212 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %212, align 4, !tbaa !19
  %213 = call i32 @s2n_calculate_stacktrace()
  br label %214

214:                                              ; preds = %208
  br label %215

215:                                              ; preds = %214
  %216 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %216, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

217:                                              ; No predecessors!
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218, %181
  br label %220

220:                                              ; preds = %219
  br label %221

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = call ptr @strstr(ptr noundef %223, ptr noundef @.str.12) #6
  %225 = icmp ne ptr %224, null
  br i1 %225, label %260, label %226

226:                                              ; preds = %222
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  %229 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %230 = getelementptr inbounds %struct.s2n_debug_info, ptr %229, i32 0, i32 0
  store ptr @.str.13, ptr %230, align 8, !tbaa !16
  %231 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %232 = getelementptr inbounds %struct.s2n_debug_info, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !16
  %234 = getelementptr inbounds i8, ptr %233, i64 21
  %235 = call ptr @strrchr(ptr noundef %234, i32 noundef 47) #6
  %236 = icmp ne ptr %235, null
  br i1 %236, label %237, label %244

237:                                              ; preds = %228
  %238 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %239 = getelementptr inbounds %struct.s2n_debug_info, ptr %238, i32 0, i32 0
  %240 = load ptr, ptr %239, align 8, !tbaa !16
  %241 = getelementptr inbounds i8, ptr %240, i64 21
  %242 = call ptr @strrchr(ptr noundef %241, i32 noundef 47) #6
  %243 = getelementptr inbounds i8, ptr %242, i64 1
  br label %249

244:                                              ; preds = %228
  %245 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %246 = getelementptr inbounds %struct.s2n_debug_info, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !16
  %248 = getelementptr inbounds i8, ptr %247, i64 21
  br label %249

249:                                              ; preds = %244, %237
  %250 = phi ptr [ %243, %237 ], [ %248, %244 ]
  %251 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %252 = getelementptr inbounds %struct.s2n_debug_info, ptr %251, i32 0, i32 1
  store ptr %250, ptr %252, align 8, !tbaa !18
  %253 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %253, align 4, !tbaa !19
  %254 = call i32 @s2n_calculate_stacktrace()
  br label %255

255:                                              ; preds = %249
  br label %256

256:                                              ; preds = %255
  %257 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %257, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

258:                                              ; No predecessors!
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259, %222
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  br label %263

263:                                              ; preds = %262
  %264 = load ptr, ptr %6, align 8, !tbaa !5
  %265 = call ptr @strstr(ptr noundef %264, ptr noundef @.str.14) #6
  %266 = icmp ne ptr %265, null
  br i1 %266, label %301, label %267

267:                                              ; preds = %263
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268
  %270 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %271 = getelementptr inbounds %struct.s2n_debug_info, ptr %270, i32 0, i32 0
  store ptr @.str.15, ptr %271, align 8, !tbaa !16
  %272 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %273 = getelementptr inbounds %struct.s2n_debug_info, ptr %272, i32 0, i32 0
  %274 = load ptr, ptr %273, align 8, !tbaa !16
  %275 = getelementptr inbounds i8, ptr %274, i64 21
  %276 = call ptr @strrchr(ptr noundef %275, i32 noundef 47) #6
  %277 = icmp ne ptr %276, null
  br i1 %277, label %278, label %285

278:                                              ; preds = %269
  %279 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %280 = getelementptr inbounds %struct.s2n_debug_info, ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %280, align 8, !tbaa !16
  %282 = getelementptr inbounds i8, ptr %281, i64 21
  %283 = call ptr @strrchr(ptr noundef %282, i32 noundef 47) #6
  %284 = getelementptr inbounds i8, ptr %283, i64 1
  br label %290

285:                                              ; preds = %269
  %286 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %287 = getelementptr inbounds %struct.s2n_debug_info, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !16
  %289 = getelementptr inbounds i8, ptr %288, i64 21
  br label %290

290:                                              ; preds = %285, %278
  %291 = phi ptr [ %284, %278 ], [ %289, %285 ]
  %292 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %293 = getelementptr inbounds %struct.s2n_debug_info, ptr %292, i32 0, i32 1
  store ptr %291, ptr %293, align 8, !tbaa !18
  %294 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %294, align 4, !tbaa !19
  %295 = call i32 @s2n_calculate_stacktrace()
  br label %296

296:                                              ; preds = %290
  br label %297

297:                                              ; preds = %296
  %298 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %298, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

299:                                              ; No predecessors!
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300, %263
  br label %302

302:                                              ; preds = %301
  br label %303

303:                                              ; preds = %302
  %304 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 0, ptr %304, align 4, !tbaa !20
  store i32 1, ptr %5, align 4
  br label %305

305:                                              ; preds = %303, %297, %256, %215, %174, %133, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %306

306:                                              ; preds = %305, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %307 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  %308 = load i32, ptr %307, align 4
  ret i32 %308
}

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

!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/C++ TBAA"}
!9 = !{!10, !12, i64 28}
!10 = !{!"s2n_stuffer", !11, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!11 = !{!"s2n_blob", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 24}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 0}
!21 = !{!"", !12, 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.s2n_debug_info = type { ptr, ptr }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [109 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

declare ptr @s2n_stuffer_raw_read(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_test_check_tls13(ptr noundef %0) local_unnamed_addr #3 {
  %2 = getelementptr inbounds i8, ptr %0, i64 28
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %.not = icmp eq i32 %3, %5
  br i1 %.not, label %.sink.split, label %6

6:                                                ; preds = %1
  %7 = sub i32 %3, %5
  %8 = tail call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %0, i32 noundef %7) #4
  %.not18 = icmp eq ptr %8, null
  br i1 %.not18, label %.sink.split, label %9

9:                                                ; preds = %6
  %10 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.6) #5
  %.not20 = icmp eq ptr %10, null
  br i1 %.not20, label %.sink.split, label %11

11:                                               ; preds = %9
  %12 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.8) #5
  %.not22 = icmp eq ptr %12, null
  br i1 %.not22, label %.sink.split, label %13

13:                                               ; preds = %11
  %14 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.10) #5
  %.not24 = icmp eq ptr %14, null
  br i1 %.not24, label %.sink.split, label %15

15:                                               ; preds = %13
  %16 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.12) #5
  %.not26 = icmp eq ptr %16, null
  br i1 %.not26, label %.sink.split, label %17

17:                                               ; preds = %15
  %18 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.14) #5
  %.not28 = icmp eq ptr %18, null
  br i1 %.not28, label %.sink.split, label %26

.sink.split:                                      ; preds = %17, %15, %13, %11, %9, %6, %1
  %.str.5.sink = phi ptr [ @.str.4, %1 ], [ @.str.5, %6 ], [ @.str.7, %9 ], [ @.str.9, %11 ], [ @.str.11, %13 ], [ @.str.13, %15 ], [ @.str.15, %17 ]
  %.sink38 = phi ptr [ getelementptr inbounds (i8, ptr @.str.4, i64 21), %1 ], [ getelementptr inbounds (i8, ptr @.str.5, i64 21), %6 ], [ getelementptr inbounds (i8, ptr @.str.7, i64 21), %9 ], [ getelementptr inbounds (i8, ptr @.str.9, i64 21), %11 ], [ getelementptr inbounds (i8, ptr @.str.11, i64 21), %13 ], [ getelementptr inbounds (i8, ptr @.str.13, i64 21), %15 ], [ getelementptr inbounds (i8, ptr @.str.15, i64 21), %17 ]
  %.sink = phi i32 [ 402653194, %1 ], [ 402653193, %6 ], [ 402653193, %9 ], [ 402653193, %11 ], [ 402653193, %13 ], [ 402653193, %15 ], [ 402653193, %17 ]
  %19 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.5.sink, ptr %19, align 8, !tbaa !13
  %20 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink38, i32 noundef 47) #5
  %.not19 = icmp eq ptr %20, null
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  %22 = select i1 %.not19, ptr %.sink38, ptr %21
  %23 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr %22, ptr %23, align 8, !tbaa !15
  %24 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 %.sink, ptr %24, align 4, !tbaa !16
  %25 = tail call i32 @s2n_calculate_stacktrace() #4
  br label %26

26:                                               ; preds = %.sink.split, %17
  %.sroa.0.1 = phi i32 [ 0, %17 ], [ -1, %.sink.split ]
  ret i32 %.sroa.0.1
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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, !11, i64 28}
!6 = !{!"s2n_stuffer", !7, i64 0, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 36, !11, i64 36}
!7 = !{!"s2n_blob", !8, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!6, !11, i64 24}
!13 = !{!14, !8, i64 0}
!14 = !{!"s2n_debug_info", !8, i64 0, !8, i64 8}
!15 = !{!14, !8, i64 8}
!16 = !{!11, !11, i64 0}


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