; LLVM IR from aws/s2n-tls :: tls (s2n_record_read)

; 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_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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%struct.s2n_crypto_parameters = type { ptr, %struct.s2n_session_key, %struct.s2n_session_key, %struct.s2n_hmac_state, %struct.s2n_hmac_state, [16 x i8], [16 x i8], [8 x i8], [8 x i8] }
%struct.s2n_session_key = type { ptr }
%struct.s2n_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon.0 }
%union.anon.0 = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }
%struct.s2n_cipher_suite = type { i8, ptr, ptr, [2 x i8], ptr, i32, ptr, [2 x ptr], i8, ptr, ptr, i32, i8 }
%struct.s2n_record_algorithm = type { ptr, i32, i32, i64 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [92 x i8], align 1
@s2n_null_cipher = external constant %struct.s2n_cipher, align 8
@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [92 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_record_header_parse(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_record_parse(ptr noundef %0) #4 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i16, align 2
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #5
  store i16 0, ptr %5, align 2, !tbaa !10
  br label %14

14:                                               ; preds = %1
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call i32 @s2n_record_header_parse(ptr noundef %15, ptr noundef %4, ptr noundef %5)
  %17 = icmp sgt i32 %16, -1
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %302

19:                                               ; preds = %14
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s2n_connection, ptr %22, i32 0, i32 29
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  store ptr %24, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.s2n_connection, ptr %25, i32 0, i32 30
  %27 = load ptr, ptr %26, align 8, !tbaa !40
  store ptr %27, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = load i8, ptr %4, align 1, !tbaa !9
  %30 = call zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef %28, i8 noundef zeroext %29)
  br i1 %30, label %31, label %83

31:                                               ; preds = %21
  br label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s2n_connection, ptr %33, i32 0, i32 26
  %35 = load ptr, ptr %34, align 8, !tbaa !41
  %36 = icmp ne ptr %35, null
  br i1 %36, label %70, label %37

37:                                               ; preds = %32
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  %40 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %41 = getelementptr inbounds %struct.s2n_debug_info, ptr %40, i32 0, i32 0
  store ptr @.str.5, ptr %41, align 8, !tbaa !42
  %42 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %43 = getelementptr inbounds %struct.s2n_debug_info, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !42
  %45 = getelementptr inbounds i8, ptr %44, i64 21
  %46 = call ptr @strrchr(ptr noundef %45, i32 noundef 47) #6
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %55

48:                                               ; preds = %39
  %49 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %50 = getelementptr inbounds %struct.s2n_debug_info, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !42
  %52 = getelementptr inbounds i8, ptr %51, i64 21
  %53 = call ptr @strrchr(ptr noundef %52, i32 noundef 47) #6
  %54 = getelementptr inbounds i8, ptr %53, i64 1
  br label %60

55:                                               ; preds = %39
  %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 !42
  %59 = getelementptr inbounds i8, ptr %58, i64 21
  br label %60

60:                                               ; preds = %55, %48
  %61 = phi ptr [ %54, %48 ], [ %59, %55 ]
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %63 = getelementptr inbounds %struct.s2n_debug_info, ptr %62, i32 0, i32 1
  store ptr %61, ptr %63, align 8, !tbaa !44
  %64 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %64, align 4, !tbaa !45
  %65 = call i32 @s2n_calculate_stacktrace()
  br label %66

66:                                               ; preds = %60
  br label %67

67:                                               ; preds = %66
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %301

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69, %32
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.s2n_connection, ptr %73, i32 0, i32 26
  %75 = load ptr, ptr %74, align 8, !tbaa !41
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.s2n_connection, ptr %76, i32 0, i32 29
  store ptr %75, ptr %77, align 8, !tbaa !12
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.s2n_connection, ptr %78, i32 0, i32 26
  %80 = load ptr, ptr %79, align 8, !tbaa !41
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s2n_connection, ptr %81, i32 0, i32 30
  store ptr %80, ptr %82, align 8, !tbaa !40
  br label %83

83:                                               ; preds = %72, %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s2n_connection, ptr %84, i32 0, i32 29
  %86 = load ptr, ptr %85, align 8, !tbaa !12
  %87 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !46
  store ptr %88, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.s2n_connection, ptr %89, i32 0, i32 29
  %91 = load ptr, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %91, i32 0, i32 5
  %93 = getelementptr inbounds [16 x i8], ptr %92, i64 0, i64 0
  store ptr %93, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.s2n_connection, ptr %94, i32 0, i32 29
  %96 = load ptr, ptr %95, align 8, !tbaa !12
  %97 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %96, i32 0, i32 3
  store ptr %97, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.s2n_connection, ptr %98, i32 0, i32 29
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %100, i32 0, i32 7
  %102 = getelementptr inbounds [8 x i8], ptr %101, i64 0, i64 0
  store ptr %102, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.s2n_connection, ptr %103, i32 0, i32 29
  %105 = load ptr, ptr %104, align 8, !tbaa !12
  %106 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %105, i32 0, i32 1
  store ptr %106, ptr %13, align 8, !tbaa !5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s2n_connection, ptr %107, i32 0, i32 13
  %109 = load i32, ptr %108, align 4, !tbaa !51
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %135

111:                                              ; preds = %83
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.s2n_connection, ptr %112, i32 0, i32 30
  %114 = load ptr, ptr %113, align 8, !tbaa !40
  %115 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !46
  store ptr %116, ptr %9, align 8, !tbaa !5
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.s2n_connection, ptr %117, i32 0, i32 30
  %119 = load ptr, ptr %118, align 8, !tbaa !40
  %120 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %119, i32 0, i32 6
  %121 = getelementptr inbounds [16 x i8], ptr %120, i64 0, i64 0
  store ptr %121, ptr %10, align 8, !tbaa !5
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.s2n_connection, ptr %122, i32 0, i32 30
  %124 = load ptr, ptr %123, align 8, !tbaa !40
  %125 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %124, i32 0, i32 4
  store ptr %125, ptr %11, align 8, !tbaa !5
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.s2n_connection, ptr %126, i32 0, i32 30
  %128 = load ptr, ptr %127, align 8, !tbaa !40
  %129 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %128, i32 0, i32 8
  %130 = getelementptr inbounds [8 x i8], ptr %129, i64 0, i64 0
  store ptr %130, ptr %12, align 8, !tbaa !5
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.s2n_connection, ptr %131, i32 0, i32 30
  %133 = load ptr, ptr %132, align 8, !tbaa !40
  %134 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %133, i32 0, i32 2
  store ptr %134, ptr %13, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %111, %83
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = load i8, ptr %4, align 1, !tbaa !9
  %138 = call zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef %136, i8 noundef zeroext %137)
  br i1 %138, label %139, label %146

139:                                              ; preds = %135
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.s2n_connection, ptr %141, i32 0, i32 29
  store ptr %140, ptr %142, align 8, !tbaa !12
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.s2n_connection, ptr %144, i32 0, i32 30
  store ptr %143, ptr %145, align 8, !tbaa !40
  br label %146

146:                                              ; preds = %139, %135
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %147, i32 0, i32 6
  %149 = load ptr, ptr %148, align 8, !tbaa !52
  %150 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !54
  %152 = icmp eq ptr %151, @s2n_null_cipher
  br i1 %152, label %153, label %194

153:                                              ; preds = %146
  br label %154

154:                                              ; preds = %153
  %155 = load i8, ptr %4, align 1, !tbaa !9
  %156 = zext i8 %155 to i32
  %157 = icmp ne i32 %156, 23
  br i1 %157, label %191, label %158

158:                                              ; preds = %154
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  %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 0
  store ptr @.str.6, ptr %162, align 8, !tbaa !42
  %163 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %164 = getelementptr inbounds %struct.s2n_debug_info, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !42
  %166 = getelementptr inbounds i8, ptr %165, i64 21
  %167 = call ptr @strrchr(ptr noundef %166, i32 noundef 47) #6
  %168 = icmp ne ptr %167, null
  br i1 %168, label %169, label %176

169:                                              ; preds = %160
  %170 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %171 = getelementptr inbounds %struct.s2n_debug_info, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !42
  %173 = getelementptr inbounds i8, ptr %172, i64 21
  %174 = call ptr @strrchr(ptr noundef %173, i32 noundef 47) #6
  %175 = getelementptr inbounds i8, ptr %174, i64 1
  br label %181

176:                                              ; preds = %160
  %177 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %178 = getelementptr inbounds %struct.s2n_debug_info, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !42
  %180 = getelementptr inbounds i8, ptr %179, i64 21
  br label %181

181:                                              ; preds = %176, %169
  %182 = phi ptr [ %175, %169 ], [ %180, %176 ]
  %183 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %184 = getelementptr inbounds %struct.s2n_debug_info, ptr %183, i32 0, i32 1
  store ptr %182, ptr %184, align 8, !tbaa !44
  %185 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544321, ptr %185, align 4, !tbaa !45
  %186 = call i32 @s2n_calculate_stacktrace()
  br label %187

187:                                              ; preds = %181
  br label %188

188:                                              ; preds = %187
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

189:                                              ; No predecessors!
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190, %154
  br label %192

192:                                              ; preds = %191
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193, %146
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %195, i32 0, i32 6
  %197 = load ptr, ptr %196, align 8, !tbaa !52
  %198 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !54
  %200 = getelementptr inbounds %struct.s2n_cipher, ptr %199, i32 0, i32 0
  %201 = load i32, ptr %200, align 8, !tbaa !56
  switch i32 %201, label %266 [
    i32 2, label %202
    i32 1, label %218
    i32 3, label %234
    i32 0, label %250
  ]

202:                                              ; preds = %194
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = load i8, ptr %4, align 1, !tbaa !9
  %207 = load i16, ptr %5, align 2, !tbaa !10
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = load ptr, ptr %13, align 8, !tbaa !5
  %212 = call i32 @s2n_record_parse_aead(ptr noundef %204, ptr noundef %205, i8 noundef zeroext %206, i16 noundef zeroext %207, ptr noundef %208, ptr noundef %209, ptr noundef %210, ptr noundef %211)
  %213 = icmp sgt i32 %212, -1
  br i1 %213, label %215, label %214

214:                                              ; preds = %203
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

215:                                              ; preds = %203
  br label %216

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  br label %299

218:                                              ; preds = %194
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = load i8, ptr %4, align 1, !tbaa !9
  %223 = load i16, ptr %5, align 2, !tbaa !10
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = load ptr, ptr %13, align 8, !tbaa !5
  %228 = call i32 @s2n_record_parse_cbc(ptr noundef %220, ptr noundef %221, i8 noundef zeroext %222, i16 noundef zeroext %223, ptr noundef %224, ptr noundef %225, ptr noundef %226, ptr noundef %227)
  %229 = icmp sgt i32 %228, -1
  br i1 %229, label %231, label %230

230:                                              ; preds = %219
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

231:                                              ; preds = %219
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232
  br label %299

234:                                              ; preds = %194
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %9, align 8, !tbaa !5
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = load i8, ptr %4, align 1, !tbaa !9
  %239 = load i16, ptr %5, align 2, !tbaa !10
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  %241 = load ptr, ptr %11, align 8, !tbaa !5
  %242 = load ptr, ptr %12, align 8, !tbaa !5
  %243 = load ptr, ptr %13, align 8, !tbaa !5
  %244 = call i32 @s2n_record_parse_composite(ptr noundef %236, ptr noundef %237, i8 noundef zeroext %238, i16 noundef zeroext %239, ptr noundef %240, ptr noundef %241, ptr noundef %242, ptr noundef %243)
  %245 = icmp sgt i32 %244, -1
  br i1 %245, label %247, label %246

246:                                              ; preds = %235
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

247:                                              ; preds = %235
  br label %248

248:                                              ; preds = %247
  br label %249

249:                                              ; preds = %248
  br label %299

250:                                              ; preds = %194
  br label %251

251:                                              ; preds = %250
  %252 = load ptr, ptr %9, align 8, !tbaa !5
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = load i8, ptr %4, align 1, !tbaa !9
  %255 = load i16, ptr %5, align 2, !tbaa !10
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = load ptr, ptr %11, align 8, !tbaa !5
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = load ptr, ptr %13, align 8, !tbaa !5
  %260 = call i32 @s2n_record_parse_stream(ptr noundef %252, ptr noundef %253, i8 noundef zeroext %254, i16 noundef zeroext %255, ptr noundef %256, ptr noundef %257, ptr noundef %258, ptr noundef %259)
  %261 = icmp sgt i32 %260, -1
  br i1 %261, label %263, label %262

262:                                              ; preds = %251
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

263:                                              ; preds = %251
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  br label %299

266:                                              ; preds = %194
  br label %267

267:                                              ; preds = %266
  br label %268

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

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

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

289:                                              ; preds = %284, %277
  %290 = phi ptr [ %283, %277 ], [ %288, %284 ]
  %291 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %292 = getelementptr inbounds %struct.s2n_debug_info, ptr %291, i32 0, i32 1
  store ptr %290, ptr %292, align 8, !tbaa !44
  %293 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653224, ptr %293, align 4, !tbaa !45
  %294 = call i32 @s2n_calculate_stacktrace()
  br label %295

295:                                              ; preds = %289
  br label %296

296:                                              ; preds = %295
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

297:                                              ; No predecessors!
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298, %265, %249, %233, %217
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %300

300:                                              ; preds = %299, %296, %262, %246, %230, %214, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %301

301:                                              ; preds = %300, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %302

302:                                              ; preds = %301, %18
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  %303 = load i32, ptr %2, align 4
  ret i32 %303
}

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef, i8 noundef zeroext) #4

declare i32 @s2n_record_parse_aead(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @s2n_record_parse_cbc(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @s2n_record_parse_composite(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @s2n_record_parse_stream(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, 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 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 632}
!13 = !{!"s2n_connection", !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, 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, !14, i64 148, !14, i64 152, !15, i64 160, !16, i64 168, !16, 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, !17, i64 240, !6, i64 632, !6, i64 640, !18, i64 648, !25, i64 1144, !28, i64 1688, !6, i64 1752, !7, i64 1760, !14, i64 1764, !7, i64 1768, !30, i64 1776, !30, i64 1816, !30, i64 1856, !30, i64 1896, !14, i64 1936, !16, i64 1944, !7, i64 1952, !30, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !24, i64 2003, !31, i64 2004, !31, i64 2008, !32, i64 2016, !11, i64 2208, !14, i64 2212, !11, i64 2216, !16, i64 2224, !7, i64 2232, !16, i64 2240, !16, i64 2248, !16, i64 2256, !31, i64 2264, !31, i64 2268, !7, i64 2272, !7, i64 2528, !14, i64 2784, !23, i64 2792, !14, i64 2816, !23, i64 2824, !23, i64 2848, !23, i64 2872, !34, i64 2896, !36, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !14, i64 3780, !23, i64 3784, !14, i64 3808, !38, i64 3816, !7, i64 3848, !30, i64 3992, !23, i64 4032, !23, i64 4056, !24, i64 4080, !24, i64 4081, !24, i64 4082, !11, i64 4084, !11, i64 4086, !14, i64 4088, !14, i64 4092, !23, i64 4096, !14, i64 4120, !39, i64 4128, !31, i64 4176, !7, i64 4180, !7, i64 4181}
!14 = !{!"int", !7, i64 0}
!15 = !{!"s2n_timer", !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"s2n_secrets", !7, i64 0, !14, i64 388}
!18 = !{!"s2n_kex_parameters", !19, i64 0, !20, i64 8, !7, i64 24, !20, i64 56, !21, i64 72, !21, i64 184, !7, i64 296, !22, i64 360, !23, i64 448, !23, i64 472}
!19 = !{!"s2n_dh_params", !6, i64 0}
!20 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!21 = !{!"s2n_kem_group_params", !6, i64 0, !22, i64 8, !20, i64 96}
!22 = !{!"s2n_kem_params", !6, i64 0, !23, i64 8, !23, i64 32, !23, i64 56, !24, i64 80}
!23 = !{!"s2n_blob", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16}
!24 = !{!"_Bool", !7, i64 0}
!25 = !{!"s2n_handshake_parameters", !26, i64 0, !26, i64 48, !23, i64 96, !14, i64 120, !27, 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}
!26 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!27 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!28 = !{!"s2n_psk_parameters", !14, i64 0, !29, i64 8, !11, i64 40, !11, i64 42, !6, i64 48, !14, i64 56}
!29 = !{!"s2n_array", !23, i64 0, !14, i64 24, !14, i64 28}
!30 = !{!"s2n_stuffer", !23, i64 0, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 36, !14, i64 36}
!31 = !{!"", !14, i64 0}
!32 = !{!"s2n_handshake", !30, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !33, i64 176, !14, i64 184, !14, i64 184, !14, i64 184, !14, i64 184, !14, i64 188}
!33 = !{!"s2n_offered_early_data", !6, i64 0}
!34 = !{!"s2n_client_hello", !23, i64 0, !35, i64 24, !23, i64 728, !23, i64 752, !23, i64 776, !7, i64 800, !7, i64 801, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802}
!35 = !{!"", !7, i64 0, !23, i64 672, !11, i64 696}
!36 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !11, i64 18, !6, i64 24, !14, i64 32, !6, i64 40, !37, i64 48, !24, i64 52}
!37 = !{!"s2n_cert_validation_info", !14, i64 0, !14, i64 0}
!38 = !{!"s2n_ticket_fields", !23, i64 0, !14, i64 24}
!39 = !{!"s2n_post_handshake", !30, i64 0, !7, i64 40}
!40 = !{!13, !6, i64 640}
!41 = !{!13, !6, i64 224}
!42 = !{!43, !6, i64 0}
!43 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!44 = !{!43, !6, i64 8}
!45 = !{!14, !14, i64 0}
!46 = !{!47, !6, i64 0}
!47 = !{!"s2n_crypto_parameters", !6, i64 0, !48, i64 8, !48, i64 16, !49, i64 24, !49, i64 456, !7, i64 888, !7, i64 904, !7, i64 920, !7, i64 928}
!48 = !{!"s2n_session_key", !6, i64 0}
!49 = !{!"s2n_hmac_state", !14, i64 0, !11, i64 4, !14, i64 8, !11, i64 12, !7, i64 14, !50, i64 16, !50, i64 72, !50, i64 128, !50, i64 184, !7, i64 240, !7, i64 368}
!50 = !{!"s2n_hash_state", !6, i64 0, !14, i64 8, !7, i64 12, !16, i64 16, !7, i64 24}
!51 = !{!13, !14, i64 148}
!52 = !{!53, !6, i64 48}
!53 = !{!"s2n_cipher_suite", !14, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !6, i64 32, !14, i64 40, !6, i64 48, !7, i64 56, !7, i64 72, !6, i64 80, !6, i64 88, !14, i64 96, !7, i64 100}
!54 = !{!55, !6, i64 0}
!55 = !{!"s2n_record_algorithm", !6, i64 0, !14, i64 8, !14, i64 12, !16, i64 16}
!56 = !{!57, !14, i64 0}
!57 = !{!"s2n_cipher", !14, 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}


; 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 }

@_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.5 = external hidden unnamed_addr constant [92 x i8], align 1
@s2n_null_cipher = external constant %struct.s2n_cipher, align 8
@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [92 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_record_header_parse(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_record_parse(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca i8, align 1
  %3 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 0, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #5
  store i16 0, ptr %3, align 2, !tbaa !8
  %4 = call i32 @s2n_record_header_parse(ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %5 = icmp sgt i32 %4, -1
  br i1 %5, label %6, label %85

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 632
  %8 = getelementptr inbounds i8, ptr %0, i64 640
  %9 = load <2 x ptr>, ptr %7, align 8, !tbaa !10
  %10 = load i8, ptr %2, align 1, !tbaa !5
  %11 = call zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef %0, i8 noundef zeroext %10)
  br i1 %11, label %12, label %._crit_edge

._crit_edge:                                      ; preds = %6
  %.pre = load ptr, ptr %7, align 8, !tbaa !12
  br label %24

12:                                               ; preds = %6
  %13 = getelementptr inbounds i8, ptr %0, i64 224
  %14 = load ptr, ptr %13, align 8, !tbaa !40
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %15, label %23

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

23:                                               ; preds = %12
  store ptr %14, ptr %7, align 8, !tbaa !12
  store ptr %14, ptr %8, align 8, !tbaa !45
  br label %24

24:                                               ; preds = %._crit_edge, %23
  %25 = phi ptr [ %.pre, %._crit_edge ], [ %14, %23 ]
  %26 = getelementptr inbounds i8, ptr %25, i64 888
  %27 = getelementptr inbounds i8, ptr %25, i64 24
  %28 = getelementptr inbounds i8, ptr %25, i64 920
  %29 = getelementptr inbounds i8, ptr %25, i64 8
  %30 = getelementptr inbounds i8, ptr %0, i64 148
  %31 = load i32, ptr %30, align 4, !tbaa !46
  %32 = icmp eq i32 %31, 1
  br i1 %32, label %33, label %39

33:                                               ; preds = %24
  %34 = load ptr, ptr %8, align 8, !tbaa !45
  %35 = getelementptr inbounds i8, ptr %34, i64 904
  %36 = getelementptr inbounds i8, ptr %34, i64 456
  %37 = getelementptr inbounds i8, ptr %34, i64 928
  %38 = getelementptr inbounds i8, ptr %34, i64 16
  br label %39

39:                                               ; preds = %33, %24
  %.056.in = phi ptr [ %34, %33 ], [ %25, %24 ]
  %.055 = phi ptr [ %35, %33 ], [ %26, %24 ]
  %.054 = phi ptr [ %36, %33 ], [ %27, %24 ]
  %.053 = phi ptr [ %37, %33 ], [ %28, %24 ]
  %.0 = phi ptr [ %38, %33 ], [ %29, %24 ]
  %.056 = load ptr, ptr %.056.in, align 8, !tbaa !47
  %40 = load i8, ptr %2, align 1, !tbaa !5
  %41 = call zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef nonnull %0, i8 noundef zeroext %40)
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store <2 x ptr> %9, ptr %7, align 8, !tbaa !10
  br label %43

43:                                               ; preds = %42, %39
  %44 = getelementptr inbounds i8, ptr %.056, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !52
  %46 = load ptr, ptr %45, align 8, !tbaa !54
  %47 = icmp ne ptr %46, @s2n_null_cipher
  %48 = load i8, ptr %2, align 1
  %49 = icmp ne i8 %48, 23
  %or.cond = select i1 %47, i1 true, i1 %49
  br i1 %or.cond, label %58, label %50

50:                                               ; preds = %43
  %51 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.6, ptr %51, align 8, !tbaa !41
  %52 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.6, i64 21), i32 noundef 47) #6
  %.not63 = icmp eq ptr %52, null
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  %54 = select i1 %.not63, ptr getelementptr inbounds (i8, ptr @.str.6, i64 21), ptr %53
  %55 = getelementptr inbounds i8, ptr %51, i64 8
  store ptr %54, ptr %55, align 8, !tbaa !43
  %56 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544321, ptr %56, align 4, !tbaa !44
  %57 = call i32 @s2n_calculate_stacktrace() #5
  br label %85

58:                                               ; preds = %43
  %59 = load i32, ptr %46, align 8, !tbaa !56
  switch i32 %59, label %76 [
    i32 2, label %60
    i32 1, label %64
    i32 3, label %68
    i32 0, label %72
  ]

60:                                               ; preds = %58
  %61 = load i16, ptr %3, align 2, !tbaa !8
  %62 = call i32 @s2n_record_parse_aead(ptr noundef nonnull %.056, ptr noundef nonnull %0, i8 noundef zeroext %48, i16 noundef zeroext %61, ptr noundef nonnull %.055, ptr noundef nonnull %.054, ptr noundef nonnull %.053, ptr noundef nonnull %.0) #5
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %84, label %85

64:                                               ; preds = %58
  %65 = load i16, ptr %3, align 2, !tbaa !8
  %66 = call i32 @s2n_record_parse_cbc(ptr noundef nonnull %.056, ptr noundef nonnull %0, i8 noundef zeroext %48, i16 noundef zeroext %65, ptr noundef nonnull %.055, ptr noundef nonnull %.054, ptr noundef nonnull %.053, ptr noundef nonnull %.0) #5
  %67 = icmp sgt i32 %66, -1
  br i1 %67, label %84, label %85

68:                                               ; preds = %58
  %69 = load i16, ptr %3, align 2, !tbaa !8
  %70 = call i32 @s2n_record_parse_composite(ptr noundef nonnull %.056, ptr noundef nonnull %0, i8 noundef zeroext %48, i16 noundef zeroext %69, ptr noundef nonnull %.055, ptr noundef nonnull %.054, ptr noundef nonnull %.053, ptr noundef nonnull %.0) #5
  %71 = icmp sgt i32 %70, -1
  br i1 %71, label %84, label %85

72:                                               ; preds = %58
  %73 = load i16, ptr %3, align 2, !tbaa !8
  %74 = call i32 @s2n_record_parse_stream(ptr noundef nonnull %.056, ptr noundef nonnull %0, i8 noundef zeroext %48, i16 noundef zeroext %73, ptr noundef nonnull %.055, ptr noundef nonnull %.054, ptr noundef nonnull %.053, ptr noundef nonnull %.0) #5
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %84, label %85

76:                                               ; preds = %58
  %77 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.7, ptr %77, align 8, !tbaa !41
  %78 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.7, i64 21), i32 noundef 47) #6
  %.not64 = icmp eq ptr %78, null
  %79 = getelementptr inbounds i8, ptr %78, i64 1
  %80 = select i1 %.not64, ptr getelementptr inbounds (i8, ptr @.str.7, i64 21), ptr %79
  %81 = getelementptr inbounds i8, ptr %77, i64 8
  store ptr %80, ptr %81, align 8, !tbaa !43
  %82 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653224, ptr %82, align 4, !tbaa !44
  %83 = call i32 @s2n_calculate_stacktrace() #5
  br label %85

84:                                               ; preds = %72, %68, %64, %60
  br label %85

85:                                               ; preds = %15, %72, %68, %64, %60, %84, %76, %50, %1
  %.2 = phi i32 [ -1, %1 ], [ -1, %15 ], [ -1, %76 ], [ 0, %84 ], [ -1, %50 ], [ -1, %60 ], [ -1, %64 ], [ -1, %68 ], [ -1, %72 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  ret i32 %.2
}

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @s2n_is_tls13_plaintext_content(ptr noundef, i8 noundef zeroext) local_unnamed_addr #4

declare i32 @s2n_record_parse_aead(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_record_parse_cbc(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_record_parse_composite(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_record_parse_stream(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef, ptr noundef, 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 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"short", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !11, i64 632}
!13 = !{!"s2n_connection", !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 0, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 1, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !14, i64 2, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !6, i64 80, !6, i64 102, !6, i64 124, !14, i64 148, !14, i64 152, !15, i64 160, !16, i64 168, !16, i64 176, !6, i64 184, !6, i64 216, !6, i64 217, !6, i64 218, !6, i64 219, !6, i64 220, !6, i64 221, !6, i64 222, !11, i64 224, !11, i64 232, !17, i64 240, !11, i64 632, !11, i64 640, !18, i64 648, !25, i64 1144, !28, i64 1688, !11, i64 1752, !6, i64 1760, !14, i64 1764, !6, i64 1768, !30, i64 1776, !30, i64 1816, !30, i64 1856, !30, i64 1896, !14, i64 1936, !16, i64 1944, !6, i64 1952, !30, i64 1960, !6, i64 2000, !6, i64 2001, !6, i64 2002, !24, i64 2003, !31, i64 2004, !31, i64 2008, !32, i64 2016, !9, i64 2208, !14, i64 2212, !9, i64 2216, !16, i64 2224, !6, i64 2232, !16, i64 2240, !16, i64 2248, !16, i64 2256, !31, i64 2264, !31, i64 2268, !6, i64 2272, !6, i64 2528, !14, i64 2784, !23, i64 2792, !14, i64 2816, !23, i64 2824, !23, i64 2848, !23, i64 2872, !34, i64 2896, !36, i64 3704, !11, i64 3760, !11, i64 3768, !6, i64 3776, !14, i64 3780, !23, i64 3784, !14, i64 3808, !38, i64 3816, !6, i64 3848, !30, i64 3992, !23, i64 4032, !23, i64 4056, !24, i64 4080, !24, i64 4081, !24, i64 4082, !9, i64 4084, !9, i64 4086, !14, i64 4088, !14, i64 4092, !23, i64 4096, !14, i64 4120, !39, i64 4128, !31, i64 4176, !6, i64 4180, !6, i64 4181}
!14 = !{!"int", !6, i64 0}
!15 = !{!"s2n_timer", !16, i64 0}
!16 = !{!"long", !6, i64 0}
!17 = !{!"s2n_secrets", !6, i64 0, !14, i64 388}
!18 = !{!"s2n_kex_parameters", !19, i64 0, !20, i64 8, !6, i64 24, !20, i64 56, !21, i64 72, !21, i64 184, !6, i64 296, !22, i64 360, !23, i64 448, !23, i64 472}
!19 = !{!"s2n_dh_params", !11, i64 0}
!20 = !{!"s2n_ecc_evp_params", !11, i64 0, !11, i64 8}
!21 = !{!"s2n_kem_group_params", !11, i64 0, !22, i64 8, !20, i64 96}
!22 = !{!"s2n_kem_params", !11, i64 0, !23, i64 8, !23, i64 32, !23, i64 56, !24, i64 80}
!23 = !{!"s2n_blob", !11, i64 0, !14, i64 8, !14, i64 12, !14, i64 16}
!24 = !{!"_Bool", !6, i64 0}
!25 = !{!"s2n_handshake_parameters", !26, i64 0, !26, i64 48, !23, i64 96, !14, i64 120, !27, i64 124, !11, i64 384, !11, i64 392, !11, i64 400, !6, i64 408, !6, i64 440, !6, i64 472, !6, i64 473, !6, i64 474, !6, i64 506}
!26 = !{!"s2n_pkey", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!27 = !{!"s2n_sig_scheme_list", !6, i64 0, !6, i64 256}
!28 = !{!"s2n_psk_parameters", !14, i64 0, !29, i64 8, !9, i64 40, !9, i64 42, !11, i64 48, !14, i64 56}
!29 = !{!"s2n_array", !23, i64 0, !14, i64 24, !14, i64 28}
!30 = !{!"s2n_stuffer", !23, i64 0, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 36, !14, i64 36}
!31 = !{!"", !14, i64 0}
!32 = !{!"s2n_handshake", !30, i64 0, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 104, !6, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !33, i64 176, !14, i64 184, !14, i64 184, !14, i64 184, !14, i64 184, !14, i64 188}
!33 = !{!"s2n_offered_early_data", !11, i64 0}
!34 = !{!"s2n_client_hello", !23, i64 0, !35, i64 24, !23, i64 728, !23, i64 752, !23, i64 776, !6, i64 800, !6, i64 801, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802, !14, i64 802}
!35 = !{!"", !6, i64 0, !23, i64 672, !9, i64 696}
!36 = !{!"s2n_x509_validator", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 17, !9, i64 18, !11, i64 24, !14, i64 32, !11, i64 40, !37, i64 48, !24, i64 52}
!37 = !{!"s2n_cert_validation_info", !14, i64 0, !14, i64 0}
!38 = !{!"s2n_ticket_fields", !23, i64 0, !14, i64 24}
!39 = !{!"s2n_post_handshake", !30, i64 0, !6, i64 40}
!40 = !{!13, !11, i64 224}
!41 = !{!42, !11, i64 0}
!42 = !{!"s2n_debug_info", !11, i64 0, !11, i64 8}
!43 = !{!42, !11, i64 8}
!44 = !{!14, !14, i64 0}
!45 = !{!13, !11, i64 640}
!46 = !{!13, !14, i64 148}
!47 = !{!48, !11, i64 0}
!48 = !{!"s2n_crypto_parameters", !11, i64 0, !49, i64 8, !49, i64 16, !50, i64 24, !50, i64 456, !6, i64 888, !6, i64 904, !6, i64 920, !6, i64 928}
!49 = !{!"s2n_session_key", !11, i64 0}
!50 = !{!"s2n_hmac_state", !14, i64 0, !9, i64 4, !14, i64 8, !9, i64 12, !6, i64 14, !51, i64 16, !51, i64 72, !51, i64 128, !51, i64 184, !6, i64 240, !6, i64 368}
!51 = !{!"s2n_hash_state", !11, i64 0, !14, i64 8, !6, i64 12, !16, i64 16, !6, i64 24}
!52 = !{!53, !11, i64 48}
!53 = !{!"s2n_cipher_suite", !14, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !14, i64 40, !11, i64 48, !6, i64 56, !6, i64 72, !11, i64 80, !11, i64 88, !14, i64 96, !6, i64 100}
!54 = !{!55, !11, i64 0}
!55 = !{!"s2n_record_algorithm", !11, i64 0, !14, i64 8, !14, i64 12, !16, i64 16}
!56 = !{!57, !14, i64 0}
!57 = !{!"s2n_cipher", !14, i64 0, !6, i64 8, !6, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}


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