; LLVM IR from aws/s2n-tls :: tests/unit (s2n_resume_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_cipher = type { i32, %union.anon.1, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%union.anon.1 = type { %struct.s2n_composite_cipher }
%struct.s2n_composite_cipher = type { i8, i8, i8, ptr, ptr, ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_unique_ticket_key = type { %struct.s2n_blob, [32 x i8], [32 x i8] }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_session_key = type { ptr }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, 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_ticket_key = type { [16 x i8], [32 x i8], [12 x i8], i64 }
%struct.s2n_aead_cipher = type { i8, i8, i8, ptr, ptr }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@s2n_aes256_gcm = external constant %struct.s2n_cipher, align 8
@.str.36 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [87 x i8], align 1

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

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #5

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_resume_decrypt_session(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 i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca [16 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca %struct.s2n_unique_ticket_key, align 8
  %11 = alloca %struct.s2n_result, align 4
  %12 = alloca [12 x i8], align 1
  %13 = alloca %struct.s2n_blob, align 8
  %14 = alloca %struct.s2n_blob, align 8
  %15 = alloca %struct.s2n_session_key, align 8
  %16 = alloca %struct.s2n_result, align 4
  %17 = alloca %struct.s2n_result, align 4
  %18 = alloca [28 x i8], align 16
  %19 = alloca %struct.s2n_blob, align 8
  %20 = alloca %struct.s2n_stuffer, align 8
  %21 = alloca %struct.s2n_blob, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca %struct.s2n_blob, align 8
  %25 = alloca i32, align 4
  %26 = alloca %struct.s2n_stuffer, align 8
  %27 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %2
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %63, label %31

31:                                               ; preds = %28
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %35 = getelementptr inbounds %struct.s2n_debug_info, ptr %34, i32 0, i32 0
  store ptr @.str.36, ptr %35, align 8, !tbaa !9
  %36 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %37 = getelementptr inbounds %struct.s2n_debug_info, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %38, i64 21
  %40 = call ptr @strrchr(ptr noundef %39, i32 noundef 47) #7
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %49

42:                                               ; preds = %33
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %44 = getelementptr inbounds %struct.s2n_debug_info, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 21
  %47 = call ptr @strrchr(ptr noundef %46, i32 noundef 47) #7
  %48 = getelementptr inbounds i8, ptr %47, i64 1
  br label %54

49:                                               ; preds = %33
  %50 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %51 = getelementptr inbounds %struct.s2n_debug_info, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %52, i64 21
  br label %54

54:                                               ; preds = %49, %42
  %55 = phi ptr [ %48, %42 ], [ %53, %49 ]
  %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 1
  store ptr %55, ptr %57, align 8, !tbaa !11
  %58 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %58, align 4, !tbaa !12
  %59 = call i32 @s2n_calculate_stacktrace()
  br label %60

60:                                               ; preds = %54
  %61 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %61, align 4, !tbaa !14
  br label %506

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62, %28
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %100, label %68

68:                                               ; preds = %65
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %72 = getelementptr inbounds %struct.s2n_debug_info, ptr %71, i32 0, i32 0
  store ptr @.str.37, ptr %72, align 8, !tbaa !9
  %73 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %74 = getelementptr inbounds %struct.s2n_debug_info, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %75, i64 21
  %77 = call ptr @strrchr(ptr noundef %76, i32 noundef 47) #7
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %86

79:                                               ; preds = %70
  %80 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %81 = getelementptr inbounds %struct.s2n_debug_info, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds i8, ptr %82, i64 21
  %84 = call ptr @strrchr(ptr noundef %83, i32 noundef 47) #7
  %85 = getelementptr inbounds i8, ptr %84, i64 1
  br label %91

86:                                               ; preds = %70
  %87 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %88 = getelementptr inbounds %struct.s2n_debug_info, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 21
  br label %91

91:                                               ; preds = %86, %79
  %92 = phi ptr [ %85, %79 ], [ %90, %86 ]
  %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 1
  store ptr %92, ptr %94, align 8, !tbaa !11
  %95 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %95, align 4, !tbaa !12
  %96 = call i32 @s2n_calculate_stacktrace()
  br label %97

97:                                               ; preds = %91
  %98 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %98, align 4, !tbaa !14
  br label %506

99:                                               ; No predecessors!
  br label %100

100:                                              ; preds = %99, %65
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.s2n_connection, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !16
  %106 = icmp ne ptr %105, null
  br i1 %106, label %139, label %107

107:                                              ; preds = %102
  br label %108

108:                                              ; preds = %107
  br label %109

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

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

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

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

136:                                              ; preds = %130
  %137 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %137, align 4, !tbaa !14
  br label %506

138:                                              ; No predecessors!
  br label %139

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

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  store i8 0, ptr %6, align 1, !tbaa !43
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = call i32 @s2n_stuffer_read_uint8(ptr noundef %142, ptr noundef %6)
  %144 = icmp sgt i32 %143, -1
  br i1 %144, label %147, label %145

145:                                              ; preds = %141
  %146 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %146, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %505

147:                                              ; preds = %141
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  %151 = load i8, ptr %6, align 1, !tbaa !43
  %152 = zext i8 %151 to i32
  %153 = icmp eq i32 %152, 1
  br i1 %153, label %188, label %154

154:                                              ; preds = %150
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %158 = getelementptr inbounds %struct.s2n_debug_info, ptr %157, i32 0, i32 0
  store ptr @.str.39, ptr %158, align 8, !tbaa !9
  %159 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %160 = getelementptr inbounds %struct.s2n_debug_info, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  %162 = getelementptr inbounds i8, ptr %161, i64 21
  %163 = call ptr @strrchr(ptr noundef %162, i32 noundef 47) #7
  %164 = icmp ne ptr %163, null
  br i1 %164, label %165, label %172

165:                                              ; preds = %156
  %166 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %167 = getelementptr inbounds %struct.s2n_debug_info, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = getelementptr inbounds i8, ptr %168, i64 21
  %170 = call ptr @strrchr(ptr noundef %169, i32 noundef 47) #7
  %171 = getelementptr inbounds i8, ptr %170, i64 1
  br label %177

172:                                              ; preds = %156
  %173 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %174 = getelementptr inbounds %struct.s2n_debug_info, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = getelementptr inbounds i8, ptr %175, i64 21
  br label %177

177:                                              ; preds = %172, %165
  %178 = phi ptr [ %171, %165 ], [ %176, %172 ]
  %179 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %180 = getelementptr inbounds %struct.s2n_debug_info, ptr %179, i32 0, i32 1
  store ptr %178, ptr %180, align 8, !tbaa !11
  %181 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %181, align 4, !tbaa !12
  %182 = call i32 @s2n_calculate_stacktrace()
  br label %183

183:                                              ; preds = %177
  br label %184

184:                                              ; preds = %183
  %185 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %185, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %505

186:                                              ; No predecessors!
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187, %150
  br label %189

189:                                              ; preds = %188
  br label %190

190:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 16, i1 false)
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %194 = call i32 @s2n_stuffer_read_bytes(ptr noundef %192, ptr noundef %193, i32 noundef 16)
  %195 = icmp sgt i32 %194, -1
  br i1 %195, label %198, label %196

196:                                              ; preds = %191
  %197 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %197, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %504

198:                                              ; preds = %191
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.s2n_connection, ptr %201, i32 0, i32 1
  %203 = load ptr, ptr %202, align 8, !tbaa !16
  %204 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %205 = call ptr @s2n_find_ticket_key(ptr noundef %203, ptr noundef %204)
  store ptr %205, ptr %9, align 8, !tbaa !5
  br label %206

206:                                              ; preds = %200
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = icmp ne ptr %207, null
  br i1 %208, label %243, label %209

209:                                              ; preds = %206
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210
  %212 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %213 = getelementptr inbounds %struct.s2n_debug_info, ptr %212, i32 0, i32 0
  store ptr @.str.40, ptr %213, align 8, !tbaa !9
  %214 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %215 = getelementptr inbounds %struct.s2n_debug_info, ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !9
  %217 = getelementptr inbounds i8, ptr %216, i64 21
  %218 = call ptr @strrchr(ptr noundef %217, i32 noundef 47) #7
  %219 = icmp ne ptr %218, null
  br i1 %219, label %220, label %227

220:                                              ; preds = %211
  %221 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %222 = getelementptr inbounds %struct.s2n_debug_info, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !9
  %224 = getelementptr inbounds i8, ptr %223, i64 21
  %225 = call ptr @strrchr(ptr noundef %224, i32 noundef 47) #7
  %226 = getelementptr inbounds i8, ptr %225, i64 1
  br label %232

227:                                              ; preds = %211
  %228 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %229 = getelementptr inbounds %struct.s2n_debug_info, ptr %228, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !9
  %231 = getelementptr inbounds i8, ptr %230, i64 21
  br label %232

232:                                              ; preds = %227, %220
  %233 = phi ptr [ %226, %220 ], [ %231, %227 ]
  %234 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %235 = getelementptr inbounds %struct.s2n_debug_info, ptr %234, i32 0, i32 1
  store ptr %233, ptr %235, align 8, !tbaa !11
  %236 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762086, ptr %236, align 4, !tbaa !12
  %237 = call i32 @s2n_calculate_stacktrace()
  br label %238

238:                                              ; preds = %232
  br label %239

239:                                              ; preds = %238
  %240 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %240, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %503

241:                                              ; No predecessors!
  br label %242

242:                                              ; preds = %241
  br label %243

243:                                              ; preds = %242, %206
  br label %244

244:                                              ; preds = %243
  br label %245

245:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 88, ptr %10) #8
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 88, i1 false)
  br label %246

246:                                              ; preds = %245
  %247 = getelementptr inbounds %struct.s2n_unique_ticket_key, ptr %10, i32 0, i32 0
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.s2n_ticket_key, ptr %248, i32 0, i32 1
  %250 = getelementptr inbounds [32 x i8], ptr %249, i64 0, i64 0
  %251 = call i32 @s2n_blob_init(ptr noundef %247, ptr noundef %250, i32 noundef 32)
  %252 = icmp sgt i32 %251, -1
  br i1 %252, label %255, label %253

253:                                              ; preds = %246
  %254 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %254, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %502

255:                                              ; preds = %246
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.s2n_unique_ticket_key, ptr %10, i32 0, i32 1
  %261 = getelementptr inbounds [32 x i8], ptr %260, i64 0, i64 0
  %262 = call i32 @s2n_stuffer_read_bytes(ptr noundef %259, ptr noundef %261, i32 noundef 32)
  %263 = icmp sgt i32 %262, -1
  br i1 %263, label %266, label %264

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

266:                                              ; preds = %258
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268
  %270 = call i32 @s2n_resume_generate_unique_ticket_key(ptr noundef %10)
  %271 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %270, ptr %271, align 4
  %272 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %273 = load i32, ptr %272, align 4
  %274 = call zeroext i1 @s2n_result_is_ok(i32 %273)
  br i1 %274, label %277, label %275

275:                                              ; preds = %269
  %276 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %276, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %502

277:                                              ; preds = %269
  br label %278

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 1 %12, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 24, i1 false)
  br label %280

280:                                              ; preds = %279
  %281 = getelementptr inbounds [12 x i8], ptr %12, i64 0, i64 0
  %282 = call i32 @s2n_blob_init(ptr noundef %13, ptr noundef %281, i32 noundef 12)
  %283 = icmp sgt i32 %282, -1
  br i1 %283, label %286, label %284

284:                                              ; preds = %280
  %285 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %285, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %501

286:                                              ; preds = %280
  br label %287

287:                                              ; preds = %286
  br label %288

288:                                              ; preds = %287
  br label %289

289:                                              ; preds = %288
  %290 = load ptr, ptr %5, align 8, !tbaa !5
  %291 = call i32 @s2n_stuffer_read(ptr noundef %290, ptr noundef %13)
  %292 = icmp sgt i32 %291, -1
  br i1 %292, label %295, label %293

293:                                              ; preds = %289
  %294 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %294, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %501

295:                                              ; preds = %289
  br label %296

296:                                              ; preds = %295
  br label %297

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

298:                                              ; preds = %297
  %299 = getelementptr inbounds %struct.s2n_unique_ticket_key, ptr %10, i32 0, i32 2
  %300 = getelementptr inbounds [32 x i8], ptr %299, i64 0, i64 0
  %301 = call i32 @s2n_blob_init(ptr noundef %14, ptr noundef %300, i32 noundef 32)
  %302 = icmp sgt i32 %301, -1
  br i1 %302, label %305, label %303

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

305:                                              ; preds = %298
  br label %306

306:                                              ; preds = %305
  br label %307

307:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 8, i1 false)
  br label %308

308:                                              ; preds = %307
  %309 = call i32 @s2n_session_key_alloc(ptr noundef %15)
  %310 = icmp sgt i32 %309, -1
  br i1 %310, label %313, label %311

311:                                              ; preds = %308
  %312 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %312, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %498

313:                                              ; preds = %308
  br label %314

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  %317 = load ptr, ptr getelementptr inbounds (%struct.s2n_cipher, ptr @s2n_aes256_gcm, i32 0, i32 4), align 8, !tbaa !44
  %318 = call i32 %317(ptr noundef %15)
  %319 = getelementptr inbounds %struct.s2n_result, ptr %16, i32 0, i32 0
  store i32 %318, ptr %319, align 4
  %320 = getelementptr inbounds %struct.s2n_result, ptr %16, i32 0, i32 0
  %321 = load i32, ptr %320, align 4
  %322 = call zeroext i1 @s2n_result_is_ok(i32 %321)
  br i1 %322, label %325, label %323

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

325:                                              ; preds = %316
  br label %326

326:                                              ; preds = %325
  br label %327

327:                                              ; preds = %326
  br label %328

328:                                              ; preds = %327
  %329 = load ptr, ptr getelementptr inbounds (%struct.s2n_cipher, ptr @s2n_aes256_gcm, i32 0, i32 5), align 8, !tbaa !46
  %330 = call i32 %329(ptr noundef %15, ptr noundef %14)
  %331 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  store i32 %330, ptr %331, align 4
  %332 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  %333 = load i32, ptr %332, align 4
  %334 = call zeroext i1 @s2n_result_is_ok(i32 %333)
  br i1 %334, label %337, label %335

335:                                              ; preds = %328
  %336 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %336, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %498

337:                                              ; preds = %328
  br label %338

338:                                              ; preds = %337
  br label %339

339:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 28, ptr %18) #8
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 28, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 24, i1 false)
  br label %340

340:                                              ; preds = %339
  %341 = getelementptr inbounds [28 x i8], ptr %18, i64 0, i64 0
  %342 = call i32 @s2n_blob_init(ptr noundef %19, ptr noundef %341, i32 noundef 28)
  %343 = icmp sgt i32 %342, -1
  br i1 %343, label %346, label %344

344:                                              ; preds = %340
  %345 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %345, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %497

346:                                              ; preds = %340
  br label %347

347:                                              ; preds = %346
  br label %348

348:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #8
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 40, i1 false)
  br label %349

349:                                              ; preds = %348
  %350 = call i32 @s2n_stuffer_init(ptr noundef %20, ptr noundef %19)
  %351 = icmp sgt i32 %350, -1
  br i1 %351, label %354, label %352

352:                                              ; preds = %349
  %353 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %353, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %496

354:                                              ; preds = %349
  br label %355

355:                                              ; preds = %354
  br label %356

356:                                              ; preds = %355
  br label %357

357:                                              ; preds = %356
  %358 = load ptr, ptr %9, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.s2n_ticket_key, ptr %358, i32 0, i32 2
  %360 = getelementptr inbounds [12 x i8], ptr %359, i64 0, i64 0
  %361 = call i32 @s2n_stuffer_write_bytes(ptr noundef %20, ptr noundef %360, i32 noundef 12)
  %362 = icmp sgt i32 %361, -1
  br i1 %362, label %365, label %363

363:                                              ; preds = %357
  %364 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %364, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %496

365:                                              ; preds = %357
  br label %366

366:                                              ; preds = %365
  br label %367

367:                                              ; preds = %366
  br label %368

368:                                              ; preds = %367
  %369 = load ptr, ptr %9, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.s2n_ticket_key, ptr %369, i32 0, i32 0
  %371 = getelementptr inbounds [16 x i8], ptr %370, i64 0, i64 0
  %372 = call i32 @s2n_stuffer_write_bytes(ptr noundef %20, ptr noundef %371, i32 noundef 16)
  %373 = icmp sgt i32 %372, -1
  br i1 %373, label %376, label %374

374:                                              ; preds = %368
  %375 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %375, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %496

376:                                              ; preds = %368
  br label %377

377:                                              ; preds = %376
  br label %378

378:                                              ; preds = %377
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %379 = load ptr, ptr %5, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.s2n_stuffer, ptr %379, i32 0, i32 2
  %381 = load i32, ptr %380, align 4, !tbaa !47
  %382 = load ptr, ptr %5, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.s2n_stuffer, ptr %382, i32 0, i32 1
  %384 = load i32, ptr %383, align 8, !tbaa !48
  %385 = sub i32 %381, %384
  store i32 %385, ptr %22, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %386 = load ptr, ptr %5, align 8, !tbaa !5
  %387 = load i32, ptr %22, align 4, !tbaa !12
  %388 = call ptr @s2n_stuffer_raw_read(ptr noundef %386, i32 noundef %387)
  store ptr %388, ptr %23, align 8, !tbaa !5
  br label %389

389:                                              ; preds = %378
  %390 = load ptr, ptr %23, align 8, !tbaa !5
  %391 = icmp ne ptr %390, null
  br i1 %391, label %426, label %392

392:                                              ; preds = %389
  br label %393

393:                                              ; preds = %392
  br label %394

394:                                              ; preds = %393
  %395 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %396 = getelementptr inbounds %struct.s2n_debug_info, ptr %395, i32 0, i32 0
  store ptr @.str.41, ptr %396, align 8, !tbaa !9
  %397 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %398 = getelementptr inbounds %struct.s2n_debug_info, ptr %397, i32 0, i32 0
  %399 = load ptr, ptr %398, align 8, !tbaa !9
  %400 = getelementptr inbounds i8, ptr %399, i64 21
  %401 = call ptr @strrchr(ptr noundef %400, i32 noundef 47) #7
  %402 = icmp ne ptr %401, null
  br i1 %402, label %403, label %410

403:                                              ; preds = %394
  %404 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %405 = getelementptr inbounds %struct.s2n_debug_info, ptr %404, i32 0, i32 0
  %406 = load ptr, ptr %405, align 8, !tbaa !9
  %407 = getelementptr inbounds i8, ptr %406, i64 21
  %408 = call ptr @strrchr(ptr noundef %407, i32 noundef 47) #7
  %409 = getelementptr inbounds i8, ptr %408, i64 1
  br label %415

410:                                              ; preds = %394
  %411 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %412 = getelementptr inbounds %struct.s2n_debug_info, ptr %411, i32 0, i32 0
  %413 = load ptr, ptr %412, align 8, !tbaa !9
  %414 = getelementptr inbounds i8, ptr %413, i64 21
  br label %415

415:                                              ; preds = %410, %403
  %416 = phi ptr [ %409, %403 ], [ %414, %410 ]
  %417 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %418 = getelementptr inbounds %struct.s2n_debug_info, ptr %417, i32 0, i32 1
  store ptr %416, ptr %418, align 8, !tbaa !11
  %419 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %419, align 4, !tbaa !12
  %420 = call i32 @s2n_calculate_stacktrace()
  br label %421

421:                                              ; preds = %415
  br label %422

422:                                              ; preds = %421
  %423 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %423, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %495

424:                                              ; No predecessors!
  br label %425

425:                                              ; preds = %424
  br label %426

426:                                              ; preds = %425, %389
  br label %427

427:                                              ; preds = %426
  br label %428

428:                                              ; preds = %427
  br label %429

429:                                              ; preds = %428
  %430 = load ptr, ptr %23, align 8, !tbaa !5
  %431 = load i32, ptr %22, align 4, !tbaa !12
  %432 = call i32 @s2n_blob_init(ptr noundef %21, ptr noundef %430, i32 noundef %431)
  %433 = icmp sgt i32 %432, -1
  br i1 %433, label %436, label %434

434:                                              ; preds = %429
  %435 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %435, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %495

436:                                              ; preds = %429
  br label %437

437:                                              ; preds = %436
  br label %438

438:                                              ; preds = %437
  br label %439

439:                                              ; preds = %438
  %440 = load ptr, ptr getelementptr inbounds (%struct.s2n_aead_cipher, ptr getelementptr inbounds (%struct.s2n_cipher, ptr @s2n_aes256_gcm, i32 0, i32 1), i32 0, i32 3), align 8, !tbaa !43
  %441 = call i32 %440(ptr noundef %15, ptr noundef %13, ptr noundef %19, ptr noundef %21, ptr noundef %21)
  %442 = icmp sgt i32 %441, -1
  br i1 %442, label %445, label %443

443:                                              ; preds = %439
  %444 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %444, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %495

445:                                              ; preds = %439
  br label %446

446:                                              ; preds = %445
  br label %447

447:                                              ; preds = %446
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %448 = load i32, ptr %22, align 4, !tbaa !12
  %449 = sub i32 %448, 16
  store i32 %449, ptr %25, align 4, !tbaa !12
  br label %450

450:                                              ; preds = %447
  %451 = getelementptr inbounds %struct.s2n_blob, ptr %21, i32 0, i32 0
  %452 = load ptr, ptr %451, align 8, !tbaa !49
  %453 = load i32, ptr %25, align 4, !tbaa !12
  %454 = call i32 @s2n_blob_init(ptr noundef %24, ptr noundef %452, i32 noundef %453)
  %455 = icmp sgt i32 %454, -1
  br i1 %455, label %458, label %456

456:                                              ; preds = %450
  %457 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %457, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %494

458:                                              ; preds = %450
  br label %459

459:                                              ; preds = %458
  br label %460

460:                                              ; preds = %459
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #8
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 40, i1 false)
  br label %461

461:                                              ; preds = %460
  %462 = call i32 @s2n_stuffer_init(ptr noundef %26, ptr noundef %24)
  %463 = icmp sgt i32 %462, -1
  br i1 %463, label %466, label %464

464:                                              ; preds = %461
  %465 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %465, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %493

466:                                              ; preds = %461
  br label %467

467:                                              ; preds = %466
  br label %468

468:                                              ; preds = %467
  br label %469

469:                                              ; preds = %468
  %470 = load i32, ptr %25, align 4, !tbaa !12
  %471 = call i32 @s2n_stuffer_skip_write(ptr noundef %26, i32 noundef %470)
  %472 = icmp sgt i32 %471, -1
  br i1 %472, label %475, label %473

473:                                              ; preds = %469
  %474 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %474, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %493

475:                                              ; preds = %469
  br label %476

476:                                              ; preds = %475
  br label %477

477:                                              ; preds = %476
  br label %478

478:                                              ; preds = %477
  %479 = load ptr, ptr %4, align 8, !tbaa !5
  %480 = load ptr, ptr %5, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.s2n_stuffer, ptr %480, i32 0, i32 0
  %482 = call i32 @s2n_deserialize_resumption_state(ptr noundef %479, ptr noundef %481, ptr noundef %26)
  %483 = getelementptr inbounds %struct.s2n_result, ptr %27, i32 0, i32 0
  store i32 %482, ptr %483, align 4
  %484 = getelementptr inbounds %struct.s2n_result, ptr %27, i32 0, i32 0
  %485 = load i32, ptr %484, align 4
  %486 = call zeroext i1 @s2n_result_is_ok(i32 %485)
  br i1 %486, label %489, label %487

487:                                              ; preds = %478
  %488 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %488, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %493

489:                                              ; preds = %478
  br label %490

490:                                              ; preds = %489
  br label %491

491:                                              ; preds = %490
  %492 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 0, ptr %492, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %493

493:                                              ; preds = %491, %487, %473, %464
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #8
  br label %494

494:                                              ; preds = %493, %456
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %495

495:                                              ; preds = %494, %443, %434, %422
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  br label %496

496:                                              ; preds = %495, %374, %363, %352
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #8
  br label %497

497:                                              ; preds = %496, %344
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 28, ptr %18) #8
  br label %498

498:                                              ; preds = %497, %335, %323, %311
  %499 = call i32 @s2n_session_key_free(ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %500

500:                                              ; preds = %498, %303
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  br label %501

501:                                              ; preds = %500, %293, %284
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  br label %502

502:                                              ; preds = %501, %275, %264, %253
  call void @llvm.lifetime.end.p0(i64 88, ptr %10) #8
  br label %503

503:                                              ; preds = %502, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %504

504:                                              ; preds = %503, %196
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %505

505:                                              ; preds = %504, %184, %145
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %506

506:                                              ; preds = %505, %136, %97, %60
  %507 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  %508 = load i32, ptr %507, align 4
  ret i32 %508
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @s2n_find_ticket_key(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_resume_generate_unique_ticket_key(ptr noundef) #4

declare i32 @s2n_session_key_free(ptr noundef) #3

declare i32 @s2n_session_key_alloc(ptr noundef) #3

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 8}
!17 = !{!"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, !18, i64 160, !19, i64 168, !19, 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, !20, i64 240, !6, i64 632, !6, i64 640, !21, i64 648, !28, i64 1144, !31, i64 1688, !6, i64 1752, !7, i64 1760, !13, i64 1764, !7, i64 1768, !34, i64 1776, !34, i64 1816, !34, i64 1856, !34, i64 1896, !13, i64 1936, !19, i64 1944, !7, i64 1952, !34, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !27, i64 2003, !15, i64 2004, !15, i64 2008, !35, i64 2016, !33, i64 2208, !13, i64 2212, !33, i64 2216, !19, i64 2224, !7, i64 2232, !19, i64 2240, !19, i64 2248, !19, i64 2256, !15, i64 2264, !15, i64 2268, !7, i64 2272, !7, i64 2528, !13, i64 2784, !26, i64 2792, !13, i64 2816, !26, i64 2824, !26, i64 2848, !26, i64 2872, !37, i64 2896, !39, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !13, i64 3780, !26, i64 3784, !13, i64 3808, !41, i64 3816, !7, i64 3848, !34, i64 3992, !26, i64 4032, !26, i64 4056, !27, i64 4080, !27, i64 4081, !27, i64 4082, !33, i64 4084, !33, i64 4086, !13, i64 4088, !13, i64 4092, !26, i64 4096, !13, i64 4120, !42, i64 4128, !15, i64 4176, !7, i64 4180, !7, i64 4181}
!18 = !{!"s2n_timer", !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"s2n_secrets", !7, i64 0, !13, i64 388}
!21 = !{!"s2n_kex_parameters", !22, i64 0, !23, i64 8, !7, i64 24, !23, i64 56, !24, i64 72, !24, i64 184, !7, i64 296, !25, i64 360, !26, i64 448, !26, i64 472}
!22 = !{!"s2n_dh_params", !6, i64 0}
!23 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!24 = !{!"s2n_kem_group_params", !6, i64 0, !25, i64 8, !23, i64 96}
!25 = !{!"s2n_kem_params", !6, i64 0, !26, i64 8, !26, i64 32, !26, i64 56, !27, i64 80}
!26 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!27 = !{!"_Bool", !7, i64 0}
!28 = !{!"s2n_handshake_parameters", !29, i64 0, !29, i64 48, !26, i64 96, !13, i64 120, !30, 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}
!29 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!30 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!31 = !{!"s2n_psk_parameters", !13, i64 0, !32, i64 8, !33, i64 40, !33, i64 42, !6, i64 48, !13, i64 56}
!32 = !{!"s2n_array", !26, i64 0, !13, i64 24, !13, i64 28}
!33 = !{!"short", !7, i64 0}
!34 = !{!"s2n_stuffer", !26, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 36, !13, i64 36}
!35 = !{!"s2n_handshake", !34, 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, !36, i64 176, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 188}
!36 = !{!"s2n_offered_early_data", !6, i64 0}
!37 = !{!"s2n_client_hello", !26, i64 0, !38, i64 24, !26, i64 728, !26, i64 752, !26, 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}
!38 = !{!"", !7, i64 0, !26, i64 672, !33, i64 696}
!39 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !33, i64 18, !6, i64 24, !13, i64 32, !6, i64 40, !40, i64 48, !27, i64 52}
!40 = !{!"s2n_cert_validation_info", !13, i64 0, !13, i64 0}
!41 = !{!"s2n_ticket_fields", !26, i64 0, !13, i64 24}
!42 = !{!"s2n_post_handshake", !34, i64 0, !7, i64 40}
!43 = !{!7, !7, i64 0}
!44 = !{!45, !6, i64 64}
!45 = !{!"s2n_cipher", !13, i64 0, !7, i64 8, !7, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!46 = !{!45, !6, i64 72}
!47 = !{!34, !13, i64 28}
!48 = !{!34, !13, i64 24}
!49 = !{!26, !6, 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_cipher = type { i32, %union.anon.1, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%union.anon.1 = type { %struct.s2n_composite_cipher }
%struct.s2n_composite_cipher = type { i8, i8, i8, ptr, ptr, ptr, ptr }
%struct.s2n_unique_ticket_key = type { %struct.s2n_blob, [32 x i8], [32 x i8] }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_session_key = type { ptr }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }

@_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
@s2n_aes256_gcm = external local_unnamed_addr constant %struct.s2n_cipher, align 8
@.str.36 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [87 x i8], align 1

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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

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

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

declare i32 @s2n_stuffer_read_uint8(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) local_unnamed_addr #5

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

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

declare i32 @s2n_stuffer_init(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_resume_decrypt_session(ptr noundef %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca i8, align 1
  %4 = alloca [16 x i8], align 16
  %5 = alloca %struct.s2n_unique_ticket_key, align 8
  %6 = alloca [12 x i8], align 1
  %7 = alloca %struct.s2n_blob, align 8
  %8 = alloca %struct.s2n_blob, align 8
  %9 = alloca %struct.s2n_session_key, align 8
  %10 = alloca [28 x i8], align 16
  %11 = alloca %struct.s2n_blob, align 8
  %12 = alloca %struct.s2n_stuffer, align 8
  %13 = alloca %struct.s2n_blob, align 8
  %14 = alloca %struct.s2n_blob, align 8
  %15 = alloca %struct.s2n_stuffer, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %16, label %24

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

24:                                               ; preds = %2
  %.not37 = icmp eq ptr %1, null
  br i1 %.not37, label %25, label %33

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

33:                                               ; preds = %24
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %.not39 = icmp eq ptr %35, null
  br i1 %.not39, label %36, label %44

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

44:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  store i8 0, ptr %3, align 1, !tbaa !41
  %45 = call i32 @s2n_stuffer_read_uint8(ptr noundef nonnull %1, ptr noundef nonnull %3) #8
  %46 = icmp sgt i32 %45, -1
  br i1 %46, label %47, label %164

47:                                               ; preds = %44
  %48 = load i8, ptr %3, align 1, !tbaa !41
  %49 = icmp eq i8 %48, 1
  br i1 %49, label %58, label %50

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

58:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %59 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %1, ptr noundef nonnull %4, i32 noundef 16) #8
  %60 = icmp sgt i32 %59, -1
  br i1 %60, label %61, label %163

61:                                               ; preds = %58
  %62 = load ptr, ptr %34, align 8, !tbaa !13
  %63 = call ptr @s2n_find_ticket_key(ptr noundef %62, ptr noundef nonnull %4)
  %.not42 = icmp eq ptr %63, null
  br i1 %.not42, label %64, label %72

64:                                               ; preds = %61
  %65 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.40, ptr %65, align 8, !tbaa !5
  %66 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.40, i64 21), i32 noundef 47) #7
  %.not43 = icmp eq ptr %66, null
  %67 = getelementptr inbounds i8, ptr %66, i64 1
  %68 = select i1 %.not43, ptr getelementptr inbounds (i8, ptr @.str.40, i64 21), ptr %67
  %69 = getelementptr inbounds i8, ptr %65, i64 8
  store ptr %68, ptr %69, align 8, !tbaa !10
  %70 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762086, ptr %70, align 4, !tbaa !11
  %71 = call i32 @s2n_calculate_stacktrace() #8
  br label %163

72:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %5, i8 0, i64 88, i1 false)
  %73 = getelementptr inbounds i8, ptr %63, i64 16
  %74 = call i32 @s2n_blob_init(ptr noundef nonnull %5, ptr noundef nonnull %73, i32 noundef 32) #8
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %76, label %162

76:                                               ; preds = %72
  %77 = getelementptr inbounds i8, ptr %5, i64 24
  %78 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %1, ptr noundef nonnull %77, i32 noundef 32) #8
  %79 = icmp sgt i32 %78, -1
  br i1 %79, label %80, label %162

80:                                               ; preds = %76
  %81 = call i32 @s2n_resume_generate_unique_ticket_key(ptr noundef nonnull %5)
  %82 = call zeroext i1 @s2n_result_is_ok(i32 %81)
  br i1 %82, label %83, label %162

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(12) %6, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %84 = call i32 @s2n_blob_init(ptr noundef nonnull %7, ptr noundef nonnull %6, i32 noundef 12) #8
  %85 = icmp sgt i32 %84, -1
  br i1 %85, label %86, label %161

86:                                               ; preds = %83
  %87 = call i32 @s2n_stuffer_read(ptr noundef nonnull %1, ptr noundef nonnull %7) #8
  %88 = icmp sgt i32 %87, -1
  br i1 %88, label %89, label %161

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  %90 = getelementptr inbounds i8, ptr %5, i64 56
  %91 = call i32 @s2n_blob_init(ptr noundef nonnull %8, ptr noundef nonnull %90, i32 noundef 32) #8
  %92 = icmp sgt i32 %91, -1
  br i1 %92, label %93, label %160

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store i64 0, ptr %9, align 8
  %94 = call i32 @s2n_session_key_alloc(ptr noundef nonnull %9) #8
  %95 = icmp sgt i32 %94, -1
  br i1 %95, label %96, label %158

96:                                               ; preds = %93
  %97 = load ptr, ptr getelementptr inbounds (i8, ptr @s2n_aes256_gcm, i64 64), align 8, !tbaa !42
  %98 = call i32 %97(ptr noundef nonnull %9) #8
  %99 = call zeroext i1 @s2n_result_is_ok(i32 %98)
  br i1 %99, label %100, label %158

100:                                              ; preds = %96
  %101 = load ptr, ptr getelementptr inbounds (i8, ptr @s2n_aes256_gcm, i64 72), align 8, !tbaa !44
  %102 = call i32 %101(ptr noundef nonnull %9, ptr noundef nonnull %8) #8
  %103 = call zeroext i1 @s2n_result_is_ok(i32 %102)
  br i1 %103, label %104, label %158

104:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %10, i8 0, i64 28, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, i8 0, i64 24, i1 false)
  %105 = call i32 @s2n_blob_init(ptr noundef nonnull %11, ptr noundef nonnull %10, i32 noundef 28) #8
  %106 = icmp sgt i32 %105, -1
  br i1 %106, label %107, label %157

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %12, i8 0, i64 40, i1 false)
  %108 = call i32 @s2n_stuffer_init(ptr noundef nonnull %12, ptr noundef nonnull %11) #8
  %109 = icmp sgt i32 %108, -1
  br i1 %109, label %110, label %156

110:                                              ; preds = %107
  %111 = getelementptr inbounds i8, ptr %63, i64 48
  %112 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %12, ptr noundef nonnull %111, i32 noundef 12) #8
  %113 = icmp sgt i32 %112, -1
  br i1 %113, label %114, label %156

114:                                              ; preds = %110
  %115 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %12, ptr noundef nonnull %63, i32 noundef 16) #8
  %116 = icmp sgt i32 %115, -1
  br i1 %116, label %117, label %156

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %13, i8 0, i64 24, i1 false)
  %118 = getelementptr inbounds i8, ptr %1, i64 28
  %119 = load i32, ptr %118, align 4, !tbaa !45
  %120 = getelementptr inbounds i8, ptr %1, i64 24
  %121 = load i32, ptr %120, align 8, !tbaa !46
  %122 = sub i32 %119, %121
  %123 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %1, i32 noundef %122) #8
  %.not44 = icmp eq ptr %123, null
  br i1 %.not44, label %124, label %132

124:                                              ; preds = %117
  %125 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.41, ptr %125, align 8, !tbaa !5
  %126 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.41, i64 21), i32 noundef 47) #7
  %.not45 = icmp eq ptr %126, null
  %127 = getelementptr inbounds i8, ptr %126, i64 1
  %128 = select i1 %.not45, ptr getelementptr inbounds (i8, ptr @.str.41, i64 21), ptr %127
  %129 = getelementptr inbounds i8, ptr %125, i64 8
  store ptr %128, ptr %129, align 8, !tbaa !10
  %130 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %130, align 4, !tbaa !11
  %131 = call i32 @s2n_calculate_stacktrace() #8
  br label %155

132:                                              ; preds = %117
  %133 = call i32 @s2n_blob_init(ptr noundef nonnull %13, ptr noundef nonnull %123, i32 noundef %122) #8
  %134 = icmp sgt i32 %133, -1
  br i1 %134, label %135, label %155

135:                                              ; preds = %132
  %136 = load ptr, ptr getelementptr inbounds (i8, ptr @s2n_aes256_gcm, i64 16), align 8, !tbaa !41
  %137 = call i32 %136(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %13) #8
  %138 = icmp sgt i32 %137, -1
  br i1 %138, label %139, label %155

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %14, i8 0, i64 24, i1 false)
  %140 = add i32 %122, -16
  %141 = load ptr, ptr %13, align 8, !tbaa !47
  %142 = call i32 @s2n_blob_init(ptr noundef nonnull %14, ptr noundef %141, i32 noundef %140) #8
  %143 = icmp sgt i32 %142, -1
  br i1 %143, label %144, label %154

144:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %15, i8 0, i64 40, i1 false)
  %145 = call i32 @s2n_stuffer_init(ptr noundef nonnull %15, ptr noundef nonnull %14) #8
  %146 = icmp sgt i32 %145, -1
  br i1 %146, label %147, label %153

147:                                              ; preds = %144
  %148 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %15, i32 noundef %140) #8
  %149 = icmp sgt i32 %148, -1
  br i1 %149, label %150, label %153

150:                                              ; preds = %147
  %151 = call i32 @s2n_deserialize_resumption_state(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %15)
  %152 = call zeroext i1 @s2n_result_is_ok(i32 %151)
  %not. = xor i1 %152, true
  %. = sext i1 %not. to i32
  br label %153

153:                                              ; preds = %150, %147, %144
  %.sroa.026.0 = phi i32 [ -1, %144 ], [ -1, %147 ], [ %., %150 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #8
  br label %154

154:                                              ; preds = %139, %153
  %.sroa.026.1 = phi i32 [ %.sroa.026.0, %153 ], [ -1, %139 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  br label %155

155:                                              ; preds = %135, %132, %154, %124
  %.sroa.026.2 = phi i32 [ %.sroa.026.1, %154 ], [ -1, %124 ], [ -1, %132 ], [ -1, %135 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %156

156:                                              ; preds = %114, %110, %107, %155
  %.sroa.026.3 = phi i32 [ %.sroa.026.2, %155 ], [ -1, %107 ], [ -1, %110 ], [ -1, %114 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #8
  br label %157

157:                                              ; preds = %104, %156
  %.sroa.026.4 = phi i32 [ %.sroa.026.3, %156 ], [ -1, %104 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #8
  br label %158

158:                                              ; preds = %100, %96, %93, %157
  %.sroa.026.5 = phi i32 [ %.sroa.026.4, %157 ], [ -1, %93 ], [ -1, %96 ], [ -1, %100 ]
  %159 = call i32 @s2n_session_key_free(ptr noundef nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %160

160:                                              ; preds = %89, %158
  %.sroa.026.6 = phi i32 [ %.sroa.026.5, %158 ], [ -1, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  br label %161

161:                                              ; preds = %86, %83, %160
  %.sroa.026.7 = phi i32 [ %.sroa.026.6, %160 ], [ -1, %83 ], [ -1, %86 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  br label %162

162:                                              ; preds = %80, %76, %72, %161
  %.sroa.026.8 = phi i32 [ %.sroa.026.7, %161 ], [ -1, %72 ], [ -1, %76 ], [ -1, %80 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #8
  br label %163

163:                                              ; preds = %64, %162, %58
  %.sroa.026.10 = phi i32 [ -1, %58 ], [ %.sroa.026.8, %162 ], [ -1, %64 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %164

164:                                              ; preds = %44, %163, %50
  %.sroa.026.11 = phi i32 [ %.sroa.026.10, %163 ], [ -1, %50 ], [ -1, %44 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  br label %165

165:                                              ; preds = %164, %36, %25, %16
  %.sroa.026.12 = phi i32 [ %.sroa.026.11, %164 ], [ -1, %36 ], [ -1, %25 ], [ -1, %16 ]
  ret i32 %.sroa.026.12
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @s2n_find_ticket_key(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_resume_generate_unique_ticket_key(ptr noundef) local_unnamed_addr #4

declare i32 @s2n_session_key_free(ptr noundef) local_unnamed_addr #3

declare i32 @s2n_session_key_alloc(ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_write_bytes(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_skip_write(ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare i32 @s2n_stuffer_read_bytes(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_read(ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 8}
!14 = !{!"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, !15, i64 160, !16, i64 168, !16, 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, !17, i64 240, !7, i64 632, !7, i64 640, !18, i64 648, !25, i64 1144, !28, i64 1688, !7, i64 1752, !8, i64 1760, !12, i64 1764, !8, i64 1768, !31, i64 1776, !31, i64 1816, !31, i64 1856, !31, i64 1896, !12, i64 1936, !16, i64 1944, !8, i64 1952, !31, i64 1960, !8, i64 2000, !8, i64 2001, !8, i64 2002, !24, i64 2003, !32, i64 2004, !32, i64 2008, !33, i64 2016, !30, i64 2208, !12, i64 2212, !30, i64 2216, !16, i64 2224, !8, i64 2232, !16, i64 2240, !16, i64 2248, !16, i64 2256, !32, i64 2264, !32, i64 2268, !8, i64 2272, !8, i64 2528, !12, i64 2784, !23, i64 2792, !12, i64 2816, !23, i64 2824, !23, i64 2848, !23, i64 2872, !35, i64 2896, !37, i64 3704, !7, i64 3760, !7, i64 3768, !8, i64 3776, !12, i64 3780, !23, i64 3784, !12, i64 3808, !39, i64 3816, !8, i64 3848, !31, i64 3992, !23, i64 4032, !23, i64 4056, !24, i64 4080, !24, i64 4081, !24, i64 4082, !30, i64 4084, !30, i64 4086, !12, i64 4088, !12, i64 4092, !23, i64 4096, !12, i64 4120, !40, i64 4128, !32, i64 4176, !8, i64 4180, !8, i64 4181}
!15 = !{!"s2n_timer", !16, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!"s2n_secrets", !8, i64 0, !12, i64 388}
!18 = !{!"s2n_kex_parameters", !19, i64 0, !20, i64 8, !8, i64 24, !20, i64 56, !21, i64 72, !21, i64 184, !8, i64 296, !22, i64 360, !23, i64 448, !23, i64 472}
!19 = !{!"s2n_dh_params", !7, i64 0}
!20 = !{!"s2n_ecc_evp_params", !7, i64 0, !7, i64 8}
!21 = !{!"s2n_kem_group_params", !7, i64 0, !22, i64 8, !20, i64 96}
!22 = !{!"s2n_kem_params", !7, i64 0, !23, i64 8, !23, i64 32, !23, i64 56, !24, i64 80}
!23 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!24 = !{!"_Bool", !8, i64 0}
!25 = !{!"s2n_handshake_parameters", !26, i64 0, !26, i64 48, !23, i64 96, !12, i64 120, !27, 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}
!26 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!27 = !{!"s2n_sig_scheme_list", !8, i64 0, !8, i64 256}
!28 = !{!"s2n_psk_parameters", !12, i64 0, !29, i64 8, !30, i64 40, !30, i64 42, !7, i64 48, !12, i64 56}
!29 = !{!"s2n_array", !23, i64 0, !12, i64 24, !12, i64 28}
!30 = !{!"short", !8, i64 0}
!31 = !{!"s2n_stuffer", !23, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!32 = !{!"", !12, i64 0}
!33 = !{!"s2n_handshake", !31, 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, !34, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!34 = !{!"s2n_offered_early_data", !7, i64 0}
!35 = !{!"s2n_client_hello", !23, i64 0, !36, i64 24, !23, i64 728, !23, i64 752, !23, 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}
!36 = !{!"", !8, i64 0, !23, i64 672, !30, i64 696}
!37 = !{!"s2n_x509_validator", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !30, i64 18, !7, i64 24, !12, i64 32, !7, i64 40, !38, i64 48, !24, i64 52}
!38 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!39 = !{!"s2n_ticket_fields", !23, i64 0, !12, i64 24}
!40 = !{!"s2n_post_handshake", !31, i64 0, !8, i64 40}
!41 = !{!8, !8, i64 0}
!42 = !{!43, !7, i64 64}
!43 = !{!"s2n_cipher", !12, i64 0, !8, i64 8, !8, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!44 = !{!43, !7, i64 72}
!45 = !{!31, !12, i64 28}
!46 = !{!31, !12, i64 24}
!47 = !{!23, !7, i64 0}


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