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

; 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_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_cert_chain_and_key = type { ptr, ptr, %struct.s2n_blob, %struct.s2n_blob, ptr, ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_cert_chain = type { i32, ptr }
%struct.s2n_cert = type { i32, %struct.s2n_pkey, %struct.s2n_cert_info, %struct.s2n_blob, ptr }
%struct.s2n_cert_info = type { i32, i32, i32, i32, i8 }

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

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

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_cert_chain_and_key_load(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.s2n_result, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.s2n_result, align 4
  %9 = alloca %struct.s2n_pkey, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.s2n_result, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.s2n_result, align 4
  %15 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %1
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %50, label %19

19:                                               ; preds = %16
  br label %20

20:                                               ; preds = %19
  br label %21

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

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

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

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

48:                                               ; preds = %42
  store i32 -1, ptr %2, align 4
  br label %326

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %16
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = icmp ne ptr %55, null
  br i1 %56, label %88, label %57

57:                                               ; preds = %52
  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.20, 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 %2, align 4
  br label %326

87:                                               ; No predecessors!
  br label %88

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

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !14
  %94 = getelementptr inbounds %struct.s2n_cert_chain, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = icmp ne ptr %95, null
  br i1 %96, label %128, label %97

97:                                               ; preds = %90
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %101 = getelementptr inbounds %struct.s2n_debug_info, ptr %100, i32 0, i32 0
  store ptr @.str.21, ptr %101, align 8, !tbaa !9
  %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) #7
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %115

108:                                              ; preds = %99
  %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
  %113 = call ptr @strrchr(ptr noundef %112, i32 noundef 47) #7
  %114 = getelementptr inbounds i8, ptr %113, i64 1
  br label %120

115:                                              ; preds = %99
  %116 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %117 = getelementptr inbounds %struct.s2n_debug_info, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = getelementptr inbounds i8, ptr %118, i64 21
  br label %120

120:                                              ; preds = %115, %108
  %121 = phi ptr [ %114, %108 ], [ %119, %115 ]
  %122 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %123 = getelementptr inbounds %struct.s2n_debug_info, ptr %122, i32 0, i32 1
  store ptr %121, ptr %123, align 8, !tbaa !11
  %124 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %124, align 4, !tbaa !12
  %125 = call i32 @s2n_calculate_stacktrace()
  br label %126

126:                                              ; preds = %120
  store i32 -1, ptr %2, align 4
  br label %326

127:                                              ; No predecessors!
  br label %128

128:                                              ; preds = %127, %90
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = icmp ne ptr %133, null
  br i1 %134, label %166, label %135

135:                                              ; preds = %130
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  %138 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %139 = getelementptr inbounds %struct.s2n_debug_info, ptr %138, i32 0, i32 0
  store ptr @.str.22, ptr %139, align 8, !tbaa !9
  %140 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %141 = getelementptr inbounds %struct.s2n_debug_info, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = getelementptr inbounds i8, ptr %142, i64 21
  %144 = call ptr @strrchr(ptr noundef %143, i32 noundef 47) #7
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %153

146:                                              ; preds = %137
  %147 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %148 = getelementptr inbounds %struct.s2n_debug_info, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !9
  %150 = getelementptr inbounds i8, ptr %149, i64 21
  %151 = call ptr @strrchr(ptr noundef %150, i32 noundef 47) #7
  %152 = getelementptr inbounds i8, ptr %151, i64 1
  br label %158

153:                                              ; preds = %137
  %154 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %155 = getelementptr inbounds %struct.s2n_debug_info, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds i8, ptr %156, i64 21
  br label %158

158:                                              ; preds = %153, %146
  %159 = phi ptr [ %152, %146 ], [ %157, %153 ]
  %160 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %161 = getelementptr inbounds %struct.s2n_debug_info, ptr %160, i32 0, i32 1
  store ptr %159, ptr %161, align 8, !tbaa !11
  %162 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %162, align 4, !tbaa !12
  %163 = call i32 @s2n_calculate_stacktrace()
  br label %164

164:                                              ; preds = %158
  store i32 -1, ptr %2, align 4
  br label %326

165:                                              ; No predecessors!
  br label %166

166:                                              ; preds = %165, %130
  br label %167

167:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !14
  %171 = getelementptr inbounds %struct.s2n_cert_chain, ptr %170, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !17
  store ptr %172, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %167
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.s2n_cert, ptr %174, i32 0, i32 3
  %176 = call i32 @s2n_openssl_x509_parse(ptr noundef %175, ptr noundef %5)
  %177 = getelementptr inbounds %struct.s2n_result, ptr %6, i32 0, i32 0
  store i32 %176, ptr %177, align 4
  %178 = getelementptr inbounds %struct.s2n_result, ptr %6, i32 0, i32 0
  %179 = load i32, ptr %178, align 4
  %180 = call zeroext i1 @s2n_result_is_ok(i32 %179)
  br i1 %180, label %182, label %181

181:                                              ; preds = %173
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %325

182:                                              ; preds = %173
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.s2n_cert, ptr %187, i32 0, i32 2
  %189 = call i32 @s2n_openssl_x509_get_cert_info(ptr noundef %186, ptr noundef %188)
  %190 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 %189, ptr %190, align 4
  %191 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  %192 = load i32, ptr %191, align 4
  %193 = call zeroext i1 @s2n_result_is_ok(i32 %192)
  br i1 %193, label %195, label %194

194:                                              ; preds = %185
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %325

195:                                              ; preds = %185
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #8
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !12
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = call i32 @s2n_pkey_from_x509(ptr noundef %199, ptr noundef %9, ptr noundef %10)
  %201 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %200, ptr %201, align 4
  %202 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %203 = load i32, ptr %202, align 4
  %204 = call zeroext i1 @s2n_result_is_ok(i32 %203)
  br i1 %204, label %206, label %205

205:                                              ; preds = %198
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %323

206:                                              ; preds = %198
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %10, align 4, !tbaa !12
  %211 = icmp ne i32 %210, -1
  br i1 %211, label %245, label %212

212:                                              ; preds = %209
  br label %213

213:                                              ; preds = %212
  br label %214

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

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

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

235:                                              ; preds = %230, %223
  %236 = phi ptr [ %229, %223 ], [ %234, %230 ]
  %237 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %238 = getelementptr inbounds %struct.s2n_debug_info, ptr %237, i32 0, i32 1
  store ptr %236, ptr %238, align 8, !tbaa !11
  %239 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544370, ptr %239, align 4, !tbaa !12
  %240 = call i32 @s2n_calculate_stacktrace()
  br label %241

241:                                              ; preds = %235
  br label %242

242:                                              ; preds = %241
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %323

243:                                              ; No predecessors!
  br label %244

244:                                              ; preds = %243
  br label %245

245:                                              ; preds = %244, %209
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246
  br label %248

248:                                              ; preds = %247
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = load i32, ptr %10, align 4, !tbaa !12
  %251 = call i32 @s2n_cert_set_cert_type(ptr noundef %249, i32 noundef %250)
  %252 = icmp sgt i32 %251, -1
  br i1 %252, label %254, label %253

253:                                              ; preds = %248
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %323

254:                                              ; preds = %248
  br label %255

255:                                              ; preds = %254
  br label %256

256:                                              ; preds = %255
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %257, i32 0, i32 1
  %259 = load ptr, ptr %258, align 8, !tbaa !19
  %260 = call i32 @s2n_pkey_check_key_exists(ptr noundef %259)
  %261 = icmp eq i32 %260, 0
  br i1 %261, label %262, label %273

262:                                              ; preds = %256
  br label %263

263:                                              ; preds = %262
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.s2n_cert_chain_and_key, ptr %264, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !19
  %267 = call i32 @s2n_pkey_match(ptr noundef %9, ptr noundef %266)
  %268 = icmp sgt i32 %267, -1
  br i1 %268, label %270, label %269

269:                                              ; preds = %263
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %323

270:                                              ; preds = %263
  br label %271

271:                                              ; preds = %270
  br label %272

272:                                              ; preds = %271
  br label %273

273:                                              ; preds = %272, %256
  br label %274

274:                                              ; preds = %273
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = call i32 @s2n_cert_chain_and_key_set_names(ptr noundef %275, ptr noundef %276)
  %278 = icmp sgt i32 %277, -1
  br i1 %278, label %280, label %279

279:                                              ; preds = %274
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %323

280:                                              ; preds = %274
  br label %281

281:                                              ; preds = %280
  br label %282

282:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.s2n_cert, ptr %283, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !20
  store ptr %285, ptr %12, align 8, !tbaa !5
  br label %286

286:                                              ; preds = %320, %282
  %287 = load ptr, ptr %12, align 8, !tbaa !5
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %321

289:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %290

290:                                              ; preds = %289
  %291 = load ptr, ptr %12, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.s2n_cert, ptr %291, i32 0, i32 3
  %293 = call i32 @s2n_openssl_x509_parse(ptr noundef %292, ptr noundef %13)
  %294 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %293, ptr %294, align 4
  %295 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %296 = load i32, ptr %295, align 4
  %297 = call zeroext i1 @s2n_result_is_ok(i32 %296)
  br i1 %297, label %299, label %298

298:                                              ; preds = %290
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %318

299:                                              ; preds = %290
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr %13, align 8, !tbaa !5
  %304 = load ptr, ptr %12, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.s2n_cert, ptr %304, i32 0, i32 2
  %306 = call i32 @s2n_openssl_x509_get_cert_info(ptr noundef %303, ptr noundef %305)
  %307 = getelementptr inbounds %struct.s2n_result, ptr %15, i32 0, i32 0
  store i32 %306, ptr %307, align 4
  %308 = getelementptr inbounds %struct.s2n_result, ptr %15, i32 0, i32 0
  %309 = load i32, ptr %308, align 4
  %310 = call zeroext i1 @s2n_result_is_ok(i32 %309)
  br i1 %310, label %312, label %311

311:                                              ; preds = %302
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %318

312:                                              ; preds = %302
  br label %313

313:                                              ; preds = %312
  br label %314

314:                                              ; preds = %313
  %315 = load ptr, ptr %12, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.s2n_cert, ptr %315, i32 0, i32 4
  %317 = load ptr, ptr %316, align 8, !tbaa !20
  store ptr %317, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %7, align 4
  br label %318

318:                                              ; preds = %314, %311, %298
  call void @X509_free_pointer(ptr noundef %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %319 = load i32, ptr %7, align 4
  switch i32 %319, label %322 [
    i32 0, label %320
  ]

320:                                              ; preds = %318
  br label %286, !llvm.loop !25

321:                                              ; preds = %286
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %322

322:                                              ; preds = %321, %318
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %323

323:                                              ; preds = %322, %279, %269, %253, %242, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  %324 = call i32 @s2n_pkey_free(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  br label %325

325:                                              ; preds = %323, %194, %181
  call void @X509_free_pointer(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %326

326:                                              ; preds = %325, %164, %126, %86, %48
  %327 = load i32, ptr %2, align 4
  ret i32 %327
}

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

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

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

declare i32 @s2n_pkey_free(ptr noundef) #3

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

declare i32 @s2n_pkey_check_key_exists(ptr noundef) #3

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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_cert_chain_and_key", !6, i64 0, !6, i64 8, !16, i64 16, !16, i64 40, !6, i64 64, !6, i64 72, !6, i64 80}
!16 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!17 = !{!18, !6, i64 8}
!18 = !{!"s2n_cert_chain", !13, i64 0, !6, i64 8}
!19 = !{!15, !6, i64 8}
!20 = !{!21, !6, i64 104}
!21 = !{!"s2n_cert", !13, i64 0, !22, i64 8, !23, i64 56, !16, i64 80, !6, i64 104}
!22 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!23 = !{!"s2n_cert_info", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !24, i64 16}
!24 = !{!"_Bool", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; 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_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }

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

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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

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

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

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

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

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

14:                                               ; preds = %1
  %15 = load ptr, ptr %0, align 8, !tbaa !13
  %.not34 = icmp eq ptr %15, null
  br i1 %.not34, label %16, label %24

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

24:                                               ; preds = %14
  %25 = getelementptr inbounds i8, ptr %15, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %.not36 = icmp eq ptr %26, null
  br i1 %.not36, label %27, label %35

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

35:                                               ; preds = %24
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %.not38 = icmp eq ptr %37, null
  br i1 %.not38, label %38, label %46

38:                                               ; preds = %35
  %39 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.22, ptr %39, align 8, !tbaa !5
  %40 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.22, i64 21), i32 noundef 47) #7
  %.not39 = icmp eq ptr %40, null
  %41 = getelementptr inbounds i8, ptr %40, i64 1
  %42 = select i1 %.not39, ptr getelementptr inbounds (i8, ptr @.str.22, 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 %100

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store ptr null, ptr %2, align 8, !tbaa !19
  %47 = getelementptr inbounds i8, ptr %26, i64 80
  %48 = call i32 @s2n_openssl_x509_parse(ptr noundef nonnull %47, ptr noundef nonnull %2) #8
  %49 = call zeroext i1 @s2n_result_is_ok(i32 %48)
  br i1 %49, label %50, label %99

50:                                               ; preds = %46
  %51 = load ptr, ptr %2, align 8, !tbaa !19
  %52 = getelementptr inbounds i8, ptr %26, i64 56
  %53 = call i32 @s2n_openssl_x509_get_cert_info(ptr noundef %51, ptr noundef nonnull %52) #8
  %54 = call zeroext i1 @s2n_result_is_ok(i32 %53)
  br i1 %54, label %55, label %99

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %3, i8 0, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 -1, ptr %4, align 4, !tbaa !11
  %56 = load ptr, ptr %2, align 8, !tbaa !19
  %57 = call i32 @s2n_pkey_from_x509(ptr noundef %56, ptr noundef nonnull %3, ptr noundef nonnull %4) #8
  %58 = call zeroext i1 @s2n_result_is_ok(i32 %57)
  br i1 %58, label %59, label %.loopexit

59:                                               ; preds = %55
  %60 = load i32, ptr %4, align 4, !tbaa !11
  %.not40 = icmp eq i32 %60, -1
  br i1 %.not40, label %61, label %69

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

69:                                               ; preds = %59
  %70 = call i32 @s2n_cert_set_cert_type(ptr noundef nonnull %26, i32 noundef %60)
  %71 = icmp sgt i32 %70, -1
  br i1 %71, label %72, label %.loopexit

72:                                               ; preds = %69
  %73 = load ptr, ptr %36, align 8, !tbaa !18
  %74 = call i32 @s2n_pkey_check_key_exists(ptr noundef %73) #8
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %80

76:                                               ; preds = %72
  %77 = load ptr, ptr %36, align 8, !tbaa !18
  %78 = call i32 @s2n_pkey_match(ptr noundef nonnull %3, ptr noundef %77) #8
  %79 = icmp sgt i32 %78, -1
  br i1 %79, label %80, label %.loopexit

80:                                               ; preds = %72, %76
  %81 = load ptr, ptr %2, align 8, !tbaa !19
  %82 = call i32 @s2n_cert_chain_and_key_set_names(ptr noundef nonnull %0, ptr noundef %81)
  %83 = icmp sgt i32 %82, -1
  br i1 %83, label %84, label %.loopexit

84:                                               ; preds = %80
  %85 = getelementptr inbounds i8, ptr %26, i64 104
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  %.not4245 = icmp eq ptr %86, null
  br i1 %.not4245, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %84, %95
  %.02246 = phi ptr [ %97, %95 ], [ %86, %84 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store ptr null, ptr %5, align 8, !tbaa !19
  %87 = getelementptr inbounds i8, ptr %.02246, i64 80
  %88 = call i32 @s2n_openssl_x509_parse(ptr noundef nonnull %87, ptr noundef nonnull %5) #8
  %89 = call zeroext i1 @s2n_result_is_ok(i32 %88)
  br i1 %89, label %90, label %.thread

90:                                               ; preds = %.lr.ph
  %91 = load ptr, ptr %5, align 8, !tbaa !19
  %92 = getelementptr inbounds i8, ptr %.02246, i64 56
  %93 = call i32 @s2n_openssl_x509_get_cert_info(ptr noundef %91, ptr noundef nonnull %92) #8
  %94 = call zeroext i1 @s2n_result_is_ok(i32 %93)
  br i1 %94, label %95, label %.thread

.thread:                                          ; preds = %.lr.ph, %90
  call void @X509_free_pointer(ptr noundef nonnull %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %.loopexit

95:                                               ; preds = %90
  %96 = getelementptr inbounds i8, ptr %.02246, i64 104
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  call void @X509_free_pointer(ptr noundef nonnull %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %.not42 = icmp eq ptr %97, null
  br i1 %.not42, label %.loopexit, label %.lr.ph, !llvm.loop !25

.loopexit:                                        ; preds = %95, %84, %.thread, %80, %76, %69, %55, %61
  %.3 = phi i32 [ -1, %61 ], [ -1, %55 ], [ -1, %69 ], [ -1, %76 ], [ -1, %80 ], [ -1, %.thread ], [ 0, %84 ], [ 0, %95 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %98 = call i32 @s2n_pkey_free(ptr noundef nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  br label %99

99:                                               ; preds = %50, %46, %.loopexit
  %.4 = phi i32 [ %.3, %.loopexit ], [ -1, %46 ], [ -1, %50 ]
  call void @X509_free_pointer(ptr noundef nonnull %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %100

100:                                              ; preds = %99, %38, %27, %16, %6
  %.5 = phi i32 [ %.4, %99 ], [ -1, %38 ], [ -1, %27 ], [ -1, %16 ], [ -1, %6 ]
  ret i32 %.5
}

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

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

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

declare i32 @s2n_pkey_free(ptr noundef) local_unnamed_addr #3

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

declare i32 @s2n_pkey_check_key_exists(ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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_cert_chain_and_key", !7, i64 0, !7, i64 8, !15, i64 16, !15, i64 40, !7, i64 64, !7, i64 72, !7, i64 80}
!15 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!16 = !{!17, !7, i64 8}
!17 = !{!"s2n_cert_chain", !12, i64 0, !7, i64 8}
!18 = !{!14, !7, i64 8}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !7, i64 104}
!21 = !{!"s2n_cert", !12, i64 0, !22, i64 8, !23, i64 56, !15, i64 80, !7, i64 104}
!22 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!23 = !{!"s2n_cert_info", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !24, i64 16}
!24 = !{!"_Bool", !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass