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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.16 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [91 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_async_pkey_op_apply(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.s2n_result, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.s2n_result, align 4
  %10 = 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 %11

11:                                               ; preds = %2
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %45, label %14

14:                                               ; preds = %11
  br label %15

15:                                               ; preds = %14
  br label %16

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

25:                                               ; preds = %16
  %26 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %27 = getelementptr inbounds %struct.s2n_debug_info, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 21
  %30 = call ptr @strrchr(ptr noundef %29, i32 noundef 47) #6
  %31 = getelementptr inbounds i8, ptr %30, i64 1
  br label %37

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

37:                                               ; preds = %32, %25
  %38 = phi ptr [ %31, %25 ], [ %36, %32 ]
  %39 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %40 = getelementptr inbounds %struct.s2n_debug_info, ptr %39, i32 0, i32 1
  store ptr %38, ptr %40, align 8, !tbaa !11
  %41 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %41, align 4, !tbaa !12
  %42 = call i32 @s2n_calculate_stacktrace()
  br label %43

43:                                               ; preds = %37
  store i32 -1, ptr %3, align 4
  br label %332

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %11
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %81, label %50

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  br label %52

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

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

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

73:                                               ; preds = %68, %61
  %74 = phi ptr [ %67, %61 ], [ %72, %68 ]
  %75 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %76 = getelementptr inbounds %struct.s2n_debug_info, ptr %75, i32 0, i32 1
  store ptr %74, ptr %76, align 8, !tbaa !11
  %77 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %77, align 4, !tbaa !12
  %78 = call i32 @s2n_calculate_stacktrace()
  br label %79

79:                                               ; preds = %73
  store i32 -1, ptr %3, align 4
  br label %332

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80, %47
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s2n_async_pkey_op, ptr %84, i32 0, i32 3
  %86 = load i8, ptr %85, align 4
  %87 = and i8 %86, 1
  %88 = zext i8 %87 to i32
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %121, label %90

90:                                               ; preds = %83
  br label %91

91:                                               ; preds = %90
  br label %92

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

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

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

113:                                              ; preds = %108, %101
  %114 = phi ptr [ %107, %101 ], [ %112, %108 ]
  %115 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %116 = getelementptr inbounds %struct.s2n_debug_info, ptr %115, i32 0, i32 1
  store ptr %114, ptr %116, align 8, !tbaa !11
  %117 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762104, ptr %117, align 4, !tbaa !12
  %118 = call i32 @s2n_calculate_stacktrace()
  br label %119

119:                                              ; preds = %113
  store i32 -1, ptr %3, align 4
  br label %332

120:                                              ; No predecessors!
  br label %121

121:                                              ; preds = %120, %83
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.s2n_async_pkey_op, ptr %124, i32 0, i32 3
  %126 = load i8, ptr %125, align 4
  %127 = lshr i8 %126, 1
  %128 = and i8 %127, 1
  %129 = zext i8 %128 to i32
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %162

131:                                              ; preds = %123
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132
  %134 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %135 = getelementptr inbounds %struct.s2n_debug_info, ptr %134, i32 0, i32 0
  store ptr @.str.19, ptr %135, align 8, !tbaa !9
  %136 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %137 = getelementptr inbounds %struct.s2n_debug_info, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !9
  %139 = getelementptr inbounds i8, ptr %138, i64 21
  %140 = call ptr @strrchr(ptr noundef %139, i32 noundef 47) #6
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %149

142:                                              ; preds = %133
  %143 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %144 = getelementptr inbounds %struct.s2n_debug_info, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = getelementptr inbounds i8, ptr %145, i64 21
  %147 = call ptr @strrchr(ptr noundef %146, i32 noundef 47) #6
  %148 = getelementptr inbounds i8, ptr %147, i64 1
  br label %154

149:                                              ; preds = %133
  %150 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %151 = getelementptr inbounds %struct.s2n_debug_info, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !9
  %153 = getelementptr inbounds i8, ptr %152, i64 21
  br label %154

154:                                              ; preds = %149, %142
  %155 = phi ptr [ %148, %142 ], [ %153, %149 ]
  %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 1
  store ptr %155, ptr %157, align 8, !tbaa !11
  %158 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762106, ptr %158, align 4, !tbaa !12
  %159 = call i32 @s2n_calculate_stacktrace()
  br label %160

160:                                              ; preds = %154
  store i32 -1, ptr %3, align 4
  br label %332

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161, %123
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.s2n_async_pkey_op, ptr %165, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !14
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = icmp eq ptr %167, %168
  br i1 %169, label %201, label %170

170:                                              ; preds = %164
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  %173 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %174 = getelementptr inbounds %struct.s2n_debug_info, ptr %173, i32 0, i32 0
  store ptr @.str.20, ptr %174, align 8, !tbaa !9
  %175 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %176 = getelementptr inbounds %struct.s2n_debug_info, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !9
  %178 = getelementptr inbounds i8, ptr %177, i64 21
  %179 = call ptr @strrchr(ptr noundef %178, i32 noundef 47) #6
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %188

181:                                              ; preds = %172
  %182 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %183 = getelementptr inbounds %struct.s2n_debug_info, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = getelementptr inbounds i8, ptr %184, i64 21
  %186 = call ptr @strrchr(ptr noundef %185, i32 noundef 47) #6
  %187 = getelementptr inbounds i8, ptr %186, i64 1
  br label %193

188:                                              ; preds = %172
  %189 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %190 = getelementptr inbounds %struct.s2n_debug_info, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !9
  %192 = getelementptr inbounds i8, ptr %191, i64 21
  br label %193

193:                                              ; preds = %188, %181
  %194 = phi ptr [ %187, %181 ], [ %192, %188 ]
  %195 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %196 = getelementptr inbounds %struct.s2n_debug_info, ptr %195, i32 0, i32 1
  store ptr %194, ptr %196, align 8, !tbaa !11
  %197 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762105, ptr %197, align 4, !tbaa !12
  %198 = call i32 @s2n_calculate_stacktrace()
  br label %199

199:                                              ; preds = %193
  store i32 -1, ptr %3, align 4
  br label %332

200:                                              ; No predecessors!
  br label %201

201:                                              ; preds = %200, %164
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.s2n_connection, ptr %204, i32 0, i32 52
  %206 = getelementptr inbounds %struct.s2n_handshake, ptr %205, i32 0, i32 9
  %207 = load i32, ptr %206, align 8, !tbaa !16
  %208 = icmp eq i32 %207, 1
  br i1 %208, label %240, label %209

209:                                              ; preds = %203
  br label %210

210:                                              ; preds = %209
  br label %211

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

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

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

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

238:                                              ; preds = %232
  store i32 -1, ptr %3, align 4
  br label %332

239:                                              ; No predecessors!
  br label %240

240:                                              ; preds = %239, %203
  br label %241

241:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %242

242:                                              ; preds = %241
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.s2n_async_pkey_op, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 8, !tbaa !44
  %246 = call i32 @s2n_async_get_actions(i32 noundef %245, ptr noundef %6)
  %247 = getelementptr inbounds %struct.s2n_result, ptr %7, i32 0, i32 0
  store i32 %246, ptr %247, align 4
  %248 = getelementptr inbounds %struct.s2n_result, ptr %7, i32 0, i32 0
  %249 = load i32, ptr %248, align 4
  %250 = call zeroext i1 @s2n_result_is_ok(i32 %249)
  br i1 %250, label %252, label %251

251:                                              ; preds = %242
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %331

252:                                              ; preds = %242
  br label %253

253:                                              ; preds = %252
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = icmp ne ptr %256, null
  br i1 %257, label %291, label %258

258:                                              ; preds = %255
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  %261 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %262 = getelementptr inbounds %struct.s2n_debug_info, ptr %261, i32 0, i32 0
  store ptr @.str.22, ptr %262, align 8, !tbaa !9
  %263 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %264 = getelementptr inbounds %struct.s2n_debug_info, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !9
  %266 = getelementptr inbounds i8, ptr %265, i64 21
  %267 = call ptr @strrchr(ptr noundef %266, i32 noundef 47) #6
  %268 = icmp ne ptr %267, null
  br i1 %268, label %269, label %276

269:                                              ; preds = %260
  %270 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %271 = getelementptr inbounds %struct.s2n_debug_info, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !9
  %273 = getelementptr inbounds i8, ptr %272, i64 21
  %274 = call ptr @strrchr(ptr noundef %273, i32 noundef 47) #6
  %275 = getelementptr inbounds i8, ptr %274, i64 1
  br label %281

276:                                              ; preds = %260
  %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
  %279 = load ptr, ptr %278, align 8, !tbaa !9
  %280 = getelementptr inbounds i8, ptr %279, i64 21
  br label %281

281:                                              ; preds = %276, %269
  %282 = phi ptr [ %275, %269 ], [ %280, %276 ]
  %283 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %284 = getelementptr inbounds %struct.s2n_debug_info, ptr %283, i32 0, i32 1
  store ptr %282, ptr %284, align 8, !tbaa !11
  %285 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %285, align 4, !tbaa !12
  %286 = call i32 @s2n_calculate_stacktrace()
  br label %287

287:                                              ; preds = %281
  br label %288

288:                                              ; preds = %287
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %331

289:                                              ; No predecessors!
  br label %290

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290, %255
  br label %292

292:                                              ; preds = %291
  br label %293

293:                                              ; preds = %292
  br label %294

294:                                              ; preds = %293
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.s2n_async_pkey_op_actions, ptr %295, i32 0, i32 1
  %297 = load ptr, ptr %296, align 8, !tbaa !45
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = load ptr, ptr %5, align 8, !tbaa !5
  %300 = call i32 %297(ptr noundef %298, ptr noundef %299)
  %301 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  store i32 %300, ptr %301, align 4
  %302 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  %303 = load i32, ptr %302, align 4
  %304 = call zeroext i1 @s2n_result_is_ok(i32 %303)
  br i1 %304, label %306, label %305

305:                                              ; preds = %294
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %331

306:                                              ; preds = %294
  br label %307

307:                                              ; preds = %306
  br label %308

308:                                              ; preds = %307
  %309 = load ptr, ptr %4, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.s2n_async_pkey_op, ptr %309, i32 0, i32 3
  %311 = load i8, ptr %310, align 4
  %312 = and i8 %311, -3
  %313 = or i8 %312, 2
  store i8 %313, ptr %310, align 4
  %314 = load ptr, ptr %5, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.s2n_connection, ptr %314, i32 0, i32 52
  %316 = getelementptr inbounds %struct.s2n_handshake, ptr %315, i32 0, i32 9
  store i32 2, ptr %316, align 8, !tbaa !16
  br label %317

317:                                              ; preds = %308
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.s2n_async_pkey_op_actions, ptr %318, i32 0, i32 5
  %320 = load ptr, ptr %319, align 8, !tbaa !47
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = call i32 %320(ptr noundef %321)
  %323 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  store i32 %322, ptr %323, align 4
  %324 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  %325 = load i32, ptr %324, align 4
  %326 = call zeroext i1 @s2n_result_is_ok(i32 %325)
  br i1 %326, label %328, label %327

327:                                              ; preds = %317
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %331

328:                                              ; preds = %317
  br label %329

329:                                              ; preds = %328
  br label %330

330:                                              ; preds = %329
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %331

331:                                              ; preds = %330, %327, %305, %288, %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %332

332:                                              ; preds = %331, %238, %199, %160, %119, %79, %43
  %333 = load i32, ptr %3, align 4
  ret i32 %333
}

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.s2n_debug_info = type { ptr, ptr }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.16 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [91 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) 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

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

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

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

12:                                               ; preds = %2
  %.not26 = icmp eq ptr %1, null
  br i1 %.not26, label %13, label %21

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

21:                                               ; preds = %12
  %22 = getelementptr inbounds i8, ptr %0, i64 20
  %23 = load i8, ptr %22, align 4
  %24 = and i8 %23, 1
  %.not28 = icmp eq i8 %24, 0
  br i1 %.not28, label %25, label %33

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

33:                                               ; preds = %21
  %34 = and i8 %23, 2
  %.not30 = icmp eq i8 %34, 0
  br i1 %.not30, label %43, label %35

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

43:                                               ; preds = %33
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = icmp eq ptr %45, %1
  br i1 %46, label %55, label %47

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

55:                                               ; preds = %43
  %56 = getelementptr inbounds i8, ptr %1, i64 2184
  %57 = load i32, ptr %56, align 8, !tbaa !15
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %67, label %59

59:                                               ; preds = %55
  %60 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.21, ptr %60, align 8, !tbaa !5
  %61 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.21, i64 21), i32 noundef 47) #6
  %.not32 = icmp eq ptr %61, null
  %62 = getelementptr inbounds i8, ptr %61, i64 1
  %63 = select i1 %.not32, ptr getelementptr inbounds (i8, ptr @.str.21, i64 21), ptr %62
  %64 = getelementptr inbounds i8, ptr %60, i64 8
  store ptr %63, ptr %64, align 8, !tbaa !10
  %65 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762105, ptr %65, align 4, !tbaa !11
  %66 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %95

67:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store ptr null, ptr %3, align 8, !tbaa !43
  %68 = load i32, ptr %0, align 8, !tbaa !44
  %69 = call i32 @s2n_async_get_actions(i32 noundef %68, ptr noundef nonnull %3)
  %70 = call zeroext i1 @s2n_result_is_ok(i32 %69)
  br i1 %70, label %71, label %94

71:                                               ; preds = %67
  %72 = load ptr, ptr %3, align 8, !tbaa !43
  %.not33 = icmp eq ptr %72, null
  br i1 %.not33, label %73, label %81

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

81:                                               ; preds = %71
  %82 = getelementptr inbounds i8, ptr %72, i64 8
  %83 = load ptr, ptr %82, align 8, !tbaa !45
  %84 = call i32 %83(ptr noundef nonnull %0, ptr noundef nonnull %1) #7
  %85 = call zeroext i1 @s2n_result_is_ok(i32 %84)
  br i1 %85, label %86, label %94

86:                                               ; preds = %81
  %87 = load i8, ptr %22, align 4
  %88 = or i8 %87, 2
  store i8 %88, ptr %22, align 4
  store i32 2, ptr %56, align 8, !tbaa !15
  %89 = load ptr, ptr %3, align 8, !tbaa !43
  %90 = getelementptr inbounds i8, ptr %89, i64 40
  %91 = load ptr, ptr %90, align 8, !tbaa !47
  %92 = call i32 %91(ptr noundef nonnull %0) #7
  %93 = call zeroext i1 @s2n_result_is_ok(i32 %92)
  %not. = xor i1 %93, true
  %. = sext i1 %not. to i32
  br label %94

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

95:                                               ; preds = %94, %59, %47, %35, %25, %13, %4
  %.1 = phi i32 [ -1, %35 ], [ %.0, %94 ], [ -1, %59 ], [ -1, %47 ], [ -1, %25 ], [ -1, %13 ], [ -1, %4 ]
  ret i32 %.1
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"s2n_async_pkey_op", !12, i64 0, !7, i64 8, !12, i64 16, !12, i64 20, !12, i64 20, !8, i64 24}
!15 = !{!16, !12, i64 2184}
!16 = !{!"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, !17, i64 160, !18, i64 168, !18, 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, !19, i64 240, !7, i64 632, !7, i64 640, !20, 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, !18, 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, !18, i64 2224, !8, i64 2232, !18, i64 2240, !18, i64 2248, !18, i64 2256, !34, i64 2264, !34, i64 2268, !8, i64 2272, !8, i64 2528, !12, i64 2784, !25, i64 2792, !12, i64 2816, !25, i64 2824, !25, i64 2848, !25, i64 2872, !37, i64 2896, !39, i64 3704, !7, i64 3760, !7, i64 3768, !8, i64 3776, !12, i64 3780, !25, i64 3784, !12, i64 3808, !41, i64 3816, !8, i64 3848, !33, i64 3992, !25, i64 4032, !25, i64 4056, !26, i64 4080, !26, i64 4081, !26, i64 4082, !32, i64 4084, !32, i64 4086, !12, i64 4088, !12, i64 4092, !25, i64 4096, !12, i64 4120, !42, i64 4128, !34, i64 4176, !8, i64 4180, !8, i64 4181}
!17 = !{!"s2n_timer", !18, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!"s2n_secrets", !8, i64 0, !12, i64 388}
!20 = !{!"s2n_kex_parameters", !21, i64 0, !22, i64 8, !8, i64 24, !22, i64 56, !23, i64 72, !23, i64 184, !8, i64 296, !24, i64 360, !25, i64 448, !25, i64 472}
!21 = !{!"s2n_dh_params", !7, i64 0}
!22 = !{!"s2n_ecc_evp_params", !7, i64 0, !7, i64 8}
!23 = !{!"s2n_kem_group_params", !7, i64 0, !24, i64 8, !22, i64 96}
!24 = !{!"s2n_kem_params", !7, i64 0, !25, i64 8, !25, i64 32, !25, i64 56, !26, i64 80}
!25 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!26 = !{!"_Bool", !8, i64 0}
!27 = !{!"s2n_handshake_parameters", !28, i64 0, !28, i64 48, !25, 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", !25, i64 0, !12, i64 24, !12, i64 28}
!32 = !{!"short", !8, i64 0}
!33 = !{!"s2n_stuffer", !25, 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", !25, i64 0, !38, i64 24, !25, i64 728, !25, i64 752, !25, 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, !25, 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", !25, i64 0, !12, i64 24}
!42 = !{!"s2n_post_handshake", !33, i64 0, !8, i64 40}
!43 = !{!7, !7, i64 0}
!44 = !{!14, !12, i64 0}
!45 = !{!46, !7, i64 8}
!46 = !{!"s2n_async_pkey_op_actions", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!47 = !{!46, !7, i64 40}


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