; 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_result = type { i32 }
%struct.s2n_offered_psk_list = type { ptr, %struct.s2n_stuffer, i16 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon, i32 }
%union.anon = type { %struct.s2n_tls13_secrets }
%struct.s2n_tls13_secrets = type { [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], i32 }
%struct.s2n_kex_parameters = type { %struct.s2n_dh_params, %struct.s2n_ecc_evp_params, [4 x ptr], %struct.s2n_ecc_evp_params, %struct.s2n_kem_group_params, %struct.s2n_kem_group_params, [8 x ptr], %struct.s2n_kem_params, %struct.s2n_blob, %struct.s2n_blob }
%struct.s2n_dh_params = type { ptr }
%struct.s2n_ecc_evp_params = type { ptr, ptr }
%struct.s2n_kem_group_params = type { ptr, %struct.s2n_kem_params, %struct.s2n_ecc_evp_params }
%struct.s2n_kem_params = type { ptr, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8 }
%struct.s2n_handshake_parameters = type { %struct.s2n_pkey, %struct.s2n_pkey, %struct.s2n_blob, i32, %struct.s2n_sig_scheme_list, ptr, ptr, ptr, [4 x ptr], [4 x ptr], i8, i8, [32 x i8], [32 x i8] }
%struct.s2n_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_sig_scheme_list = type { [128 x i16], i8 }
%struct.s2n_psk_parameters = type { i32, %struct.s2n_array, i16, i16, ptr, i32 }
%struct.s2n_array = type { %struct.s2n_blob, i32, i32 }
%struct.s2n_handshake = type { %struct.s2n_stuffer, ptr, [8 x i8], [48 x i8], [48 x i8], i8, i32, i32, i32, i32, %struct.s2n_offered_early_data, i8, i32 }
%struct.s2n_offered_early_data = type { ptr }
%struct.s2n_client_hello = type { %struct.s2n_blob, %struct.s2n_parsed_extensions_list, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8 }
%struct.s2n_parsed_extensions_list = type { [21 x %struct.s2n_parsed_extension], %struct.s2n_blob, i16 }
%struct.s2n_parsed_extension = type { %struct.s2n_blob, i16, i16, i8 }
%struct.s2n_x509_validator = type { ptr, ptr, i8, i8, i16, ptr, i32, ptr, %struct.s2n_cert_validation_info, i8 }
%struct.s2n_cert_validation_info = type { i8, [3 x i8] }
%struct.s2n_ticket_fields = type { %struct.s2n_blob, i32 }
%struct.s2n_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%struct.s2n_offered_psk = type { %struct.s2n_blob, i16, i32 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.21 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.26 = 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_offered_psk_list_read_next(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca %struct.s2n_result, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %44, label %12

12:                                               ; preds = %9
  br label %13

13:                                               ; preds = %12
  br label %14

14:                                               ; preds = %13
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %16 = getelementptr inbounds %struct.s2n_debug_info, ptr %15, i32 0, i32 0
  store ptr @.str.21, ptr %16, align 8, !tbaa !9
  %17 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %18 = getelementptr inbounds %struct.s2n_debug_info, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %19, i64 21
  %21 = call ptr @strrchr(ptr noundef %20, i32 noundef 47) #5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %14
  %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
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 21
  %28 = call ptr @strrchr(ptr noundef %27, i32 noundef 47) #5
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  br label %35

30:                                               ; preds = %14
  %31 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %32 = getelementptr inbounds %struct.s2n_debug_info, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %33, i64 21
  br label %35

35:                                               ; preds = %30, %23
  %36 = phi ptr [ %29, %23 ], [ %34, %30 ]
  %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 1
  store ptr %36, ptr %38, align 8, !tbaa !11
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %39, align 4, !tbaa !12
  %40 = call i32 @s2n_calculate_stacktrace()
  br label %41

41:                                               ; preds = %35
  %42 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %42, align 4, !tbaa !14
  br label %318

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %9
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %50 = icmp ne ptr %49, null
  br i1 %50, label %83, label %51

51:                                               ; preds = %46
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %55 = getelementptr inbounds %struct.s2n_debug_info, ptr %54, i32 0, i32 0
  store ptr @.str.22, ptr %55, align 8, !tbaa !9
  %56 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %57 = getelementptr inbounds %struct.s2n_debug_info, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds i8, ptr %58, i64 21
  %60 = call ptr @strrchr(ptr noundef %59, i32 noundef 47) #5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %69

62:                                               ; preds = %53
  %63 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %64 = getelementptr inbounds %struct.s2n_debug_info, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i64 21
  %67 = call ptr @strrchr(ptr noundef %66, i32 noundef 47) #5
  %68 = getelementptr inbounds i8, ptr %67, i64 1
  br label %74

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

74:                                               ; preds = %69, %62
  %75 = phi ptr [ %68, %62 ], [ %73, %69 ]
  %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 1
  store ptr %75, ptr %77, align 8, !tbaa !11
  %78 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %78, align 4, !tbaa !12
  %79 = call i32 @s2n_calculate_stacktrace()
  br label %80

80:                                               ; preds = %74
  %81 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %81, align 4, !tbaa !14
  br label %318

82:                                               ; No predecessors!
  br label %83

83:                                               ; preds = %82, %46
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %120, label %88

88:                                               ; preds = %85
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %91 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %92 = getelementptr inbounds %struct.s2n_debug_info, ptr %91, i32 0, i32 0
  store ptr @.str.23, ptr %92, align 8, !tbaa !9
  %93 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %94 = getelementptr inbounds %struct.s2n_debug_info, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %95, i64 21
  %97 = call ptr @strrchr(ptr noundef %96, i32 noundef 47) #5
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %106

99:                                               ; preds = %90
  %100 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %101 = getelementptr inbounds %struct.s2n_debug_info, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %102, i64 21
  %104 = call ptr @strrchr(ptr noundef %103, i32 noundef 47) #5
  %105 = getelementptr inbounds i8, ptr %104, i64 1
  br label %111

106:                                              ; preds = %90
  %107 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %108 = getelementptr inbounds %struct.s2n_debug_info, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds i8, ptr %109, i64 21
  br label %111

111:                                              ; preds = %106, %99
  %112 = phi ptr [ %105, %99 ], [ %110, %106 ]
  %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 1
  store ptr %112, ptr %114, align 8, !tbaa !11
  %115 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %115, align 4, !tbaa !12
  %116 = call i32 @s2n_calculate_stacktrace()
  br label %117

117:                                              ; preds = %111
  %118 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %118, align 4, !tbaa !14
  br label %318

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %85
  br label %121

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #6
  store i16 0, ptr %6, align 2, !tbaa !21
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %123, i32 0, i32 1
  %125 = call i32 @s2n_stuffer_read_uint16(ptr noundef %124, ptr noundef %6)
  %126 = icmp sgt i32 %125, -1
  br i1 %126, label %129, label %127

127:                                              ; preds = %122
  %128 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %128, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %317

129:                                              ; preds = %122
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load i16, ptr %6, align 2, !tbaa !21
  %134 = zext i16 %133 to i32
  %135 = icmp sgt i32 %134, 0
  br i1 %135, label %170, label %136

136:                                              ; preds = %132
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  %139 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %140 = getelementptr inbounds %struct.s2n_debug_info, ptr %139, i32 0, i32 0
  store ptr @.str.24, ptr %140, align 8, !tbaa !9
  %141 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %142 = getelementptr inbounds %struct.s2n_debug_info, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %143, i64 21
  %145 = call ptr @strrchr(ptr noundef %144, i32 noundef 47) #5
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %154

147:                                              ; preds = %138
  %148 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %149 = getelementptr inbounds %struct.s2n_debug_info, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = getelementptr inbounds i8, ptr %150, i64 21
  %152 = call ptr @strrchr(ptr noundef %151, i32 noundef 47) #5
  %153 = getelementptr inbounds i8, ptr %152, i64 1
  br label %159

154:                                              ; preds = %138
  %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
  br label %159

159:                                              ; preds = %154, %147
  %160 = phi ptr [ %153, %147 ], [ %158, %154 ]
  %161 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %162 = getelementptr inbounds %struct.s2n_debug_info, ptr %161, i32 0, i32 1
  store ptr %160, ptr %162, align 8, !tbaa !11
  %163 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %163, align 4, !tbaa !12
  %164 = call i32 @s2n_calculate_stacktrace()
  br label %165

165:                                              ; preds = %159
  br label %166

166:                                              ; preds = %165
  %167 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %167, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %317

168:                                              ; No predecessors!
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169, %132
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %173, i32 0, i32 1
  %175 = load i16, ptr %6, align 2, !tbaa !21
  %176 = zext i16 %175 to i32
  %177 = call ptr @s2n_stuffer_raw_read(ptr noundef %174, i32 noundef %176)
  store ptr %177, ptr %8, align 8, !tbaa !5
  br label %178

178:                                              ; preds = %172
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = icmp ne ptr %179, null
  br i1 %180, label %215, label %181

181:                                              ; preds = %178
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  %184 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %185 = getelementptr inbounds %struct.s2n_debug_info, ptr %184, i32 0, i32 0
  store ptr @.str.25, ptr %185, align 8, !tbaa !9
  %186 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %187 = getelementptr inbounds %struct.s2n_debug_info, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !9
  %189 = getelementptr inbounds i8, ptr %188, i64 21
  %190 = call ptr @strrchr(ptr noundef %189, i32 noundef 47) #5
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %199

192:                                              ; preds = %183
  %193 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %194 = getelementptr inbounds %struct.s2n_debug_info, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !9
  %196 = getelementptr inbounds i8, ptr %195, i64 21
  %197 = call ptr @strrchr(ptr noundef %196, i32 noundef 47) #5
  %198 = getelementptr inbounds i8, ptr %197, i64 1
  br label %204

199:                                              ; preds = %183
  %200 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %201 = getelementptr inbounds %struct.s2n_debug_info, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  %203 = getelementptr inbounds i8, ptr %202, i64 21
  br label %204

204:                                              ; preds = %199, %192
  %205 = phi ptr [ %198, %192 ], [ %203, %199 ]
  %206 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %207 = getelementptr inbounds %struct.s2n_debug_info, ptr %206, i32 0, i32 1
  store ptr %205, ptr %207, align 8, !tbaa !11
  %208 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %208, align 4, !tbaa !12
  %209 = call i32 @s2n_calculate_stacktrace()
  br label %210

210:                                              ; preds = %204
  br label %211

211:                                              ; preds = %210
  %212 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %212, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

213:                                              ; No predecessors!
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214, %178
  br label %216

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !16
  %221 = getelementptr inbounds %struct.s2n_connection, ptr %220, i32 0, i32 33
  %222 = getelementptr inbounds %struct.s2n_psk_parameters, ptr %221, i32 0, i32 0
  %223 = load i32, ptr %222, align 8, !tbaa !22
  %224 = icmp eq i32 %223, 1
  br i1 %224, label %225, label %236

225:                                              ; preds = %217
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %227, i32 0, i32 1
  %229 = call i32 @s2n_stuffer_skip_read(ptr noundef %228, i32 noundef 4)
  %230 = icmp sgt i32 %229, -1
  br i1 %230, label %233, label %231

231:                                              ; preds = %226
  %232 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %232, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

233:                                              ; preds = %226
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234
  br label %249

236:                                              ; preds = %217
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %238, i32 0, i32 1
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.s2n_offered_psk, ptr %240, i32 0, i32 2
  %242 = call i32 @s2n_stuffer_read_uint32(ptr noundef %239, ptr noundef %241)
  %243 = icmp sgt i32 %242, -1
  br i1 %243, label %246, label %244

244:                                              ; preds = %237
  %245 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %245, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

246:                                              ; preds = %237
  br label %247

247:                                              ; preds = %246
  br label %248

248:                                              ; preds = %247
  br label %249

249:                                              ; preds = %248, %235
  br label %250

250:                                              ; preds = %249
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.s2n_offered_psk, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = load i16, ptr %6, align 2, !tbaa !21
  %255 = zext i16 %254 to i32
  %256 = call i32 @s2n_blob_init(ptr noundef %252, ptr noundef %253, i32 noundef %255)
  %257 = icmp sgt i32 %256, -1
  br i1 %257, label %260, label %258

258:                                              ; preds = %250
  %259 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %259, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

260:                                              ; preds = %250
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %263, i32 0, i32 2
  %265 = load i16, ptr %264, align 8, !tbaa !46
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.s2n_offered_psk, ptr %266, i32 0, i32 1
  store i16 %265, ptr %267, align 8, !tbaa !47
  br label %268

268:                                              ; preds = %262
  %269 = load ptr, ptr %4, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %269, i32 0, i32 2
  %271 = load i16, ptr %270, align 8, !tbaa !46
  %272 = zext i16 %271 to i32
  %273 = icmp slt i32 %272, 65535
  br i1 %273, label %308, label %274

274:                                              ; preds = %268
  br label %275

275:                                              ; preds = %274
  br label %276

276:                                              ; preds = %275
  %277 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %278 = getelementptr inbounds %struct.s2n_debug_info, ptr %277, i32 0, i32 0
  store ptr @.str.26, ptr %278, align 8, !tbaa !9
  %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 !9
  %282 = getelementptr inbounds i8, ptr %281, i64 21
  %283 = call ptr @strrchr(ptr noundef %282, i32 noundef 47) #5
  %284 = icmp ne ptr %283, null
  br i1 %284, label %285, label %292

285:                                              ; preds = %276
  %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 !9
  %289 = getelementptr inbounds i8, ptr %288, i64 21
  %290 = call ptr @strrchr(ptr noundef %289, i32 noundef 47) #5
  %291 = getelementptr inbounds i8, ptr %290, i64 1
  br label %297

292:                                              ; preds = %276
  %293 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %294 = getelementptr inbounds %struct.s2n_debug_info, ptr %293, i32 0, i32 0
  %295 = load ptr, ptr %294, align 8, !tbaa !9
  %296 = getelementptr inbounds i8, ptr %295, i64 21
  br label %297

297:                                              ; preds = %292, %285
  %298 = phi ptr [ %291, %285 ], [ %296, %292 ]
  %299 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %300 = getelementptr inbounds %struct.s2n_debug_info, ptr %299, i32 0, i32 1
  store ptr %298, ptr %300, align 8, !tbaa !11
  %301 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653251, ptr %301, align 4, !tbaa !12
  %302 = call i32 @s2n_calculate_stacktrace()
  br label %303

303:                                              ; preds = %297
  br label %304

304:                                              ; preds = %303
  %305 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %305, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

306:                                              ; No predecessors!
  br label %307

307:                                              ; preds = %306
  br label %308

308:                                              ; preds = %307, %268
  br label %309

309:                                              ; preds = %308
  br label %310

310:                                              ; preds = %309
  %311 = load ptr, ptr %4, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.s2n_offered_psk_list, ptr %311, i32 0, i32 2
  %313 = load i16, ptr %312, align 8, !tbaa !46
  %314 = add i16 %313, 1
  store i16 %314, ptr %312, align 8, !tbaa !46
  %315 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 0, ptr %315, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %316

316:                                              ; preds = %310, %304, %258, %244, %231, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %317

317:                                              ; preds = %316, %166, %127
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #6
  br label %318

318:                                              ; preds = %317, %117, %80, %41
  %319 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  %320 = load i32, ptr %319, align 4
  ret i32 %320
}

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

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

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

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

declare i32 @s2n_blob_init(ptr noundef, ptr noundef, i32 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 = { 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 willreturn memory(read) }
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/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 0}
!15 = !{!"", !13, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"s2n_offered_psk_list", !6, i64 0, !18, i64 8, !20, i64 48}
!18 = !{!"s2n_stuffer", !19, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 36, !13, i64 36}
!19 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!20 = !{!"short", !7, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{!23, !13, i64 1688}
!23 = !{!"s2n_connection", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !7, i64 102, !7, i64 124, !13, i64 148, !13, i64 152, !24, i64 160, !25, i64 168, !25, i64 176, !7, i64 184, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !7, i64 220, !7, i64 221, !7, i64 222, !6, i64 224, !6, i64 232, !26, i64 240, !6, i64 632, !6, i64 640, !27, i64 648, !33, i64 1144, !36, i64 1688, !6, i64 1752, !7, i64 1760, !13, i64 1764, !7, i64 1768, !18, i64 1776, !18, i64 1816, !18, i64 1856, !18, i64 1896, !13, i64 1936, !25, i64 1944, !7, i64 1952, !18, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !32, i64 2003, !15, i64 2004, !15, i64 2008, !38, i64 2016, !20, i64 2208, !13, i64 2212, !20, i64 2216, !25, i64 2224, !7, i64 2232, !25, i64 2240, !25, i64 2248, !25, i64 2256, !15, i64 2264, !15, i64 2268, !7, i64 2272, !7, i64 2528, !13, i64 2784, !19, i64 2792, !13, i64 2816, !19, i64 2824, !19, i64 2848, !19, i64 2872, !40, i64 2896, !42, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !13, i64 3780, !19, i64 3784, !13, i64 3808, !44, i64 3816, !7, i64 3848, !18, i64 3992, !19, i64 4032, !19, i64 4056, !32, i64 4080, !32, i64 4081, !32, i64 4082, !20, i64 4084, !20, i64 4086, !13, i64 4088, !13, i64 4092, !19, i64 4096, !13, i64 4120, !45, i64 4128, !15, i64 4176, !7, i64 4180, !7, i64 4181}
!24 = !{!"s2n_timer", !25, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"s2n_secrets", !7, i64 0, !13, i64 388}
!27 = !{!"s2n_kex_parameters", !28, i64 0, !29, i64 8, !7, i64 24, !29, i64 56, !30, i64 72, !30, i64 184, !7, i64 296, !31, i64 360, !19, i64 448, !19, i64 472}
!28 = !{!"s2n_dh_params", !6, i64 0}
!29 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!30 = !{!"s2n_kem_group_params", !6, i64 0, !31, i64 8, !29, i64 96}
!31 = !{!"s2n_kem_params", !6, i64 0, !19, i64 8, !19, i64 32, !19, i64 56, !32, i64 80}
!32 = !{!"_Bool", !7, i64 0}
!33 = !{!"s2n_handshake_parameters", !34, i64 0, !34, i64 48, !19, i64 96, !13, i64 120, !35, i64 124, !6, i64 384, !6, i64 392, !6, i64 400, !7, i64 408, !7, i64 440, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 506}
!34 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!35 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!36 = !{!"s2n_psk_parameters", !13, i64 0, !37, i64 8, !20, i64 40, !20, i64 42, !6, i64 48, !13, i64 56}
!37 = !{!"s2n_array", !19, i64 0, !13, i64 24, !13, i64 28}
!38 = !{!"s2n_handshake", !18, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !39, i64 176, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 188}
!39 = !{!"s2n_offered_early_data", !6, i64 0}
!40 = !{!"s2n_client_hello", !19, i64 0, !41, i64 24, !19, i64 728, !19, i64 752, !19, i64 776, !7, i64 800, !7, i64 801, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802}
!41 = !{!"", !7, i64 0, !19, i64 672, !20, i64 696}
!42 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !20, i64 18, !6, i64 24, !13, i64 32, !6, i64 40, !43, i64 48, !32, i64 52}
!43 = !{!"s2n_cert_validation_info", !13, i64 0, !13, i64 0}
!44 = !{!"s2n_ticket_fields", !19, i64 0, !13, i64 24}
!45 = !{!"s2n_post_handshake", !18, i64 0, !7, i64 40}
!46 = !{!17, !20, i64 48}
!47 = !{!48, !20, i64 24}
!48 = !{!"s2n_offered_psk", !19, i64 0, !20, i64 24, !13, i64 28}


; 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.21 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.26 = 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_offered_psk_list_read_next(ptr noundef %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca i16, align 2
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %12

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

12:                                               ; preds = %2
  %13 = load ptr, ptr %0, align 8, !tbaa !13
  %.not26 = icmp eq ptr %13, null
  br i1 %.not26, label %14, label %22

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

22:                                               ; preds = %12
  %.not28 = icmp eq ptr %1, null
  br i1 %.not28, label %23, label %31

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

31:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #6
  store i16 0, ptr %3, align 2, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = call i32 @s2n_stuffer_read_uint16(ptr noundef nonnull %32, ptr noundef nonnull %3) #6
  %34 = icmp sgt i32 %33, -1
  br i1 %34, label %35, label %87

35:                                               ; preds = %31
  %36 = load i16, ptr %3, align 2, !tbaa !18
  %.not30 = icmp eq i16 %36, 0
  br i1 %.not30, label %37, label %45

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

45:                                               ; preds = %35
  %46 = zext i16 %36 to i32
  %47 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %32, i32 noundef %46) #6
  %.not32 = icmp eq ptr %47, null
  br i1 %.not32, label %48, label %56

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

56:                                               ; preds = %45
  %57 = load ptr, ptr %0, align 8, !tbaa !13
  %58 = getelementptr inbounds i8, ptr %57, i64 1688
  %59 = load i32, ptr %58, align 8, !tbaa !19
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %64

61:                                               ; preds = %56
  %62 = call i32 @s2n_stuffer_skip_read(ptr noundef nonnull %32, i32 noundef 4) #6
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %68, label %87

64:                                               ; preds = %56
  %65 = getelementptr inbounds i8, ptr %1, i64 28
  %66 = call i32 @s2n_stuffer_read_uint32(ptr noundef nonnull %32, ptr noundef nonnull %65) #6
  %67 = icmp sgt i32 %66, -1
  br i1 %67, label %68, label %87

68:                                               ; preds = %61, %64
  %69 = load i16, ptr %3, align 2, !tbaa !18
  %70 = zext i16 %69 to i32
  %71 = call i32 @s2n_blob_init(ptr noundef nonnull %1, ptr noundef nonnull %47, i32 noundef %70) #6
  %72 = icmp sgt i32 %71, -1
  br i1 %72, label %73, label %87

73:                                               ; preds = %68
  %74 = getelementptr inbounds i8, ptr %0, i64 48
  %75 = load i16, ptr %74, align 8, !tbaa !44
  %76 = getelementptr inbounds i8, ptr %1, i64 24
  store i16 %75, ptr %76, align 8, !tbaa !45
  %.not34 = icmp eq i16 %75, -1
  br i1 %.not34, label %77, label %85

77:                                               ; preds = %73
  %78 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.26, ptr %78, align 8, !tbaa !5
  %79 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.26, i64 21), i32 noundef 47) #5
  %.not35 = icmp eq ptr %79, null
  %80 = getelementptr inbounds i8, ptr %79, i64 1
  %81 = select i1 %.not35, ptr getelementptr inbounds (i8, ptr @.str.26, i64 21), ptr %80
  %82 = getelementptr inbounds i8, ptr %78, i64 8
  store ptr %81, ptr %82, align 8, !tbaa !10
  %83 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653251, ptr %83, align 4, !tbaa !11
  %84 = call i32 @s2n_calculate_stacktrace() #6
  br label %87

85:                                               ; preds = %73
  %86 = add nuw i16 %75, 1
  store i16 %86, ptr %74, align 8, !tbaa !44
  br label %87

87:                                               ; preds = %48, %77, %85, %61, %64, %68, %31, %37
  %.sroa.0.1 = phi i32 [ -1, %37 ], [ -1, %31 ], [ 0, %85 ], [ -1, %77 ], [ -1, %48 ], [ -1, %61 ], [ -1, %64 ], [ -1, %68 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #6
  br label %88

88:                                               ; preds = %87, %23, %14, %4
  %.sroa.0.2 = phi i32 [ %.sroa.0.1, %87 ], [ -1, %23 ], [ -1, %14 ], [ -1, %4 ]
  ret i32 %.sroa.0.2
}

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

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

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

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

declare i32 @s2n_blob_init(ptr noundef, ptr noundef, i32 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 = { 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 willreturn memory(read) }
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 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, !7, i64 0}
!14 = !{!"s2n_offered_psk_list", !7, i64 0, !15, i64 8, !17, i64 48}
!15 = !{!"s2n_stuffer", !16, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!16 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!17 = !{!"short", !8, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!20, !12, i64 1688}
!20 = !{!"s2n_connection", !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !8, i64 80, !8, i64 102, !8, i64 124, !12, i64 148, !12, i64 152, !21, i64 160, !22, i64 168, !22, i64 176, !8, i64 184, !8, i64 216, !8, i64 217, !8, i64 218, !8, i64 219, !8, i64 220, !8, i64 221, !8, i64 222, !7, i64 224, !7, i64 232, !23, i64 240, !7, i64 632, !7, i64 640, !24, i64 648, !30, i64 1144, !33, i64 1688, !7, i64 1752, !8, i64 1760, !12, i64 1764, !8, i64 1768, !15, i64 1776, !15, i64 1816, !15, i64 1856, !15, i64 1896, !12, i64 1936, !22, i64 1944, !8, i64 1952, !15, i64 1960, !8, i64 2000, !8, i64 2001, !8, i64 2002, !29, i64 2003, !35, i64 2004, !35, i64 2008, !36, i64 2016, !17, i64 2208, !12, i64 2212, !17, i64 2216, !22, i64 2224, !8, i64 2232, !22, i64 2240, !22, i64 2248, !22, i64 2256, !35, i64 2264, !35, i64 2268, !8, i64 2272, !8, i64 2528, !12, i64 2784, !16, i64 2792, !12, i64 2816, !16, i64 2824, !16, i64 2848, !16, i64 2872, !38, i64 2896, !40, i64 3704, !7, i64 3760, !7, i64 3768, !8, i64 3776, !12, i64 3780, !16, i64 3784, !12, i64 3808, !42, i64 3816, !8, i64 3848, !15, i64 3992, !16, i64 4032, !16, i64 4056, !29, i64 4080, !29, i64 4081, !29, i64 4082, !17, i64 4084, !17, i64 4086, !12, i64 4088, !12, i64 4092, !16, i64 4096, !12, i64 4120, !43, i64 4128, !35, i64 4176, !8, i64 4180, !8, i64 4181}
!21 = !{!"s2n_timer", !22, i64 0}
!22 = !{!"long", !8, i64 0}
!23 = !{!"s2n_secrets", !8, i64 0, !12, i64 388}
!24 = !{!"s2n_kex_parameters", !25, i64 0, !26, i64 8, !8, i64 24, !26, i64 56, !27, i64 72, !27, i64 184, !8, i64 296, !28, i64 360, !16, i64 448, !16, i64 472}
!25 = !{!"s2n_dh_params", !7, i64 0}
!26 = !{!"s2n_ecc_evp_params", !7, i64 0, !7, i64 8}
!27 = !{!"s2n_kem_group_params", !7, i64 0, !28, i64 8, !26, i64 96}
!28 = !{!"s2n_kem_params", !7, i64 0, !16, i64 8, !16, i64 32, !16, i64 56, !29, i64 80}
!29 = !{!"_Bool", !8, i64 0}
!30 = !{!"s2n_handshake_parameters", !31, i64 0, !31, i64 48, !16, i64 96, !12, i64 120, !32, i64 124, !7, i64 384, !7, i64 392, !7, i64 400, !8, i64 408, !8, i64 440, !8, i64 472, !8, i64 473, !8, i64 474, !8, i64 506}
!31 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!32 = !{!"s2n_sig_scheme_list", !8, i64 0, !8, i64 256}
!33 = !{!"s2n_psk_parameters", !12, i64 0, !34, i64 8, !17, i64 40, !17, i64 42, !7, i64 48, !12, i64 56}
!34 = !{!"s2n_array", !16, i64 0, !12, i64 24, !12, i64 28}
!35 = !{!"", !12, i64 0}
!36 = !{!"s2n_handshake", !15, i64 0, !7, i64 40, !8, i64 48, !8, i64 56, !8, i64 104, !8, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !37, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!37 = !{!"s2n_offered_early_data", !7, i64 0}
!38 = !{!"s2n_client_hello", !16, i64 0, !39, i64 24, !16, i64 728, !16, i64 752, !16, i64 776, !8, i64 800, !8, i64 801, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802}
!39 = !{!"", !8, i64 0, !16, i64 672, !17, i64 696}
!40 = !{!"s2n_x509_validator", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !17, i64 18, !7, i64 24, !12, i64 32, !7, i64 40, !41, i64 48, !29, i64 52}
!41 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!42 = !{!"s2n_ticket_fields", !16, i64 0, !12, i64 24}
!43 = !{!"s2n_post_handshake", !15, i64 0, !8, i64 40}
!44 = !{!14, !17, i64 48}
!45 = !{!46, !17, i64 24}
!46 = !{!"s2n_offered_psk", !16, i64 0, !17, i64 24, !12, i64 28}


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