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

; 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_blob = type { ptr, i32, i32, i8 }
%struct.s2n_result = type { i32 }
%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_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%struct.s2n_tls12_secrets = type { [48 x i8], [48 x i8] }

@.str = external hidden unnamed_addr constant [100 x i8], align 1
@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [100 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_rsa_client_key_recv(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [2 x i8], align 1
  %10 = alloca i16, align 2
  %11 = alloca i8, align 1
  %12 = alloca %struct.s2n_blob, align 8
  %13 = alloca %struct.s2n_result, align 4
  %14 = 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 %15

15:                                               ; preds = %2
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %49, label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

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

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

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

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

47:                                               ; preds = %41
  store i32 -1, ptr %3, align 4
  br label %346

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %15
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.s2n_connection, ptr %51, i32 0, i32 28
  %53 = getelementptr inbounds %struct.s2n_secrets, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %struct.s2n_tls12_secrets, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds [48 x i8], ptr %54, i64 0, i64 0
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.s2n_blob, ptr %56, i32 0, i32 0
  store ptr %55, ptr %57, align 8, !tbaa !14
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.s2n_blob, ptr %58, i32 0, i32 1
  store i32 48, ptr %59, align 8, !tbaa !16
  br label %60

60:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %61, ptr %6, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %60
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %111

66:                                               ; preds = %62
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.s2n_connection, ptr %69, i32 0, i32 52
  %71 = getelementptr inbounds %struct.s2n_handshake, ptr %70, i32 0, i32 9
  %72 = load i32, ptr %71, align 8, !tbaa !17
  switch i32 %72, label %110 [
    i32 0, label %110
    i32 1, label %73
    i32 2, label %106
  ]

73:                                               ; preds = %68
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %77 = getelementptr inbounds %struct.s2n_debug_info, ptr %76, i32 0, i32 0
  store ptr @.str.1, ptr %77, align 8, !tbaa !9
  %78 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %79 = getelementptr inbounds %struct.s2n_debug_info, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = getelementptr inbounds i8, ptr %80, i64 21
  %82 = call ptr @strrchr(ptr noundef %81, i32 noundef 47) #7
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %91

84:                                               ; preds = %75
  %85 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %86 = getelementptr inbounds %struct.s2n_debug_info, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 21
  %89 = call ptr @strrchr(ptr noundef %88, i32 noundef 47) #7
  %90 = getelementptr inbounds i8, ptr %89, i64 1
  br label %96

91:                                               ; preds = %75
  %92 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %93 = getelementptr inbounds %struct.s2n_debug_info, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds i8, ptr %94, i64 21
  br label %96

96:                                               ; preds = %91, %84
  %97 = phi ptr [ %90, %84 ], [ %95, %91 ]
  %98 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %99 = getelementptr inbounds %struct.s2n_debug_info, ptr %98, i32 0, i32 1
  store ptr %97, ptr %99, align 8, !tbaa !11
  %100 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 201326593, ptr %100, align 4, !tbaa !12
  %101 = call i32 @s2n_calculate_stacktrace()
  br label %102

102:                                              ; preds = %96
  br label %103

103:                                              ; preds = %102
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %111

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %68
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s2n_connection, ptr %107, i32 0, i32 52
  %109 = getelementptr inbounds %struct.s2n_handshake, ptr %108, i32 0, i32 9
  store i32 0, ptr %109, align 8, !tbaa !17
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %111

110:                                              ; preds = %68, %68
  store i32 0, ptr %7, align 4
  br label %111

111:                                              ; preds = %110, %106, %103, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %112 = load i32, ptr %7, align 4
  switch i32 %112, label %348 [
    i32 0, label %113
    i32 1, label %346
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.s2n_connection, ptr %115, i32 0, i32 52
  %117 = getelementptr inbounds %struct.s2n_handshake, ptr %116, i32 0, i32 0
  store ptr %117, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #8
  store i16 0, ptr %10, align 2, !tbaa !44
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.s2n_connection, ptr %118, i32 0, i32 23
  %120 = load i8, ptr %119, align 4, !tbaa !45
  %121 = zext i8 %120 to i32
  %122 = icmp eq i32 %121, 30
  br i1 %122, label %123, label %132

123:                                              ; preds = %114
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.s2n_stuffer, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !46
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.s2n_stuffer, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 8, !tbaa !47
  %130 = sub i32 %126, %129
  %131 = trunc i32 %130 to i16
  store i16 %131, ptr %10, align 2, !tbaa !44
  br label %141

132:                                              ; preds = %114
  br label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = call i32 @s2n_stuffer_read_uint16(ptr noundef %134, ptr noundef %10)
  %136 = icmp sgt i32 %135, -1
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %345

138:                                              ; preds = %133
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  br label %141

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

142:                                              ; preds = %141
  %143 = load i16, ptr %10, align 2, !tbaa !44
  %144 = zext i16 %143 to i32
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.s2n_stuffer, ptr %145, i32 0, i32 2
  %147 = load i32, ptr %146, align 4, !tbaa !46
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.s2n_stuffer, ptr %148, i32 0, i32 1
  %150 = load i32, ptr %149, align 8, !tbaa !47
  %151 = sub i32 %147, %150
  %152 = icmp ugt i32 %144, %151
  br i1 %152, label %153, label %186

153:                                              ; preds = %142
  br label %154

154:                                              ; preds = %153
  br label %155

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

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

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

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

182:                                              ; preds = %176
  br label %183

183:                                              ; preds = %182
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %345

184:                                              ; No predecessors!
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185, %142
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s2n_connection, ptr %189, i32 0, i32 20
  %191 = load i8, ptr %190, align 1, !tbaa !48
  %192 = zext i8 %191 to i32
  %193 = icmp eq i32 %192, 20
  br i1 %193, label %194, label %199

194:                                              ; preds = %188
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.s2n_connection, ptr %195, i32 0, i32 21
  %197 = load i8, ptr %196, align 2, !tbaa !49
  %198 = zext i8 %197 to i32
  br label %204

199:                                              ; preds = %188
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.s2n_connection, ptr %200, i32 0, i32 20
  %202 = load i8, ptr %201, align 1, !tbaa !48
  %203 = zext i8 %202 to i32
  br label %204

204:                                              ; preds = %199, %194
  %205 = phi i32 [ %198, %194 ], [ %203, %199 ]
  %206 = trunc i32 %205 to i8
  store i8 %206, ptr %11, align 1, !tbaa !50
  %207 = load i8, ptr %11, align 1, !tbaa !50
  %208 = zext i8 %207 to i32
  %209 = sdiv i32 %208, 10
  %210 = trunc i32 %209 to i8
  %211 = getelementptr inbounds [2 x i8], ptr %9, i64 0, i64 0
  store i8 %210, ptr %211, align 1, !tbaa !50
  %212 = load i8, ptr %11, align 1, !tbaa !50
  %213 = zext i8 %212 to i32
  %214 = srem i32 %213, 10
  %215 = trunc i32 %214 to i8
  %216 = getelementptr inbounds [2 x i8], ptr %9, i64 0, i64 1
  store i8 %215, ptr %216, align 1, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 24, i1 false)
  br label %217

217:                                              ; preds = %204
  %218 = load ptr, ptr %8, align 8, !tbaa !5
  %219 = load i16, ptr %10, align 2, !tbaa !44
  %220 = zext i16 %219 to i32
  %221 = call ptr @s2n_stuffer_raw_read(ptr noundef %218, i32 noundef %220)
  %222 = load i16, ptr %10, align 2, !tbaa !44
  %223 = zext i16 %222 to i32
  %224 = call i32 @s2n_blob_init(ptr noundef %12, ptr noundef %221, i32 noundef %223)
  %225 = icmp sgt i32 %224, -1
  br i1 %225, label %227, label %226

226:                                              ; preds = %217
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %344

227:                                              ; preds = %217
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  %231 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !14
  %233 = icmp ne ptr %232, null
  br i1 %233, label %267, label %234

234:                                              ; preds = %230
  br label %235

235:                                              ; preds = %234
  br label %236

236:                                              ; preds = %235
  %237 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %238 = getelementptr inbounds %struct.s2n_debug_info, ptr %237, i32 0, i32 0
  store ptr @.str.3, ptr %238, align 8, !tbaa !9
  %239 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %240 = getelementptr inbounds %struct.s2n_debug_info, ptr %239, i32 0, i32 0
  %241 = load ptr, ptr %240, align 8, !tbaa !9
  %242 = getelementptr inbounds i8, ptr %241, i64 21
  %243 = call ptr @strrchr(ptr noundef %242, i32 noundef 47) #7
  %244 = icmp ne ptr %243, null
  br i1 %244, label %245, label %252

245:                                              ; preds = %236
  %246 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %247 = getelementptr inbounds %struct.s2n_debug_info, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !9
  %249 = getelementptr inbounds i8, ptr %248, i64 21
  %250 = call ptr @strrchr(ptr noundef %249, i32 noundef 47) #7
  %251 = getelementptr inbounds i8, ptr %250, i64 1
  br label %257

252:                                              ; preds = %236
  %253 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %254 = getelementptr inbounds %struct.s2n_debug_info, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !9
  %256 = getelementptr inbounds i8, ptr %255, i64 21
  br label %257

257:                                              ; preds = %252, %245
  %258 = phi ptr [ %251, %245 ], [ %256, %252 ]
  %259 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %260 = getelementptr inbounds %struct.s2n_debug_info, ptr %259, i32 0, i32 1
  store ptr %258, ptr %260, align 8, !tbaa !11
  %261 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %261, align 4, !tbaa !12
  %262 = call i32 @s2n_calculate_stacktrace()
  br label %263

263:                                              ; preds = %257
  br label %264

264:                                              ; preds = %263
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %344

265:                                              ; No predecessors!
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266, %230
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268
  br label %270

270:                                              ; preds = %269
  %271 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 1
  %272 = load i32, ptr %271, align 8, !tbaa !16
  %273 = icmp ugt i32 %272, 0
  br i1 %273, label %307, label %274

274:                                              ; preds = %270
  br label %275

275:                                              ; preds = %274
  br label %276

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

285:                                              ; preds = %276
  %286 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %287 = getelementptr inbounds %struct.s2n_debug_info, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !9
  %289 = getelementptr inbounds i8, ptr %288, i64 21
  %290 = call ptr @strrchr(ptr noundef %289, i32 noundef 47) #7
  %291 = getelementptr inbounds i8, ptr %290, i64 1
  br label %297

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

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

303:                                              ; preds = %297
  br label %304

304:                                              ; preds = %303
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %344

305:                                              ; No predecessors!
  br label %306

306:                                              ; preds = %305
  br label %307

307:                                              ; preds = %306, %270
  br label %308

308:                                              ; preds = %307
  br label %309

309:                                              ; preds = %308
  br label %310

310:                                              ; preds = %309
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = call i32 @s2n_get_private_random_data(ptr noundef %311)
  %313 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  store i32 %312, ptr %313, align 4
  %314 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  %315 = load i32, ptr %314, align 4
  %316 = call zeroext i1 @s2n_result_is_ok(i32 %315)
  br i1 %316, label %318, label %317

317:                                              ; preds = %310
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %344

318:                                              ; preds = %310
  br label %319

319:                                              ; preds = %318
  br label %320

320:                                              ; preds = %319
  %321 = getelementptr inbounds [2 x i8], ptr %9, i64 0, i64 0
  %322 = load i8, ptr %321, align 1, !tbaa !50
  %323 = load ptr, ptr %4, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.s2n_connection, ptr %323, i32 0, i32 28
  %325 = getelementptr inbounds %struct.s2n_secrets, ptr %324, i32 0, i32 0
  %326 = getelementptr inbounds %struct.s2n_tls12_secrets, ptr %325, i32 0, i32 0
  %327 = getelementptr inbounds [48 x i8], ptr %326, i64 0, i64 0
  store i8 %322, ptr %327, align 8, !tbaa !50
  %328 = getelementptr inbounds [2 x i8], ptr %9, i64 0, i64 1
  %329 = load i8, ptr %328, align 1, !tbaa !50
  %330 = load ptr, ptr %4, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.s2n_connection, ptr %330, i32 0, i32 28
  %332 = getelementptr inbounds %struct.s2n_secrets, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.s2n_tls12_secrets, ptr %332, i32 0, i32 0
  %334 = getelementptr inbounds [48 x i8], ptr %333, i64 0, i64 1
  store i8 %329, ptr %334, align 1, !tbaa !50
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = load ptr, ptr %5, align 8, !tbaa !5
  %337 = call i32 @s2n_async_pkey_decrypt(ptr noundef %335, ptr noundef %12, ptr noundef %336, ptr noundef @s2n_rsa_client_key_recv_complete)
  %338 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %337, ptr %338, align 4
  %339 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %340 = load i32, ptr %339, align 4
  %341 = call zeroext i1 @s2n_result_is_ok(i32 %340)
  %342 = zext i1 %341 to i64
  %343 = select i1 %341, i32 0, i32 -1
  store i32 %343, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %344

344:                                              ; preds = %320, %317, %304, %264, %226
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  br label %345

345:                                              ; preds = %344, %183, %137
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %346

346:                                              ; preds = %345, %111, %47
  %347 = load i32, ptr %3, align 4
  ret i32 %347

348:                                              ; preds = %111
  unreachable
}

; 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.start.p0(i64 immarg, ptr nocapture) #4

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

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

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

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

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

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

declare i32 @s2n_get_private_random_data(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_rsa_client_key_recv_complete(ptr noundef, i1 noundef zeroext, ptr noundef) #0

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #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, !6, i64 0}
!15 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!16 = !{!15, !13, i64 8}
!17 = !{!18, !13, i64 2184}
!18 = !{!"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, !19, i64 160, !20, i64 168, !20, 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, !21, i64 240, !6, i64 632, !6, i64 640, !22, 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, !20, i64 1944, !7, i64 1952, !34, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !27, i64 2003, !35, i64 2004, !35, i64 2008, !36, i64 2016, !33, i64 2208, !13, i64 2212, !33, i64 2216, !20, i64 2224, !7, i64 2232, !20, i64 2240, !20, i64 2248, !20, i64 2256, !35, i64 2264, !35, i64 2268, !7, i64 2272, !7, i64 2528, !13, i64 2784, !15, i64 2792, !13, i64 2816, !15, i64 2824, !15, i64 2848, !15, i64 2872, !38, i64 2896, !40, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !13, i64 3780, !15, i64 3784, !13, i64 3808, !42, i64 3816, !7, i64 3848, !34, i64 3992, !15, i64 4032, !15, i64 4056, !27, i64 4080, !27, i64 4081, !27, i64 4082, !33, i64 4084, !33, i64 4086, !13, i64 4088, !13, i64 4092, !15, i64 4096, !13, i64 4120, !43, i64 4128, !35, i64 4176, !7, i64 4180, !7, i64 4181}
!19 = !{!"s2n_timer", !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"s2n_secrets", !7, i64 0, !13, i64 388}
!22 = !{!"s2n_kex_parameters", !23, i64 0, !24, i64 8, !7, i64 24, !24, i64 56, !25, i64 72, !25, i64 184, !7, i64 296, !26, i64 360, !15, i64 448, !15, i64 472}
!23 = !{!"s2n_dh_params", !6, i64 0}
!24 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!25 = !{!"s2n_kem_group_params", !6, i64 0, !26, i64 8, !24, i64 96}
!26 = !{!"s2n_kem_params", !6, i64 0, !15, i64 8, !15, i64 32, !15, i64 56, !27, i64 80}
!27 = !{!"_Bool", !7, i64 0}
!28 = !{!"s2n_handshake_parameters", !29, i64 0, !29, i64 48, !15, 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", !15, i64 0, !13, i64 24, !13, i64 28}
!33 = !{!"short", !7, i64 0}
!34 = !{!"s2n_stuffer", !15, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 36, !13, i64 36}
!35 = !{!"", !13, i64 0}
!36 = !{!"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, !37, i64 176, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 188}
!37 = !{!"s2n_offered_early_data", !6, i64 0}
!38 = !{!"s2n_client_hello", !15, i64 0, !39, i64 24, !15, i64 728, !15, i64 752, !15, 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}
!39 = !{!"", !7, i64 0, !15, i64 672, !33, i64 696}
!40 = !{!"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, !41, i64 48, !27, i64 52}
!41 = !{!"s2n_cert_validation_info", !13, i64 0, !13, i64 0}
!42 = !{!"s2n_ticket_fields", !15, i64 0, !13, i64 24}
!43 = !{!"s2n_post_handshake", !34, i64 0, !7, i64 40}
!44 = !{!33, !33, i64 0}
!45 = !{!18, !7, i64 220}
!46 = !{!34, !13, i64 28}
!47 = !{!34, !13, i64 24}
!48 = !{!18, !7, i64 217}
!49 = !{!18, !7, i64 218}
!50 = !{!7, !7, 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_blob = type { ptr, i32, i32, i8 }

@.str = external hidden unnamed_addr constant [100 x i8], align 1
@_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.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [100 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_rsa_client_key_recv(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i16, align 2
  %4 = alloca %struct.s2n_blob, align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %5, label %13

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

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 240
  store ptr %14, ptr %1, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 48, ptr %15, align 8, !tbaa !15
  %.not39 = icmp eq ptr %0, null
  br i1 %.not39, label %.thread, label %16

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %0, i64 2184
  %18 = load i32, ptr %17, align 8, !tbaa !16
  switch i32 %18, label %28 [
    i32 2, label %27
    i32 1, label %19
  ]

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

27:                                               ; preds = %16
  store i32 0, ptr %17, align 8, !tbaa !16
  br label %.thread

28:                                               ; preds = %16
  %29 = getelementptr inbounds i8, ptr %0, i64 2016
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #8
  store i16 0, ptr %3, align 2, !tbaa !43
  %30 = getelementptr inbounds i8, ptr %0, i64 220
  %31 = load i8, ptr %30, align 4, !tbaa !44
  %32 = icmp eq i8 %31, 30
  br i1 %32, label %33, label %40

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %0, i64 2044
  %35 = load i32, ptr %34, align 4, !tbaa !45
  %36 = getelementptr inbounds i8, ptr %0, i64 2040
  %37 = load i32, ptr %36, align 8, !tbaa !46
  %38 = sub i32 %35, %37
  %39 = trunc i32 %38 to i16
  store i16 %39, ptr %3, align 2, !tbaa !43
  br label %43

40:                                               ; preds = %28
  %41 = call i32 @s2n_stuffer_read_uint16(ptr noundef nonnull %29, ptr noundef nonnull %3) #8
  %42 = icmp sgt i32 %41, -1
  br i1 %42, label %._crit_edge, label %100

._crit_edge:                                      ; preds = %40
  %.pre = load i16, ptr %3, align 2, !tbaa !43
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 2044
  %.pre49 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !45
  %.phi.trans.insert50 = getelementptr inbounds i8, ptr %0, i64 2040
  %.pre51 = load i32, ptr %.phi.trans.insert50, align 8, !tbaa !46
  %.pre52 = sub i32 %.pre49, %.pre51
  br label %43

43:                                               ; preds = %._crit_edge, %33
  %.pre-phi = phi i32 [ %.pre52, %._crit_edge ], [ %38, %33 ]
  %44 = phi i16 [ %.pre, %._crit_edge ], [ %39, %33 ]
  %45 = zext i16 %44 to i32
  %46 = icmp ult i32 %.pre-phi, %45
  br i1 %46, label %47, label %55

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

55:                                               ; preds = %43
  %56 = getelementptr inbounds i8, ptr %0, i64 217
  %57 = load i8, ptr %56, align 1, !tbaa !47
  %58 = icmp eq i8 %57, 20
  br i1 %58, label %59, label %62

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %0, i64 218
  %61 = load i8, ptr %60, align 2, !tbaa !48
  br label %62

62:                                               ; preds = %55, %59
  %.in = phi i8 [ %61, %59 ], [ %57, %55 ]
  %63 = udiv i8 %.in, 10
  %64 = urem i8 %.in, 10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  %65 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %29, i32 noundef %45) #8
  %66 = load i16, ptr %3, align 2, !tbaa !43
  %67 = zext i16 %66 to i32
  %68 = call i32 @s2n_blob_init(ptr noundef nonnull %4, ptr noundef %65, i32 noundef %67) #8
  %69 = icmp sgt i32 %68, -1
  br i1 %69, label %70, label %99

70:                                               ; preds = %62
  %71 = load ptr, ptr %4, align 8, !tbaa !13
  %.not41 = icmp eq ptr %71, null
  br i1 %.not41, label %72, label %80

72:                                               ; preds = %70
  %73 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %73, align 8, !tbaa !5
  %74 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #7
  %.not42 = icmp eq ptr %74, null
  %75 = getelementptr inbounds i8, ptr %74, i64 1
  %76 = select i1 %.not42, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %75
  %77 = getelementptr inbounds i8, ptr %73, i64 8
  store ptr %76, ptr %77, align 8, !tbaa !10
  %78 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %78, align 4, !tbaa !11
  %79 = call i32 @s2n_calculate_stacktrace() #8
  br label %99

80:                                               ; preds = %70
  %81 = getelementptr inbounds i8, ptr %4, i64 8
  %82 = load i32, ptr %81, align 8, !tbaa !15
  %.not43 = icmp eq i32 %82, 0
  br i1 %.not43, label %83, label %91

83:                                               ; preds = %80
  %84 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.4, ptr %84, align 8, !tbaa !5
  %85 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.4, i64 21), i32 noundef 47) #7
  %.not44 = icmp eq ptr %85, null
  %86 = getelementptr inbounds i8, ptr %85, i64 1
  %87 = select i1 %.not44, ptr getelementptr inbounds (i8, ptr @.str.4, i64 21), ptr %86
  %88 = getelementptr inbounds i8, ptr %84, i64 8
  store ptr %87, ptr %88, align 8, !tbaa !10
  %89 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %89, align 4, !tbaa !11
  %90 = call i32 @s2n_calculate_stacktrace() #8
  br label %99

91:                                               ; preds = %80
  %92 = call i32 @s2n_get_private_random_data(ptr noundef nonnull %1) #8
  %93 = call zeroext i1 @s2n_result_is_ok(i32 %92)
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  store i8 %63, ptr %14, align 8, !tbaa !49
  %95 = getelementptr inbounds i8, ptr %0, i64 241
  store i8 %64, ptr %95, align 1, !tbaa !49
  %96 = call i32 @s2n_async_pkey_decrypt(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %1, ptr noundef nonnull @s2n_rsa_client_key_recv_complete) #8
  %97 = call zeroext i1 @s2n_result_is_ok(i32 %96)
  %not. = xor i1 %97, true
  %98 = sext i1 %not. to i32
  br label %99

99:                                               ; preds = %91, %62, %94, %83, %72
  %.1 = phi i32 [ %98, %94 ], [ -1, %83 ], [ -1, %72 ], [ -1, %62 ], [ -1, %91 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %100

100:                                              ; preds = %40, %99, %47
  %.2 = phi i32 [ -1, %47 ], [ %.1, %99 ], [ -1, %40 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #8
  br label %.thread

.thread:                                          ; preds = %13, %27, %19, %100, %5
  %.3 = phi i32 [ %.2, %100 ], [ -1, %5 ], [ -1, %13 ], [ 0, %27 ], [ -1, %19 ]
  ret i32 %.3
}

; 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.start.p0(i64 immarg, ptr nocapture) #4

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

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

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

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

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

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

declare i32 @s2n_get_private_random_data(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_rsa_client_key_recv_complete(ptr noundef, i1 noundef zeroext, ptr noundef) #0

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


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