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

; 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_blob = type { ptr, i32, i32, i8 }
%struct.s2n_pkey = 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.27 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @EVP_PKEY_CTX_free_pointer(ptr noundef) #4

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

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

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

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

declare ptr @EVP_PKEY_CTX_new(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_pkey_evp_decrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.s2n_result, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.s2n_result, align 4
  %13 = alloca %struct.s2n_blob, align 8
  %14 = alloca [4096 x i8], align 16
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %52, label %21

21:                                               ; preds = %18
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  %24 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %25 = getelementptr inbounds %struct.s2n_debug_info, ptr %24, i32 0, i32 0
  store ptr @.str.27, ptr %25, align 8, !tbaa !9
  %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) #7
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %39

32:                                               ; preds = %23
  %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
  %37 = call ptr @strrchr(ptr noundef %36, i32 noundef 47) #7
  %38 = getelementptr inbounds i8, ptr %37, i64 1
  br label %44

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

44:                                               ; preds = %39, %32
  %45 = phi ptr [ %38, %32 ], [ %43, %39 ]
  %46 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %47 = getelementptr inbounds %struct.s2n_debug_info, ptr %46, i32 0, i32 1
  store ptr %45, ptr %47, align 8, !tbaa !11
  %48 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %48, align 4, !tbaa !12
  %49 = call i32 @s2n_calculate_stacktrace()
  br label %50

50:                                               ; preds = %44
  store i32 -1, ptr %4, align 4
  br label %562

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %18
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %88, label %57

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %61 = getelementptr inbounds %struct.s2n_debug_info, ptr %60, i32 0, i32 0
  store ptr @.str.28, ptr %61, align 8, !tbaa !9
  %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) #7
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %75

68:                                               ; preds = %59
  %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
  %73 = call ptr @strrchr(ptr noundef %72, i32 noundef 47) #7
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  br label %80

75:                                               ; preds = %59
  %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
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %78, i64 21
  br label %80

80:                                               ; preds = %75, %68
  %81 = phi ptr [ %74, %68 ], [ %79, %75 ]
  %82 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %83 = getelementptr inbounds %struct.s2n_debug_info, ptr %82, i32 0, i32 1
  store ptr %81, ptr %83, align 8, !tbaa !11
  %84 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %84, align 4, !tbaa !12
  %85 = call i32 @s2n_calculate_stacktrace()
  br label %86

86:                                               ; preds = %80
  store i32 -1, ptr %4, align 4
  br label %562

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %54
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %124, label %93

93:                                               ; preds = %90
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  %96 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %97 = getelementptr inbounds %struct.s2n_debug_info, ptr %96, i32 0, i32 0
  store ptr @.str.29, ptr %97, align 8, !tbaa !9
  %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 0
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds i8, ptr %100, i64 21
  %102 = call ptr @strrchr(ptr noundef %101, i32 noundef 47) #7
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %111

104:                                              ; preds = %95
  %105 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %106 = getelementptr inbounds %struct.s2n_debug_info, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds i8, ptr %107, i64 21
  %109 = call ptr @strrchr(ptr noundef %108, i32 noundef 47) #7
  %110 = getelementptr inbounds i8, ptr %109, i64 1
  br label %116

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

116:                                              ; preds = %111, %104
  %117 = phi ptr [ %110, %104 ], [ %115, %111 ]
  %118 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %119 = getelementptr inbounds %struct.s2n_debug_info, ptr %118, i32 0, i32 1
  store ptr %117, ptr %119, align 8, !tbaa !11
  %120 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %120, align 4, !tbaa !12
  %121 = call i32 @s2n_calculate_stacktrace()
  br label %122

122:                                              ; preds = %116
  store i32 -1, ptr %4, align 4
  br label %562

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %90
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.s2n_pkey, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !14
  %130 = icmp ne ptr %129, null
  br i1 %130, label %162, label %131

131:                                              ; preds = %126
  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.30, 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) #7
  %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) #7
  %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 402653193, ptr %158, align 4, !tbaa !12
  %159 = call i32 @s2n_calculate_stacktrace()
  br label %160

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

161:                                              ; No predecessors!
  br label %162

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

163:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %164

164:                                              ; preds = %163
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.s2n_pkey, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !14
  %168 = call i32 @s2n_pkey_get_type(ptr noundef %167, ptr noundef %8)
  %169 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  store i32 %168, ptr %169, align 4
  %170 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  %171 = load i32, ptr %170, align 4
  %172 = call zeroext i1 @s2n_result_is_ok(i32 %171)
  br i1 %172, label %174, label %173

173:                                              ; preds = %164
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %561

174:                                              ; preds = %164
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %8, align 4, !tbaa !12
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %213, label %180

180:                                              ; preds = %177
  br label %181

181:                                              ; preds = %180
  br label %182

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

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

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

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

209:                                              ; preds = %203
  br label %210

210:                                              ; preds = %209
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %561

211:                                              ; No predecessors!
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212, %177
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !12
  br label %216

216:                                              ; preds = %215
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = call i32 @s2n_pkey_size(ptr noundef %217, ptr noundef %11)
  %219 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  store i32 %218, ptr %219, align 4
  %220 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  %221 = load i32, ptr %220, align 4
  %222 = call zeroext i1 @s2n_result_is_ok(i32 %221)
  br i1 %222, label %224, label %223

223:                                              ; preds = %216
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %560

224:                                              ; preds = %216
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4096, ptr %14) #8
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 4096, i1 false)
  br label %227

227:                                              ; preds = %226
  %228 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %229 = call i32 @s2n_blob_init(ptr noundef %13, ptr noundef %228, i32 noundef 4096)
  %230 = icmp sgt i32 %229, -1
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %559

232:                                              ; preds = %227
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.s2n_blob, ptr %236, i32 0, i32 1
  %238 = load i32, ptr %237, align 8, !tbaa !16
  %239 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 1
  %240 = load i32, ptr %239, align 8, !tbaa !16
  %241 = icmp ule i32 %238, %240
  br i1 %241, label %275, label %242

242:                                              ; preds = %235
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  %245 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %246 = getelementptr inbounds %struct.s2n_debug_info, ptr %245, i32 0, i32 0
  store ptr @.str.32, ptr %246, align 8, !tbaa !9
  %247 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %248 = getelementptr inbounds %struct.s2n_debug_info, ptr %247, i32 0, i32 0
  %249 = load ptr, ptr %248, align 8, !tbaa !9
  %250 = getelementptr inbounds i8, ptr %249, i64 21
  %251 = call ptr @strrchr(ptr noundef %250, i32 noundef 47) #7
  %252 = icmp ne ptr %251, null
  br i1 %252, label %253, label %260

253:                                              ; preds = %244
  %254 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %255 = getelementptr inbounds %struct.s2n_debug_info, ptr %254, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8, !tbaa !9
  %257 = getelementptr inbounds i8, ptr %256, i64 21
  %258 = call ptr @strrchr(ptr noundef %257, i32 noundef 47) #7
  %259 = getelementptr inbounds i8, ptr %258, i64 1
  br label %265

260:                                              ; preds = %244
  %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
  %263 = load ptr, ptr %262, align 8, !tbaa !9
  %264 = getelementptr inbounds i8, ptr %263, i64 21
  br label %265

265:                                              ; preds = %260, %253
  %266 = phi ptr [ %259, %253 ], [ %264, %260 ]
  %267 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %268 = getelementptr inbounds %struct.s2n_debug_info, ptr %267, i32 0, i32 1
  store ptr %266, ptr %268, align 8, !tbaa !11
  %269 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653192, ptr %269, align 4, !tbaa !12
  %270 = call i32 @s2n_calculate_stacktrace()
  br label %271

271:                                              ; preds = %265
  br label %272

272:                                              ; preds = %271
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %559

273:                                              ; No predecessors!
  br label %274

274:                                              ; preds = %273
  br label %275

275:                                              ; preds = %274, %235
  br label %276

276:                                              ; preds = %275
  br label %277

277:                                              ; preds = %276
  br label %278

278:                                              ; preds = %277
  %279 = load i32, ptr %11, align 4, !tbaa !12
  %280 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 1
  %281 = load i32, ptr %280, align 8, !tbaa !16
  %282 = icmp ule i32 %279, %281
  br i1 %282, label %316, label %283

283:                                              ; preds = %278
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  %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
  store ptr @.str.33, ptr %287, align 8, !tbaa !9
  %288 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %289 = getelementptr inbounds %struct.s2n_debug_info, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !9
  %291 = getelementptr inbounds i8, ptr %290, i64 21
  %292 = call ptr @strrchr(ptr noundef %291, i32 noundef 47) #7
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %301

294:                                              ; preds = %285
  %295 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %296 = getelementptr inbounds %struct.s2n_debug_info, ptr %295, i32 0, i32 0
  %297 = load ptr, ptr %296, align 8, !tbaa !9
  %298 = getelementptr inbounds i8, ptr %297, i64 21
  %299 = call ptr @strrchr(ptr noundef %298, i32 noundef 47) #7
  %300 = getelementptr inbounds i8, ptr %299, i64 1
  br label %306

301:                                              ; preds = %285
  %302 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %303 = getelementptr inbounds %struct.s2n_debug_info, ptr %302, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !9
  %305 = getelementptr inbounds i8, ptr %304, i64 21
  br label %306

306:                                              ; preds = %301, %294
  %307 = phi ptr [ %300, %294 ], [ %305, %301 ]
  %308 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %309 = getelementptr inbounds %struct.s2n_debug_info, ptr %308, i32 0, i32 1
  store ptr %307, ptr %309, align 8, !tbaa !11
  %310 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653192, ptr %310, align 4, !tbaa !12
  %311 = call i32 @s2n_calculate_stacktrace()
  br label %312

312:                                              ; preds = %306
  br label %313

313:                                              ; preds = %312
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %559

314:                                              ; No predecessors!
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315, %278
  br label %317

317:                                              ; preds = %316
  br label %318

318:                                              ; preds = %317
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.s2n_pkey, ptr %319, i32 0, i32 0
  %321 = load ptr, ptr %320, align 8, !tbaa !14
  %322 = call ptr @EVP_PKEY_CTX_new(ptr noundef %321, ptr noundef null)
  store ptr %322, ptr %15, align 8, !tbaa !5
  br label %323

323:                                              ; preds = %318
  %324 = load ptr, ptr %15, align 8, !tbaa !5
  %325 = icmp ne ptr %324, null
  br i1 %325, label %359, label %326

326:                                              ; preds = %323
  br label %327

327:                                              ; preds = %326
  br label %328

328:                                              ; preds = %327
  %329 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %330 = getelementptr inbounds %struct.s2n_debug_info, ptr %329, i32 0, i32 0
  store ptr @.str.34, ptr %330, align 8, !tbaa !9
  %331 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %332 = getelementptr inbounds %struct.s2n_debug_info, ptr %331, i32 0, i32 0
  %333 = load ptr, ptr %332, align 8, !tbaa !9
  %334 = getelementptr inbounds i8, ptr %333, i64 21
  %335 = call ptr @strrchr(ptr noundef %334, i32 noundef 47) #7
  %336 = icmp ne ptr %335, null
  br i1 %336, label %337, label %344

337:                                              ; preds = %328
  %338 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %339 = getelementptr inbounds %struct.s2n_debug_info, ptr %338, i32 0, i32 0
  %340 = load ptr, ptr %339, align 8, !tbaa !9
  %341 = getelementptr inbounds i8, ptr %340, i64 21
  %342 = call ptr @strrchr(ptr noundef %341, i32 noundef 47) #7
  %343 = getelementptr inbounds i8, ptr %342, i64 1
  br label %349

344:                                              ; preds = %328
  %345 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %346 = getelementptr inbounds %struct.s2n_debug_info, ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !9
  %348 = getelementptr inbounds i8, ptr %347, i64 21
  br label %349

349:                                              ; preds = %344, %337
  %350 = phi ptr [ %343, %337 ], [ %348, %344 ]
  %351 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %352 = getelementptr inbounds %struct.s2n_debug_info, ptr %351, i32 0, i32 1
  store ptr %350, ptr %352, align 8, !tbaa !11
  %353 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %353, align 4, !tbaa !12
  %354 = call i32 @s2n_calculate_stacktrace()
  br label %355

355:                                              ; preds = %349
  br label %356

356:                                              ; preds = %355
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %558

357:                                              ; No predecessors!
  br label %358

358:                                              ; preds = %357
  br label %359

359:                                              ; preds = %358, %323
  br label %360

360:                                              ; preds = %359
  br label %361

361:                                              ; preds = %360
  br label %362

362:                                              ; preds = %361
  %363 = load ptr, ptr %15, align 8, !tbaa !5
  %364 = call i32 @EVP_PKEY_decrypt_init(ptr noundef %363)
  %365 = icmp eq i32 %364, 1
  br i1 %365, label %399, label %366

366:                                              ; preds = %362
  br label %367

367:                                              ; preds = %366
  br label %368

368:                                              ; preds = %367
  %369 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %370 = getelementptr inbounds %struct.s2n_debug_info, ptr %369, i32 0, i32 0
  store ptr @.str.35, ptr %370, align 8, !tbaa !9
  %371 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %372 = getelementptr inbounds %struct.s2n_debug_info, ptr %371, i32 0, i32 0
  %373 = load ptr, ptr %372, align 8, !tbaa !9
  %374 = getelementptr inbounds i8, ptr %373, i64 21
  %375 = call ptr @strrchr(ptr noundef %374, i32 noundef 47) #7
  %376 = icmp ne ptr %375, null
  br i1 %376, label %377, label %384

377:                                              ; preds = %368
  %378 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %379 = getelementptr inbounds %struct.s2n_debug_info, ptr %378, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8, !tbaa !9
  %381 = getelementptr inbounds i8, ptr %380, i64 21
  %382 = call ptr @strrchr(ptr noundef %381, i32 noundef 47) #7
  %383 = getelementptr inbounds i8, ptr %382, i64 1
  br label %389

384:                                              ; preds = %368
  %385 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %386 = getelementptr inbounds %struct.s2n_debug_info, ptr %385, i32 0, i32 0
  %387 = load ptr, ptr %386, align 8, !tbaa !9
  %388 = getelementptr inbounds i8, ptr %387, i64 21
  br label %389

389:                                              ; preds = %384, %377
  %390 = phi ptr [ %383, %377 ], [ %388, %384 ]
  %391 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %392 = getelementptr inbounds %struct.s2n_debug_info, ptr %391, i32 0, i32 1
  store ptr %390, ptr %392, align 8, !tbaa !11
  %393 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653263, ptr %393, align 4, !tbaa !12
  %394 = call i32 @s2n_calculate_stacktrace()
  br label %395

395:                                              ; preds = %389
  br label %396

396:                                              ; preds = %395
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %558

397:                                              ; No predecessors!
  br label %398

398:                                              ; preds = %397
  br label %399

399:                                              ; preds = %398, %362
  br label %400

400:                                              ; preds = %399
  br label %401

401:                                              ; preds = %400
  br label %402

402:                                              ; preds = %401
  %403 = load ptr, ptr %15, align 8, !tbaa !5
  %404 = call i32 @EVP_PKEY_CTX_set_rsa_padding(ptr noundef %403, i32 noundef 3)
  %405 = icmp eq i32 %404, 1
  br i1 %405, label %439, label %406

406:                                              ; preds = %402
  br label %407

407:                                              ; preds = %406
  br label %408

408:                                              ; preds = %407
  %409 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %410 = getelementptr inbounds %struct.s2n_debug_info, ptr %409, i32 0, i32 0
  store ptr @.str.36, ptr %410, align 8, !tbaa !9
  %411 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %412 = getelementptr inbounds %struct.s2n_debug_info, ptr %411, i32 0, i32 0
  %413 = load ptr, ptr %412, align 8, !tbaa !9
  %414 = getelementptr inbounds i8, ptr %413, i64 21
  %415 = call ptr @strrchr(ptr noundef %414, i32 noundef 47) #7
  %416 = icmp ne ptr %415, null
  br i1 %416, label %417, label %424

417:                                              ; preds = %408
  %418 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %419 = getelementptr inbounds %struct.s2n_debug_info, ptr %418, i32 0, i32 0
  %420 = load ptr, ptr %419, align 8, !tbaa !9
  %421 = getelementptr inbounds i8, ptr %420, i64 21
  %422 = call ptr @strrchr(ptr noundef %421, i32 noundef 47) #7
  %423 = getelementptr inbounds i8, ptr %422, i64 1
  br label %429

424:                                              ; preds = %408
  %425 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %426 = getelementptr inbounds %struct.s2n_debug_info, ptr %425, i32 0, i32 0
  %427 = load ptr, ptr %426, align 8, !tbaa !9
  %428 = getelementptr inbounds i8, ptr %427, i64 21
  br label %429

429:                                              ; preds = %424, %417
  %430 = phi ptr [ %423, %417 ], [ %428, %424 ]
  %431 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %432 = getelementptr inbounds %struct.s2n_debug_info, ptr %431, i32 0, i32 1
  store ptr %430, ptr %432, align 8, !tbaa !11
  %433 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653263, ptr %433, align 4, !tbaa !12
  %434 = call i32 @s2n_calculate_stacktrace()
  br label %435

435:                                              ; preds = %429
  br label %436

436:                                              ; preds = %435
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %558

437:                                              ; No predecessors!
  br label %438

438:                                              ; preds = %437
  br label %439

439:                                              ; preds = %438, %402
  br label %440

440:                                              ; preds = %439
  br label %441

441:                                              ; preds = %440
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %442 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 1
  %443 = load i32, ptr %442, align 8, !tbaa !16
  %444 = zext i32 %443 to i64
  store i64 %444, ptr %16, align 8, !tbaa !18
  br label %445

445:                                              ; preds = %441
  %446 = load ptr, ptr %15, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 0
  %448 = load ptr, ptr %447, align 8, !tbaa !20
  %449 = load ptr, ptr %6, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.s2n_blob, ptr %449, i32 0, i32 0
  %451 = load ptr, ptr %450, align 8, !tbaa !20
  %452 = load ptr, ptr %6, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.s2n_blob, ptr %452, i32 0, i32 1
  %454 = load i32, ptr %453, align 8, !tbaa !16
  %455 = zext i32 %454 to i64
  %456 = call i32 @EVP_PKEY_decrypt(ptr noundef %446, ptr noundef %448, ptr noundef %16, ptr noundef %451, i64 noundef %455)
  %457 = icmp eq i32 %456, 1
  br i1 %457, label %491, label %458

458:                                              ; preds = %445
  br label %459

459:                                              ; preds = %458
  br label %460

460:                                              ; preds = %459
  %461 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %462 = getelementptr inbounds %struct.s2n_debug_info, ptr %461, i32 0, i32 0
  store ptr @.str.37, ptr %462, align 8, !tbaa !9
  %463 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %464 = getelementptr inbounds %struct.s2n_debug_info, ptr %463, i32 0, i32 0
  %465 = load ptr, ptr %464, align 8, !tbaa !9
  %466 = getelementptr inbounds i8, ptr %465, i64 21
  %467 = call ptr @strrchr(ptr noundef %466, i32 noundef 47) #7
  %468 = icmp ne ptr %467, null
  br i1 %468, label %469, label %476

469:                                              ; preds = %460
  %470 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %471 = getelementptr inbounds %struct.s2n_debug_info, ptr %470, i32 0, i32 0
  %472 = load ptr, ptr %471, align 8, !tbaa !9
  %473 = getelementptr inbounds i8, ptr %472, i64 21
  %474 = call ptr @strrchr(ptr noundef %473, i32 noundef 47) #7
  %475 = getelementptr inbounds i8, ptr %474, i64 1
  br label %481

476:                                              ; preds = %460
  %477 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %478 = getelementptr inbounds %struct.s2n_debug_info, ptr %477, i32 0, i32 0
  %479 = load ptr, ptr %478, align 8, !tbaa !9
  %480 = getelementptr inbounds i8, ptr %479, i64 21
  br label %481

481:                                              ; preds = %476, %469
  %482 = phi ptr [ %475, %469 ], [ %480, %476 ]
  %483 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %484 = getelementptr inbounds %struct.s2n_debug_info, ptr %483, i32 0, i32 1
  store ptr %482, ptr %484, align 8, !tbaa !11
  %485 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544321, ptr %485, align 4, !tbaa !12
  %486 = call i32 @s2n_calculate_stacktrace()
  br label %487

487:                                              ; preds = %481
  br label %488

488:                                              ; preds = %487
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %557

489:                                              ; No predecessors!
  br label %490

490:                                              ; preds = %489
  br label %491

491:                                              ; preds = %490, %445
  br label %492

492:                                              ; preds = %491
  br label %493

493:                                              ; preds = %492
  br label %494

494:                                              ; preds = %493
  %495 = load i64, ptr %16, align 8, !tbaa !18
  %496 = load i32, ptr %11, align 4, !tbaa !12
  %497 = zext i32 %496 to i64
  %498 = icmp eq i64 %495, %497
  br i1 %498, label %532, label %499

499:                                              ; preds = %494
  br label %500

500:                                              ; preds = %499
  br label %501

501:                                              ; preds = %500
  %502 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %503 = getelementptr inbounds %struct.s2n_debug_info, ptr %502, i32 0, i32 0
  store ptr @.str.38, ptr %503, align 8, !tbaa !9
  %504 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %505 = getelementptr inbounds %struct.s2n_debug_info, ptr %504, i32 0, i32 0
  %506 = load ptr, ptr %505, align 8, !tbaa !9
  %507 = getelementptr inbounds i8, ptr %506, i64 21
  %508 = call ptr @strrchr(ptr noundef %507, i32 noundef 47) #7
  %509 = icmp ne ptr %508, null
  br i1 %509, label %510, label %517

510:                                              ; preds = %501
  %511 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %512 = getelementptr inbounds %struct.s2n_debug_info, ptr %511, i32 0, i32 0
  %513 = load ptr, ptr %512, align 8, !tbaa !9
  %514 = getelementptr inbounds i8, ptr %513, i64 21
  %515 = call ptr @strrchr(ptr noundef %514, i32 noundef 47) #7
  %516 = getelementptr inbounds i8, ptr %515, i64 1
  br label %522

517:                                              ; preds = %501
  %518 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %519 = getelementptr inbounds %struct.s2n_debug_info, ptr %518, i32 0, i32 0
  %520 = load ptr, ptr %519, align 8, !tbaa !9
  %521 = getelementptr inbounds i8, ptr %520, i64 21
  br label %522

522:                                              ; preds = %517, %510
  %523 = phi ptr [ %516, %510 ], [ %521, %517 ]
  %524 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %525 = getelementptr inbounds %struct.s2n_debug_info, ptr %524, i32 0, i32 1
  store ptr %523, ptr %525, align 8, !tbaa !11
  %526 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653220, ptr %526, align 4, !tbaa !12
  %527 = call i32 @s2n_calculate_stacktrace()
  br label %528

528:                                              ; preds = %522
  br label %529

529:                                              ; preds = %528
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %557

530:                                              ; No predecessors!
  br label %531

531:                                              ; preds = %530
  br label %532

532:                                              ; preds = %531, %494
  br label %533

533:                                              ; preds = %532
  br label %534

534:                                              ; preds = %533
  br label %535

535:                                              ; preds = %534
  %536 = load ptr, ptr %7, align 8, !tbaa !5
  %537 = call i32 @s2n_get_public_random_data(ptr noundef %536)
  %538 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  store i32 %537, ptr %538, align 4
  %539 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  %540 = load i32, ptr %539, align 4
  %541 = call zeroext i1 @s2n_result_is_ok(i32 %540)
  br i1 %541, label %543, label %542

542:                                              ; preds = %535
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %557

543:                                              ; preds = %535
  br label %544

544:                                              ; preds = %543
  br label %545

545:                                              ; preds = %544
  %546 = load ptr, ptr %7, align 8, !tbaa !5
  %547 = getelementptr inbounds %struct.s2n_blob, ptr %546, i32 0, i32 0
  %548 = load ptr, ptr %547, align 8, !tbaa !20
  %549 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 0
  %550 = load ptr, ptr %549, align 8, !tbaa !20
  %551 = load i64, ptr %16, align 8, !tbaa !18
  %552 = trunc i64 %551 to i32
  %553 = load ptr, ptr %7, align 8, !tbaa !5
  %554 = getelementptr inbounds %struct.s2n_blob, ptr %553, i32 0, i32 1
  %555 = load i32, ptr %554, align 8, !tbaa !16
  %556 = call i32 @s2n_constant_time_pkcs1_unpad_or_dont(ptr noundef %548, ptr noundef %550, i32 noundef %552, i32 noundef %555)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %557

557:                                              ; preds = %545, %542, %529, %488
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %558

558:                                              ; preds = %557, %436, %396, %356
  call void @EVP_PKEY_CTX_free_pointer(ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %559

559:                                              ; preds = %558, %313, %272, %231
  call void @llvm.lifetime.end.p0(i64 4096, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  br label %560

560:                                              ; preds = %559, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %561

561:                                              ; preds = %560, %210, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %562

562:                                              ; preds = %561, %160, %122, %86, %50
  %563 = load i32, ptr %4, align 4
  ret i32 %563
}

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

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

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

declare i32 @EVP_PKEY_decrypt_init(ptr noundef) #2

declare i32 @EVP_PKEY_decrypt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @s2n_get_public_random_data(ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!17, !13, i64 8}
!17 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!17, !6, i64 0}


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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.27 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @EVP_PKEY_CTX_free_pointer(ptr noundef) local_unnamed_addr #4

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

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

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

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

declare ptr @EVP_PKEY_CTX_new(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_pkey_evp_decrypt(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2) local_unnamed_addr #5 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.s2n_blob, align 8
  %7 = alloca [4096 x i8], align 16
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %10, label %18

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

18:                                               ; preds = %3
  %.not33 = icmp eq ptr %1, null
  br i1 %.not33, label %19, label %27

19:                                               ; preds = %18
  %20 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.28, ptr %20, align 8, !tbaa !5
  %21 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.28, i64 21), i32 noundef 47) #7
  %.not34 = icmp eq ptr %21, null
  %22 = getelementptr inbounds i8, ptr %21, i64 1
  %23 = select i1 %.not34, ptr getelementptr inbounds (i8, ptr @.str.28, 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 402653193, ptr %25, align 4, !tbaa !11
  %26 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %168

27:                                               ; preds = %18
  %.not35 = icmp eq ptr %2, null
  br i1 %.not35, label %28, label %36

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

36:                                               ; preds = %27
  %37 = load ptr, ptr %0, align 8, !tbaa !13
  %.not37 = icmp eq ptr %37, null
  br i1 %.not37, label %38, label %46

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

46:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !11
  %47 = call i32 @s2n_pkey_get_type(ptr noundef nonnull %37, ptr noundef nonnull %4) #8
  %48 = call zeroext i1 @s2n_result_is_ok(i32 %47)
  br i1 %48, label %49, label %167

49:                                               ; preds = %46
  %50 = load i32, ptr %4, align 4, !tbaa !11
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %60, label %52

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

60:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !11
  %61 = call i32 @s2n_pkey_size(ptr noundef nonnull %0, ptr noundef nonnull %5) #8
  %62 = call zeroext i1 @s2n_result_is_ok(i32 %61)
  br i1 %62, label %63, label %166

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %7, i8 0, i64 4096, i1 false)
  %64 = call i32 @s2n_blob_init(ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef 4096) #8
  %65 = icmp sgt i32 %64, -1
  br i1 %65, label %66, label %165

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %2, i64 8
  %68 = load i32, ptr %67, align 8, !tbaa !15
  %69 = getelementptr inbounds i8, ptr %6, i64 8
  %70 = load i32, ptr %69, align 8, !tbaa !15
  %.not40 = icmp ugt i32 %68, %70
  br i1 %.not40, label %71, label %79

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

79:                                               ; preds = %66
  %80 = load i32, ptr %5, align 4, !tbaa !11
  %.not42 = icmp ugt i32 %80, %70
  br i1 %.not42, label %81, label %89

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

89:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %90 = load ptr, ptr %0, align 8, !tbaa !13
  %91 = call ptr @EVP_PKEY_CTX_new(ptr noundef %90, ptr noundef null) #8
  store ptr %91, ptr %8, align 8, !tbaa !17
  %.not44 = icmp eq ptr %91, null
  br i1 %.not44, label %92, label %100

92:                                               ; preds = %89
  %93 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.34, ptr %93, align 8, !tbaa !5
  %94 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.34, i64 21), i32 noundef 47) #7
  %.not45 = icmp eq ptr %94, null
  %95 = getelementptr inbounds i8, ptr %94, i64 1
  %96 = select i1 %.not45, ptr getelementptr inbounds (i8, ptr @.str.34, i64 21), ptr %95
  %97 = getelementptr inbounds i8, ptr %93, i64 8
  store ptr %96, ptr %97, align 8, !tbaa !10
  %98 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %98, align 4, !tbaa !11
  %99 = call i32 @s2n_calculate_stacktrace() #8
  br label %164

100:                                              ; preds = %89
  %101 = call i32 @EVP_PKEY_decrypt_init(ptr noundef nonnull %91) #8
  %102 = icmp eq i32 %101, 1
  br i1 %102, label %111, label %103

103:                                              ; preds = %100
  %104 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.35, ptr %104, align 8, !tbaa !5
  %105 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.35, i64 21), i32 noundef 47) #7
  %.not46 = icmp eq ptr %105, null
  %106 = getelementptr inbounds i8, ptr %105, i64 1
  %107 = select i1 %.not46, ptr getelementptr inbounds (i8, ptr @.str.35, i64 21), ptr %106
  %108 = getelementptr inbounds i8, ptr %104, i64 8
  store ptr %107, ptr %108, align 8, !tbaa !10
  %109 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653263, ptr %109, align 4, !tbaa !11
  %110 = call i32 @s2n_calculate_stacktrace() #8
  br label %164

111:                                              ; preds = %100
  %112 = call i32 @EVP_PKEY_CTX_set_rsa_padding(ptr noundef nonnull %91, i32 noundef 3) #8
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %122, label %114

114:                                              ; preds = %111
  %115 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.36, ptr %115, align 8, !tbaa !5
  %116 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.36, i64 21), i32 noundef 47) #7
  %.not47 = icmp eq ptr %116, null
  %117 = getelementptr inbounds i8, ptr %116, i64 1
  %118 = select i1 %.not47, ptr getelementptr inbounds (i8, ptr @.str.36, i64 21), ptr %117
  %119 = getelementptr inbounds i8, ptr %115, i64 8
  store ptr %118, ptr %119, align 8, !tbaa !10
  %120 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653263, ptr %120, align 4, !tbaa !11
  %121 = call i32 @s2n_calculate_stacktrace() #8
  br label %164

122:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %123 = load i32, ptr %69, align 8, !tbaa !15
  %124 = zext i32 %123 to i64
  store i64 %124, ptr %9, align 8, !tbaa !18
  %125 = load ptr, ptr %6, align 8, !tbaa !20
  %126 = load ptr, ptr %1, align 8, !tbaa !20
  %127 = getelementptr inbounds i8, ptr %1, i64 8
  %128 = load i32, ptr %127, align 8, !tbaa !15
  %129 = zext i32 %128 to i64
  %130 = call i32 @EVP_PKEY_decrypt(ptr noundef nonnull %91, ptr noundef %125, ptr noundef nonnull %9, ptr noundef %126, i64 noundef %129) #8
  %131 = icmp eq i32 %130, 1
  br i1 %131, label %140, label %132

132:                                              ; preds = %122
  %133 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.37, ptr %133, align 8, !tbaa !5
  %134 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.37, i64 21), i32 noundef 47) #7
  %.not48 = icmp eq ptr %134, null
  %135 = getelementptr inbounds i8, ptr %134, i64 1
  %136 = select i1 %.not48, ptr getelementptr inbounds (i8, ptr @.str.37, i64 21), ptr %135
  %137 = getelementptr inbounds i8, ptr %133, i64 8
  store ptr %136, ptr %137, align 8, !tbaa !10
  %138 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544321, ptr %138, align 4, !tbaa !11
  %139 = call i32 @s2n_calculate_stacktrace() #8
  br label %163

140:                                              ; preds = %122
  %141 = load i64, ptr %9, align 8, !tbaa !18
  %142 = load i32, ptr %5, align 4, !tbaa !11
  %143 = zext i32 %142 to i64
  %144 = icmp eq i64 %141, %143
  br i1 %144, label %153, label %145

145:                                              ; preds = %140
  %146 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.38, ptr %146, align 8, !tbaa !5
  %147 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.38, i64 21), i32 noundef 47) #7
  %.not49 = icmp eq ptr %147, null
  %148 = getelementptr inbounds i8, ptr %147, i64 1
  %149 = select i1 %.not49, ptr getelementptr inbounds (i8, ptr @.str.38, i64 21), ptr %148
  %150 = getelementptr inbounds i8, ptr %146, i64 8
  store ptr %149, ptr %150, align 8, !tbaa !10
  %151 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653220, ptr %151, align 4, !tbaa !11
  %152 = call i32 @s2n_calculate_stacktrace() #8
  br label %163

153:                                              ; preds = %140
  %154 = call i32 @s2n_get_public_random_data(ptr noundef nonnull %2) #8
  %155 = call zeroext i1 @s2n_result_is_ok(i32 %154)
  br i1 %155, label %156, label %163

156:                                              ; preds = %153
  %157 = load ptr, ptr %2, align 8, !tbaa !20
  %158 = load ptr, ptr %6, align 8, !tbaa !20
  %159 = load i64, ptr %9, align 8, !tbaa !18
  %160 = trunc i64 %159 to i32
  %161 = load i32, ptr %67, align 8, !tbaa !15
  %162 = call i32 @s2n_constant_time_pkcs1_unpad_or_dont(ptr noundef %157, ptr noundef %158, i32 noundef %160, i32 noundef %161) #8
  br label %163

163:                                              ; preds = %153, %156, %145, %132
  %.0 = phi i32 [ 0, %156 ], [ -1, %145 ], [ -1, %132 ], [ -1, %153 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %164

164:                                              ; preds = %163, %114, %103, %92
  %.1 = phi i32 [ %.0, %163 ], [ -1, %114 ], [ -1, %103 ], [ -1, %92 ]
  call void @EVP_PKEY_CTX_free_pointer(ptr noundef nonnull %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %165

165:                                              ; preds = %63, %164, %81, %71
  %.2 = phi i32 [ %.1, %164 ], [ -1, %81 ], [ -1, %71 ], [ -1, %63 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %166

166:                                              ; preds = %60, %165
  %.3 = phi i32 [ %.2, %165 ], [ -1, %60 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %167

167:                                              ; preds = %46, %166, %52
  %.4 = phi i32 [ %.3, %166 ], [ -1, %52 ], [ -1, %46 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %168

168:                                              ; preds = %167, %38, %28, %19, %10
  %.5 = phi i32 [ %.4, %167 ], [ -1, %38 ], [ -1, %28 ], [ -1, %19 ], [ -1, %10 ]
  ret i32 %.5
}

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

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

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

declare i32 @EVP_PKEY_decrypt_init(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_PKEY_decrypt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @s2n_get_public_random_data(ptr noundef) local_unnamed_addr #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!15 = !{!16, !12, i64 8}
!16 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!16, !7, i64 0}


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