; LLVM IR from aws/s2n-tls :: tests/unit (s2n_psk_offered_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_tls13_keys = type { i32, i32, i8, %struct.s2n_blob, %struct.s2n_blob, [48 x i8], [48 x i8], %struct.s2n_hmac_state }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon.0 }
%union.anon.0 = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }
%struct.s2n_psk = type { i32, %struct.s2n_blob, %struct.s2n_blob, i32, i32, i64, %struct.s2n_blob, %struct.s2n_early_data_config, i64 }
%struct.s2n_early_data_config = type { i32, i8, ptr, %struct.s2n_blob, %struct.s2n_blob }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.49 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [84 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

declare i32 @s2n_blob_init(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_psk_calculate_binder_hash(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_psk_calculate_binder(ptr noundef, ptr noundef, ptr noundef) #5

declare i32 @s2n_tls13_keys_free(ptr noundef) #2

declare i32 @s2n_tls13_keys_init(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_psk_verify_binder(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #5 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.s2n_tls13_keys, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca [48 x i8], align 16
  %14 = alloca %struct.s2n_blob, align 8
  %15 = alloca i64, align 8
  %16 = alloca [48 x i8], align 16
  %17 = alloca %struct.s2n_blob, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %4
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %52, label %21

21:                                               ; preds = %18
  br label %22

22:                                               ; preds = %21
  br label %23

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

32:                                               ; preds = %23
  %33 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %34 = getelementptr inbounds %struct.s2n_debug_info, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %35, i64 21
  %37 = call ptr @strrchr(ptr noundef %36, i32 noundef 47) #6
  %38 = getelementptr inbounds i8, ptr %37, i64 1
  br label %44

39:                                               ; preds = %23
  %40 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %41 = getelementptr inbounds %struct.s2n_debug_info, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 21
  br label %44

44:                                               ; preds = %39, %32
  %45 = phi ptr [ %38, %32 ], [ %43, %39 ]
  %46 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %47 = getelementptr inbounds %struct.s2n_debug_info, ptr %46, i32 0, i32 1
  store ptr %45, ptr %47, align 8, !tbaa !11
  %48 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %48, align 4, !tbaa !12
  %49 = call i32 @s2n_calculate_stacktrace()
  br label %50

50:                                               ; preds = %44
  store i32 -1, ptr %5, align 4
  br label %282

51:                                               ; No predecessors!
  br label %52

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

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %88, label %57

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %61 = getelementptr inbounds %struct.s2n_debug_info, ptr %60, i32 0, i32 0
  store ptr @.str.50, ptr %61, align 8, !tbaa !9
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %63 = getelementptr inbounds %struct.s2n_debug_info, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %64, i64 21
  %66 = call ptr @strrchr(ptr noundef %65, i32 noundef 47) #6
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %75

68:                                               ; preds = %59
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %70 = getelementptr inbounds %struct.s2n_debug_info, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %71, i64 21
  %73 = call ptr @strrchr(ptr noundef %72, i32 noundef 47) #6
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  br label %80

75:                                               ; preds = %59
  %76 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %77 = getelementptr inbounds %struct.s2n_debug_info, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %78, i64 21
  br label %80

80:                                               ; preds = %75, %68
  %81 = phi ptr [ %74, %68 ], [ %79, %75 ]
  %82 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %83 = getelementptr inbounds %struct.s2n_debug_info, ptr %82, i32 0, i32 1
  store ptr %81, ptr %83, align 8, !tbaa !11
  %84 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %84, align 4, !tbaa !12
  %85 = call i32 @s2n_calculate_stacktrace()
  br label %86

86:                                               ; preds = %80
  store i32 -1, ptr %5, align 4
  br label %282

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %54
  br label %89

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 592, ptr %10) #7
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.s2n_psk, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 8, !tbaa !14
  %94 = call i32 @s2n_tls13_keys_init(ptr noundef %10, i32 noundef %93)
  %95 = icmp sgt i32 %94, -1
  br i1 %95, label %97, label %96

96:                                               ; preds = %90
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %280

97:                                               ; preds = %90
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s2n_blob, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !19
  %104 = getelementptr inbounds %struct.s2n_tls13_keys, ptr %10, i32 0, i32 2
  %105 = load i8, ptr %104, align 8, !tbaa !20
  %106 = zext i8 %105 to i32
  %107 = icmp eq i32 %103, %106
  br i1 %107, label %141, label %108

108:                                              ; preds = %100
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  %111 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %112 = getelementptr inbounds %struct.s2n_debug_info, ptr %111, i32 0, i32 0
  store ptr @.str.51, ptr %112, align 8, !tbaa !9
  %113 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %114 = getelementptr inbounds %struct.s2n_debug_info, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds i8, ptr %115, i64 21
  %117 = call ptr @strrchr(ptr noundef %116, i32 noundef 47) #6
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %126

119:                                              ; preds = %110
  %120 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %121 = getelementptr inbounds %struct.s2n_debug_info, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = getelementptr inbounds i8, ptr %122, i64 21
  %124 = call ptr @strrchr(ptr noundef %123, i32 noundef 47) #6
  %125 = getelementptr inbounds i8, ptr %124, i64 1
  br label %131

126:                                              ; preds = %110
  %127 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %128 = getelementptr inbounds %struct.s2n_debug_info, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %129, i64 21
  br label %131

131:                                              ; preds = %126, %119
  %132 = phi ptr [ %125, %119 ], [ %130, %126 ]
  %133 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %134 = getelementptr inbounds %struct.s2n_debug_info, ptr %133, i32 0, i32 1
  store ptr %132, ptr %134, align 8, !tbaa !11
  %135 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %135, align 4, !tbaa !12
  %136 = call i32 @s2n_calculate_stacktrace()
  br label %137

137:                                              ; preds = %131
  br label %138

138:                                              ; preds = %137
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %280

139:                                              ; No predecessors!
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140, %100
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %144 = getelementptr inbounds %struct.s2n_tls13_keys, ptr %10, i32 0, i32 2
  %145 = load i8, ptr %144, align 8, !tbaa !20
  %146 = zext i8 %145 to i64
  store i64 %146, ptr %12, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 16 %13, i8 0, i64 48, i1 false)
  br label %147

147:                                              ; preds = %143
  %148 = load i64, ptr %12, align 8, !tbaa !25
  %149 = icmp ule i64 %148, 48
  br i1 %149, label %183, label %150

150:                                              ; preds = %147
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151
  %153 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %154 = getelementptr inbounds %struct.s2n_debug_info, ptr %153, i32 0, i32 0
  store ptr @.str.52, ptr %154, align 8, !tbaa !9
  %155 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %156 = getelementptr inbounds %struct.s2n_debug_info, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = getelementptr inbounds i8, ptr %157, i64 21
  %159 = call ptr @strrchr(ptr noundef %158, i32 noundef 47) #6
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %168

161:                                              ; preds = %152
  %162 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %163 = getelementptr inbounds %struct.s2n_debug_info, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = getelementptr inbounds i8, ptr %164, i64 21
  %166 = call ptr @strrchr(ptr noundef %165, i32 noundef 47) #6
  %167 = getelementptr inbounds i8, ptr %166, i64 1
  br label %173

168:                                              ; preds = %152
  %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 0
  %171 = load ptr, ptr %170, align 8, !tbaa !9
  %172 = getelementptr inbounds i8, ptr %171, i64 21
  br label %173

173:                                              ; preds = %168, %161
  %174 = phi ptr [ %167, %161 ], [ %172, %168 ]
  %175 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %176 = getelementptr inbounds %struct.s2n_debug_info, ptr %175, i32 0, i32 1
  store ptr %174, ptr %176, align 8, !tbaa !11
  %177 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %177, align 4, !tbaa !12
  %178 = call i32 @s2n_calculate_stacktrace()
  br label %179

179:                                              ; preds = %173
  br label %180

180:                                              ; preds = %179
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %279

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182, %147
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  br label %186

186:                                              ; preds = %185
  %187 = getelementptr inbounds [48 x i8], ptr %13, i64 0, i64 0
  %188 = load i64, ptr %12, align 8, !tbaa !25
  %189 = trunc i64 %188 to i32
  %190 = call i32 @s2n_blob_init(ptr noundef %14, ptr noundef %187, i32 noundef %189)
  %191 = icmp sgt i32 %190, -1
  br i1 %191, label %193, label %192

192:                                              ; preds = %186
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %278

193:                                              ; preds = %186
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.s2n_psk, ptr %198, i32 0, i32 3
  %200 = load i32, ptr %199, align 8, !tbaa !14
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = call i32 @s2n_psk_calculate_binder_hash(ptr noundef %197, i32 noundef %200, ptr noundef %201, ptr noundef %14)
  %203 = icmp sgt i32 %202, -1
  br i1 %203, label %205, label %204

204:                                              ; preds = %196
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %278

205:                                              ; preds = %196
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %208 = getelementptr inbounds %struct.s2n_tls13_keys, ptr %10, i32 0, i32 2
  %209 = load i8, ptr %208, align 8, !tbaa !20
  %210 = zext i8 %209 to i64
  store i64 %210, ptr %15, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #7
  call void @llvm.memset.p0.i64(ptr align 16 %16, i8 0, i64 48, i1 false)
  br label %211

211:                                              ; preds = %207
  %212 = load i64, ptr %15, align 8, !tbaa !25
  %213 = icmp ule i64 %212, 48
  br i1 %213, label %247, label %214

214:                                              ; preds = %211
  br label %215

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215
  %217 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %218 = getelementptr inbounds %struct.s2n_debug_info, ptr %217, i32 0, i32 0
  store ptr @.str.53, ptr %218, align 8, !tbaa !9
  %219 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %220 = getelementptr inbounds %struct.s2n_debug_info, ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !9
  %222 = getelementptr inbounds i8, ptr %221, i64 21
  %223 = call ptr @strrchr(ptr noundef %222, i32 noundef 47) #6
  %224 = icmp ne ptr %223, null
  br i1 %224, label %225, label %232

225:                                              ; preds = %216
  %226 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %227 = getelementptr inbounds %struct.s2n_debug_info, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !9
  %229 = getelementptr inbounds i8, ptr %228, i64 21
  %230 = call ptr @strrchr(ptr noundef %229, i32 noundef 47) #6
  %231 = getelementptr inbounds i8, ptr %230, i64 1
  br label %237

232:                                              ; preds = %216
  %233 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %234 = getelementptr inbounds %struct.s2n_debug_info, ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !9
  %236 = getelementptr inbounds i8, ptr %235, i64 21
  br label %237

237:                                              ; preds = %232, %225
  %238 = phi ptr [ %231, %225 ], [ %236, %232 ]
  %239 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %240 = getelementptr inbounds %struct.s2n_debug_info, ptr %239, i32 0, i32 1
  store ptr %238, ptr %240, align 8, !tbaa !11
  %241 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %241, align 4, !tbaa !12
  %242 = call i32 @s2n_calculate_stacktrace()
  br label %243

243:                                              ; preds = %237
  br label %244

244:                                              ; preds = %243
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %277

245:                                              ; No predecessors!
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246, %211
  br label %248

248:                                              ; preds = %247
  br label %249

249:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 24, i1 false)
  br label %250

250:                                              ; preds = %249
  %251 = getelementptr inbounds [48 x i8], ptr %16, i64 0, i64 0
  %252 = load i64, ptr %15, align 8, !tbaa !25
  %253 = trunc i64 %252 to i32
  %254 = call i32 @s2n_blob_init(ptr noundef %17, ptr noundef %251, i32 noundef %253)
  %255 = icmp sgt i32 %254, -1
  br i1 %255, label %257, label %256

256:                                              ; preds = %250
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %276

257:                                              ; preds = %250
  br label %258

258:                                              ; preds = %257
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  %261 = load ptr, ptr %7, align 8, !tbaa !5
  %262 = call i32 @s2n_psk_calculate_binder(ptr noundef %261, ptr noundef %14, ptr noundef %17)
  %263 = icmp sgt i32 %262, -1
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %276

265:                                              ; preds = %260
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  %269 = load ptr, ptr %9, align 8, !tbaa !5
  %270 = call i32 @s2n_tls13_mac_verify(ptr noundef %10, ptr noundef %17, ptr noundef %269)
  %271 = icmp sgt i32 %270, -1
  br i1 %271, label %273, label %272

272:                                              ; preds = %268
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %276

273:                                              ; preds = %268
  br label %274

274:                                              ; preds = %273
  br label %275

275:                                              ; preds = %274
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %276

276:                                              ; preds = %275, %272, %264, %256
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %277

277:                                              ; preds = %276, %244
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %278

278:                                              ; preds = %277, %204, %192
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %279

279:                                              ; preds = %278, %180
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %280

280:                                              ; preds = %279, %138, %96
  %281 = call i32 @s2n_tls13_keys_free(ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 592, ptr %10) #7
  br label %282

282:                                              ; preds = %280, %86, %50
  %283 = load i32, ptr %5, align 4
  ret i32 %283
}

declare i32 @s2n_tls13_mac_verify(ptr noundef, ptr noundef, ptr noundef) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 56}
!15 = !{!"s2n_psk", !13, i64 0, !16, i64 8, !16, i64 32, !13, i64 56, !13, i64 60, !17, i64 64, !16, i64 72, !18, i64 96, !17, i64 160}
!16 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!"s2n_early_data_config", !13, i64 0, !7, i64 4, !6, i64 8, !16, i64 16, !16, i64 40}
!19 = !{!16, !13, i64 8}
!20 = !{!21, !7, i64 8}
!21 = !{!"s2n_tls13_keys", !13, i64 0, !13, i64 4, !7, i64 8, !16, i64 16, !16, i64 40, !7, i64 64, !7, i64 112, !22, i64 160}
!22 = !{!"s2n_hmac_state", !13, i64 0, !23, i64 4, !13, i64 8, !23, i64 12, !7, i64 14, !24, i64 16, !24, i64 72, !24, i64 128, !24, i64 184, !7, i64 240, !7, i64 368}
!23 = !{!"short", !7, i64 0}
!24 = !{!"s2n_hash_state", !6, i64 0, !13, i64 8, !7, i64 12, !17, i64 16, !7, i64 24}
!25 = !{!17, !17, 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 }
%struct.s2n_tls13_keys = type { i32, i32, i8, %struct.s2n_blob, %struct.s2n_blob, [48 x i8], [48 x i8], %struct.s2n_hmac_state }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon.0 }
%union.anon.0 = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = 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.49 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [84 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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_psk_calculate_binder_hash(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_psk_calculate_binder(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @s2n_tls13_keys_free(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_psk_verify_binder(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #5 {
  %5 = alloca %struct.s2n_tls13_keys, align 8
  %6 = alloca [48 x i8], align 16
  %7 = alloca %struct.s2n_blob, align 8
  %8 = alloca [48 x i8], align 16
  %9 = alloca %struct.s2n_blob, align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %10, label %18

10:                                               ; preds = %4
  %11 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.49, ptr %11, align 8, !tbaa !5
  %12 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.49, i64 21), i32 noundef 47) #6
  %.not22 = icmp eq ptr %12, null
  %13 = getelementptr inbounds i8, ptr %12, i64 1
  %14 = select i1 %.not22, ptr getelementptr inbounds (i8, ptr @.str.49, i64 21), ptr %13
  %15 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %14, ptr %15, align 8, !tbaa !10
  %16 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %16, align 4, !tbaa !11
  %17 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %90

18:                                               ; preds = %4
  %.not23 = icmp eq ptr %3, null
  br i1 %.not23, label %19, label %27

19:                                               ; preds = %18
  %20 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.50, ptr %20, align 8, !tbaa !5
  %21 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.50, i64 21), i32 noundef 47) #6
  %.not24 = icmp eq ptr %21, null
  %22 = getelementptr inbounds i8, ptr %21, i64 1
  %23 = select i1 %.not24, ptr getelementptr inbounds (i8, ptr @.str.50, i64 21), ptr %22
  %24 = getelementptr inbounds i8, ptr %20, i64 8
  store ptr %23, ptr %24, align 8, !tbaa !10
  %25 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %25, align 4, !tbaa !11
  %26 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %90

27:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 592, ptr nonnull %5) #7
  %28 = getelementptr inbounds i8, ptr %1, i64 56
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %30 = call i32 @s2n_tls13_keys_init(ptr noundef nonnull %5, i32 noundef %29) #7
  %31 = icmp sgt i32 %30, -1
  br i1 %31, label %32, label %88

32:                                               ; preds = %27
  %33 = getelementptr inbounds i8, ptr %3, i64 8
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = getelementptr inbounds i8, ptr %5, i64 8
  %36 = load i8, ptr %35, align 8, !tbaa !19
  %37 = zext i8 %36 to i32
  %38 = icmp eq i32 %34, %37
  br i1 %38, label %47, label %39

39:                                               ; preds = %32
  %40 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.51, ptr %40, align 8, !tbaa !5
  %41 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.51, i64 21), i32 noundef 47) #6
  %.not25 = icmp eq ptr %41, null
  %42 = getelementptr inbounds i8, ptr %41, i64 1
  %43 = select i1 %.not25, ptr getelementptr inbounds (i8, ptr @.str.51, i64 21), ptr %42
  %44 = getelementptr inbounds i8, ptr %40, i64 8
  store ptr %43, ptr %44, align 8, !tbaa !10
  %45 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %45, align 4, !tbaa !11
  %46 = call i32 @s2n_calculate_stacktrace() #7
  br label %88

47:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  %48 = icmp ult i8 %36, 49
  br i1 %48, label %57, label %49

49:                                               ; preds = %47
  %50 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.52, ptr %50, align 8, !tbaa !5
  %51 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.52, i64 21), i32 noundef 47) #6
  %.not26 = icmp eq ptr %51, null
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = select i1 %.not26, ptr getelementptr inbounds (i8, ptr @.str.52, i64 21), ptr %52
  %54 = getelementptr inbounds i8, ptr %50, i64 8
  store ptr %53, ptr %54, align 8, !tbaa !10
  %55 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %55, align 4, !tbaa !11
  %56 = call i32 @s2n_calculate_stacktrace() #7
  br label %87

57:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %58 = call i32 @s2n_blob_init(ptr noundef nonnull %7, ptr noundef nonnull %6, i32 noundef %34) #7
  %59 = icmp sgt i32 %58, -1
  br i1 %59, label %60, label %86

60:                                               ; preds = %57
  %61 = load i32, ptr %28, align 8, !tbaa !13
  %62 = call i32 @s2n_psk_calculate_binder_hash(ptr noundef %0, i32 noundef %61, ptr noundef %2, ptr noundef nonnull %7)
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %64, label %86

64:                                               ; preds = %60
  %65 = load i8, ptr %35, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %8, i8 0, i64 48, i1 false)
  %66 = icmp ult i8 %65, 49
  br i1 %66, label %75, label %67

67:                                               ; preds = %64
  %68 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.53, ptr %68, align 8, !tbaa !5
  %69 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.53, i64 21), i32 noundef 47) #6
  %.not27 = icmp eq ptr %69, null
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  %71 = select i1 %.not27, ptr getelementptr inbounds (i8, ptr @.str.53, i64 21), ptr %70
  %72 = getelementptr inbounds i8, ptr %68, i64 8
  store ptr %71, ptr %72, align 8, !tbaa !10
  %73 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %73, align 4, !tbaa !11
  %74 = call i32 @s2n_calculate_stacktrace() #7
  br label %85

75:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, i8 0, i64 24, i1 false)
  %76 = zext nneg i8 %65 to i32
  %77 = call i32 @s2n_blob_init(ptr noundef nonnull %9, ptr noundef nonnull %8, i32 noundef %76) #7
  %78 = icmp sgt i32 %77, -1
  br i1 %78, label %79, label %84

79:                                               ; preds = %75
  %80 = call i32 @s2n_psk_calculate_binder(ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull %9)
  %81 = icmp sgt i32 %80, -1
  br i1 %81, label %82, label %84

82:                                               ; preds = %79
  %83 = call i32 @s2n_tls13_mac_verify(ptr noundef nonnull %5, ptr noundef nonnull %9, ptr noundef nonnull %3) #7
  %.lobit = ashr i32 %83, 31
  br label %84

84:                                               ; preds = %82, %79, %75
  %.0 = phi i32 [ -1, %75 ], [ -1, %79 ], [ %.lobit, %82 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %85

85:                                               ; preds = %84, %67
  %.1 = phi i32 [ %.0, %84 ], [ -1, %67 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  br label %86

86:                                               ; preds = %60, %57, %85
  %.2 = phi i32 [ %.1, %85 ], [ -1, %57 ], [ -1, %60 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %87

87:                                               ; preds = %86, %49
  %.3 = phi i32 [ %.2, %86 ], [ -1, %49 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  br label %88

88:                                               ; preds = %27, %87, %39
  %.4 = phi i32 [ %.3, %87 ], [ -1, %39 ], [ -1, %27 ]
  %89 = call i32 @s2n_tls13_keys_free(ptr noundef nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %5) #7
  br label %90

90:                                               ; preds = %88, %19, %10
  %.5 = phi i32 [ %.4, %88 ], [ -1, %19 ], [ -1, %10 ]
  ret i32 %.5
}

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 willreturn memory(read) }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !12, i64 56}
!14 = !{!"s2n_psk", !12, i64 0, !15, i64 8, !15, i64 32, !12, i64 56, !12, i64 60, !16, i64 64, !15, i64 72, !17, i64 96, !16, i64 160}
!15 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!16 = !{!"long", !8, i64 0}
!17 = !{!"s2n_early_data_config", !12, i64 0, !8, i64 4, !7, i64 8, !15, i64 16, !15, i64 40}
!18 = !{!15, !12, i64 8}
!19 = !{!20, !8, i64 8}
!20 = !{!"s2n_tls13_keys", !12, i64 0, !12, i64 4, !8, i64 8, !15, i64 16, !15, i64 40, !8, i64 64, !8, i64 112, !21, i64 160}
!21 = !{!"s2n_hmac_state", !12, i64 0, !22, i64 4, !12, i64 8, !22, i64 12, !8, i64 14, !23, i64 16, !23, i64 72, !23, i64 128, !23, i64 184, !8, i64 240, !8, i64 368}
!22 = !{!"short", !8, i64 0}
!23 = !{!"s2n_hash_state", !7, i64 0, !12, i64 8, !8, i64 12, !16, i64 16, !8, i64 24}


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