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

; 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_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.12 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [96 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %48, label %16

16:                                               ; preds = %13
  br label %17

17:                                               ; preds = %16
  br label %18

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

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

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

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

45:                                               ; preds = %39
  %46 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %46, align 4, !tbaa !14
  br label %434

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %13
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %85, label %53

53:                                               ; preds = %50
  br label %54

54:                                               ; preds = %53
  br label %55

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

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

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

76:                                               ; preds = %71, %64
  %77 = phi ptr [ %70, %64 ], [ %75, %71 ]
  %78 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %79 = getelementptr inbounds %struct.s2n_debug_info, ptr %78, i32 0, i32 1
  store ptr %77, ptr %79, align 8, !tbaa !11
  %80 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %80, align 4, !tbaa !12
  %81 = call i32 @s2n_calculate_stacktrace()
  br label %82

82:                                               ; preds = %76
  %83 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %83, align 4, !tbaa !14
  br label %434

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %50
  br label %86

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call ptr @X509_get_issuer_name(ptr noundef %87)
  store ptr %88, ptr %6, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %86
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %126, label %92

92:                                               ; preds = %89
  br label %93

93:                                               ; preds = %92
  br label %94

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

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

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

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

121:                                              ; preds = %115
  br label %122

122:                                              ; preds = %121
  %123 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %123, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %433

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125, %89
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = call ptr @X509_get_subject_name(ptr noundef %129)
  store ptr %130, ptr %8, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %128
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %168, label %134

134:                                              ; preds = %131
  br label %135

135:                                              ; preds = %134
  br label %136

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

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

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

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

163:                                              ; preds = %157
  br label %164

164:                                              ; preds = %163
  %165 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %165, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %432

166:                                              ; No predecessors!
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167, %131
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = call i32 @X509_NAME_cmp(ptr noundef %171, ptr noundef %172)
  %174 = icmp eq i32 %173, 0
  br i1 %174, label %175, label %178

175:                                              ; preds = %170
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.s2n_cert_info, ptr %176, i32 0, i32 4
  store i8 1, ptr %177, align 4, !tbaa !16
  br label %181

178:                                              ; preds = %170
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.s2n_cert_info, ptr %179, i32 0, i32 4
  store i8 0, ptr %180, align 4, !tbaa !16
  br label %181

181:                                              ; preds = %178, %175
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = call i32 @X509_get_signature_nid(ptr noundef %182)
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.s2n_cert_info, ptr %184, i32 0, i32 0
  store i32 %183, ptr %185, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.s2n_cert_info, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !19
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s2n_cert_info, ptr %189, i32 0, i32 1
  %191 = call i32 @OBJ_find_sigid_algs(i32 noundef %188, ptr noundef %190, ptr noundef null)
  store i32 %191, ptr %9, align 4, !tbaa !12
  %192 = load i32, ptr %9, align 4, !tbaa !12
  %193 = icmp ne i32 %192, 1
  br i1 %193, label %194, label %197

194:                                              ; preds = %181
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.s2n_cert_info, ptr %195, i32 0, i32 1
  store i32 0, ptr %196, align 4, !tbaa !20
  br label %197

197:                                              ; preds = %194, %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = call ptr @X509_get_pubkey(ptr noundef %198)
  store ptr %199, ptr %10, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %197
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = icmp ne ptr %201, null
  br i1 %202, label %237, label %203

203:                                              ; preds = %200
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  %206 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %207 = getelementptr inbounds %struct.s2n_debug_info, ptr %206, i32 0, i32 0
  store ptr @.str.16, ptr %207, align 8, !tbaa !9
  %208 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %209 = getelementptr inbounds %struct.s2n_debug_info, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !9
  %211 = getelementptr inbounds i8, ptr %210, i64 21
  %212 = call ptr @strrchr(ptr noundef %211, i32 noundef 47) #6
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %221

214:                                              ; preds = %205
  %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
  %217 = load ptr, ptr %216, align 8, !tbaa !9
  %218 = getelementptr inbounds i8, ptr %217, i64 21
  %219 = call ptr @strrchr(ptr noundef %218, i32 noundef 47) #6
  %220 = getelementptr inbounds i8, ptr %219, i64 1
  br label %226

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

226:                                              ; preds = %221, %214
  %227 = phi ptr [ %220, %214 ], [ %225, %221 ]
  %228 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %229 = getelementptr inbounds %struct.s2n_debug_info, ptr %228, i32 0, i32 1
  store ptr %227, ptr %229, align 8, !tbaa !11
  %230 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544344, ptr %230, align 4, !tbaa !12
  %231 = call i32 @s2n_calculate_stacktrace()
  br label %232

232:                                              ; preds = %226
  br label %233

233:                                              ; preds = %232
  %234 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %234, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %431

235:                                              ; No predecessors!
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236, %200
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  %241 = call i32 @EVP_PKEY_get_bits(ptr noundef %240)
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.s2n_cert_info, ptr %242, i32 0, i32 3
  store i32 %241, ptr %243, align 4, !tbaa !21
  br label %244

244:                                              ; preds = %239
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.s2n_cert_info, ptr %245, i32 0, i32 3
  %247 = load i32, ptr %246, align 4, !tbaa !21
  %248 = icmp sgt i32 %247, 0
  br i1 %248, label %283, label %249

249:                                              ; preds = %244
  br label %250

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %250
  %252 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %253 = getelementptr inbounds %struct.s2n_debug_info, ptr %252, i32 0, i32 0
  store ptr @.str.17, ptr %253, align 8, !tbaa !9
  %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) #6
  %259 = icmp ne ptr %258, null
  br i1 %259, label %260, label %267

260:                                              ; preds = %251
  %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
  %265 = call ptr @strrchr(ptr noundef %264, i32 noundef 47) #6
  %266 = getelementptr inbounds i8, ptr %265, i64 1
  br label %272

267:                                              ; preds = %251
  %268 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %269 = getelementptr inbounds %struct.s2n_debug_info, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !9
  %271 = getelementptr inbounds i8, ptr %270, i64 21
  br label %272

272:                                              ; preds = %267, %260
  %273 = phi ptr [ %266, %260 ], [ %271, %267 ]
  %274 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %275 = getelementptr inbounds %struct.s2n_debug_info, ptr %274, i32 0, i32 1
  store ptr %273, ptr %275, align 8, !tbaa !11
  %276 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544370, ptr %276, align 4, !tbaa !12
  %277 = call i32 @s2n_calculate_stacktrace()
  br label %278

278:                                              ; preds = %272
  br label %279

279:                                              ; preds = %278
  %280 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %280, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %431

281:                                              ; No predecessors!
  br label %282

282:                                              ; preds = %281
  br label %283

283:                                              ; preds = %282, %244
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = call i32 @EVP_PKEY_get_base_id(ptr noundef %286)
  %288 = icmp eq i32 %287, 408
  br i1 %288, label %289, label %382

289:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %290 = load ptr, ptr %10, align 8, !tbaa !5
  %291 = call ptr @EVP_PKEY_get1_EC_KEY(ptr noundef %290)
  store ptr %291, ptr %11, align 8, !tbaa !5
  br label %292

292:                                              ; preds = %289
  %293 = load ptr, ptr %11, align 8, !tbaa !5
  %294 = icmp ne ptr %293, null
  br i1 %294, label %329, label %295

295:                                              ; preds = %292
  br label %296

296:                                              ; preds = %295
  br label %297

297:                                              ; preds = %296
  %298 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %299 = getelementptr inbounds %struct.s2n_debug_info, ptr %298, i32 0, i32 0
  store ptr @.str.18, ptr %299, align 8, !tbaa !9
  %300 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %301 = getelementptr inbounds %struct.s2n_debug_info, ptr %300, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8, !tbaa !9
  %303 = getelementptr inbounds i8, ptr %302, i64 21
  %304 = call ptr @strrchr(ptr noundef %303, i32 noundef 47) #6
  %305 = icmp ne ptr %304, null
  br i1 %305, label %306, label %313

306:                                              ; preds = %297
  %307 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %308 = getelementptr inbounds %struct.s2n_debug_info, ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !9
  %310 = getelementptr inbounds i8, ptr %309, i64 21
  %311 = call ptr @strrchr(ptr noundef %310, i32 noundef 47) #6
  %312 = getelementptr inbounds i8, ptr %311, i64 1
  br label %318

313:                                              ; preds = %297
  %314 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %315 = getelementptr inbounds %struct.s2n_debug_info, ptr %314, i32 0, i32 0
  %316 = load ptr, ptr %315, align 8, !tbaa !9
  %317 = getelementptr inbounds i8, ptr %316, i64 21
  br label %318

318:                                              ; preds = %313, %306
  %319 = phi ptr [ %312, %306 ], [ %317, %313 ]
  %320 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %321 = getelementptr inbounds %struct.s2n_debug_info, ptr %320, i32 0, i32 1
  store ptr %319, ptr %321, align 8, !tbaa !11
  %322 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %322, align 4, !tbaa !12
  %323 = call i32 @s2n_calculate_stacktrace()
  br label %324

324:                                              ; preds = %318
  br label %325

325:                                              ; preds = %324
  %326 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %326, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %379

327:                                              ; No predecessors!
  br label %328

328:                                              ; preds = %327
  br label %329

329:                                              ; preds = %328, %292
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %332 = load ptr, ptr %11, align 8, !tbaa !5
  %333 = call ptr @EC_KEY_get0_group(ptr noundef %332)
  store ptr %333, ptr %12, align 8, !tbaa !5
  br label %334

334:                                              ; preds = %331
  %335 = load ptr, ptr %12, align 8, !tbaa !5
  %336 = icmp ne ptr %335, null
  br i1 %336, label %371, label %337

337:                                              ; preds = %334
  br label %338

338:                                              ; preds = %337
  br label %339

339:                                              ; preds = %338
  %340 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %341 = getelementptr inbounds %struct.s2n_debug_info, ptr %340, i32 0, i32 0
  store ptr @.str.19, ptr %341, align 8, !tbaa !9
  %342 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %343 = getelementptr inbounds %struct.s2n_debug_info, ptr %342, i32 0, i32 0
  %344 = load ptr, ptr %343, align 8, !tbaa !9
  %345 = getelementptr inbounds i8, ptr %344, i64 21
  %346 = call ptr @strrchr(ptr noundef %345, i32 noundef 47) #6
  %347 = icmp ne ptr %346, null
  br i1 %347, label %348, label %355

348:                                              ; preds = %339
  %349 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %350 = getelementptr inbounds %struct.s2n_debug_info, ptr %349, i32 0, i32 0
  %351 = load ptr, ptr %350, align 8, !tbaa !9
  %352 = getelementptr inbounds i8, ptr %351, i64 21
  %353 = call ptr @strrchr(ptr noundef %352, i32 noundef 47) #6
  %354 = getelementptr inbounds i8, ptr %353, i64 1
  br label %360

355:                                              ; preds = %339
  %356 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %357 = getelementptr inbounds %struct.s2n_debug_info, ptr %356, i32 0, i32 0
  %358 = load ptr, ptr %357, align 8, !tbaa !9
  %359 = getelementptr inbounds i8, ptr %358, i64 21
  br label %360

360:                                              ; preds = %355, %348
  %361 = phi ptr [ %354, %348 ], [ %359, %355 ]
  %362 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %363 = getelementptr inbounds %struct.s2n_debug_info, ptr %362, i32 0, i32 1
  store ptr %361, ptr %363, align 8, !tbaa !11
  %364 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %364, align 4, !tbaa !12
  %365 = call i32 @s2n_calculate_stacktrace()
  br label %366

366:                                              ; preds = %360
  br label %367

367:                                              ; preds = %366
  %368 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %368, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %378

369:                                              ; No predecessors!
  br label %370

370:                                              ; preds = %369
  br label %371

371:                                              ; preds = %370, %334
  br label %372

372:                                              ; preds = %371
  br label %373

373:                                              ; preds = %372
  %374 = load ptr, ptr %12, align 8, !tbaa !5
  %375 = call i32 @EC_GROUP_get_curve_name(ptr noundef %374)
  %376 = load ptr, ptr %5, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.s2n_cert_info, ptr %376, i32 0, i32 2
  store i32 %375, ptr %377, align 4, !tbaa !22
  store i32 0, ptr %7, align 4
  br label %378

378:                                              ; preds = %373, %367
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %379

379:                                              ; preds = %378, %325
  call void @EC_KEY_free_pointer(ptr noundef %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %380 = load i32, ptr %7, align 4
  switch i32 %380, label %431 [
    i32 0, label %381
  ]

381:                                              ; preds = %379
  br label %387

382:                                              ; preds = %285
  %383 = load ptr, ptr %10, align 8, !tbaa !5
  %384 = call i32 @EVP_PKEY_get_id(ptr noundef %383)
  %385 = load ptr, ptr %5, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.s2n_cert_info, ptr %385, i32 0, i32 2
  store i32 %384, ptr %386, align 4, !tbaa !22
  br label %387

387:                                              ; preds = %382, %381
  br label %388

388:                                              ; preds = %387
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.s2n_cert_info, ptr %389, i32 0, i32 2
  %391 = load i32, ptr %390, align 4, !tbaa !22
  %392 = icmp ne i32 %391, 0
  br i1 %392, label %427, label %393

393:                                              ; preds = %388
  br label %394

394:                                              ; preds = %393
  br label %395

395:                                              ; preds = %394
  %396 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %397 = getelementptr inbounds %struct.s2n_debug_info, ptr %396, i32 0, i32 0
  store ptr @.str.20, ptr %397, align 8, !tbaa !9
  %398 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %399 = getelementptr inbounds %struct.s2n_debug_info, ptr %398, i32 0, i32 0
  %400 = load ptr, ptr %399, align 8, !tbaa !9
  %401 = getelementptr inbounds i8, ptr %400, i64 21
  %402 = call ptr @strrchr(ptr noundef %401, i32 noundef 47) #6
  %403 = icmp ne ptr %402, null
  br i1 %403, label %404, label %411

404:                                              ; preds = %395
  %405 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %406 = getelementptr inbounds %struct.s2n_debug_info, ptr %405, i32 0, i32 0
  %407 = load ptr, ptr %406, align 8, !tbaa !9
  %408 = getelementptr inbounds i8, ptr %407, i64 21
  %409 = call ptr @strrchr(ptr noundef %408, i32 noundef 47) #6
  %410 = getelementptr inbounds i8, ptr %409, i64 1
  br label %416

411:                                              ; preds = %395
  %412 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %413 = getelementptr inbounds %struct.s2n_debug_info, ptr %412, i32 0, i32 0
  %414 = load ptr, ptr %413, align 8, !tbaa !9
  %415 = getelementptr inbounds i8, ptr %414, i64 21
  br label %416

416:                                              ; preds = %411, %404
  %417 = phi ptr [ %410, %404 ], [ %415, %411 ]
  %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 1
  store ptr %417, ptr %419, align 8, !tbaa !11
  %420 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544370, ptr %420, align 4, !tbaa !12
  %421 = call i32 @s2n_calculate_stacktrace()
  br label %422

422:                                              ; preds = %416
  br label %423

423:                                              ; preds = %422
  %424 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 -1, ptr %424, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %431

425:                                              ; No predecessors!
  br label %426

426:                                              ; preds = %425
  br label %427

427:                                              ; preds = %426, %388
  br label %428

428:                                              ; preds = %427
  br label %429

429:                                              ; preds = %428
  %430 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  store i32 0, ptr %430, align 4, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %431

431:                                              ; preds = %429, %423, %379, %279, %233
  call void @EVP_PKEY_free_pointer(ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %432

432:                                              ; preds = %431, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %433

433:                                              ; preds = %432, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %434

434:                                              ; preds = %433, %82, %45
  %435 = getelementptr inbounds %struct.s2n_result, ptr %3, i32 0, i32 0
  %436 = load i32, ptr %435, align 4
  ret i32 %436
}

declare ptr @X509_get_issuer_name(ptr noundef) #2

declare ptr @X509_get_subject_name(ptr noundef) #2

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

declare i32 @X509_get_signature_nid(ptr noundef) #2

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

declare ptr @X509_get_pubkey(ptr noundef) #2

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

declare i32 @EVP_PKEY_get_bits(ptr noundef) #2

declare i32 @EVP_PKEY_get_base_id(ptr noundef) #2

declare ptr @EVP_PKEY_get1_EC_KEY(ptr noundef) #2

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

declare ptr @EC_KEY_get0_group(ptr noundef) #2

declare i32 @EC_GROUP_get_curve_name(ptr noundef) #2

declare i32 @EVP_PKEY_get_id(ptr 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 = { 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 = { 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 #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

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


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

%struct.s2n_debug_info = type { ptr, ptr }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [96 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

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

13:                                               ; preds = %2
  %.not41 = icmp eq ptr %1, null
  br i1 %.not41, label %14, label %22

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

22:                                               ; preds = %13
  %23 = tail call ptr @X509_get_issuer_name(ptr noundef nonnull %0) #7
  %.not43 = icmp eq ptr %23, null
  br i1 %.not43, label %24, label %32

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

32:                                               ; preds = %22
  %33 = tail call ptr @X509_get_subject_name(ptr noundef nonnull %0) #7
  %.not45 = icmp eq ptr %33, null
  br i1 %.not45, label %34, label %42

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

42:                                               ; preds = %32
  %43 = tail call i32 @X509_NAME_cmp(ptr noundef nonnull %23, ptr noundef nonnull %33) #7
  %44 = icmp eq i32 %43, 0
  %spec.select = zext i1 %44 to i8
  %45 = getelementptr inbounds i8, ptr %1, i64 16
  store i8 %spec.select, ptr %45, align 4
  %46 = tail call i32 @X509_get_signature_nid(ptr noundef nonnull %0) #7
  store i32 %46, ptr %1, align 4, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %1, i64 4
  %48 = tail call i32 @OBJ_find_sigid_algs(i32 noundef %46, ptr noundef nonnull %47, ptr noundef null) #7
  %.not47 = icmp eq i32 %48, 1
  br i1 %.not47, label %50, label %49

49:                                               ; preds = %42
  store i32 0, ptr %47, align 4, !tbaa !16
  br label %50

50:                                               ; preds = %49, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %51 = tail call ptr @X509_get_pubkey(ptr noundef nonnull %0) #7
  store ptr %51, ptr %3, align 8, !tbaa !17
  %.not48 = icmp eq ptr %51, null
  br i1 %.not48, label %52, label %60

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

60:                                               ; preds = %50
  %61 = tail call i32 @EVP_PKEY_get_bits(ptr noundef nonnull %51) #7
  %62 = getelementptr inbounds i8, ptr %1, i64 12
  store i32 %61, ptr %62, align 4, !tbaa !18
  %63 = icmp sgt i32 %61, 0
  br i1 %63, label %72, label %64

64:                                               ; preds = %60
  %65 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.17, ptr %65, align 8, !tbaa !5
  %66 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.17, i64 21), i32 noundef 47) #6
  %.not50 = icmp eq ptr %66, null
  %67 = getelementptr inbounds i8, ptr %66, i64 1
  %68 = select i1 %.not50, ptr getelementptr inbounds (i8, ptr @.str.17, i64 21), ptr %67
  %69 = getelementptr inbounds i8, ptr %65, i64 8
  store ptr %68, ptr %69, align 8, !tbaa !10
  %70 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544370, ptr %70, align 4, !tbaa !11
  %71 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %109

72:                                               ; preds = %60
  %73 = tail call i32 @EVP_PKEY_get_base_id(ptr noundef nonnull %51) #7
  %74 = icmp eq i32 %73, 408
  br i1 %74, label %75, label %96

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %76 = tail call ptr @EVP_PKEY_get1_EC_KEY(ptr noundef nonnull %51) #7
  store ptr %76, ptr %4, align 8, !tbaa !17
  %.not51 = icmp eq ptr %76, null
  br i1 %.not51, label %.critedge, label %84

.critedge:                                        ; preds = %75
  %77 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.18, ptr %77, align 8, !tbaa !5
  %78 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.18, i64 21), i32 noundef 47) #6
  %.not52 = icmp eq ptr %78, null
  %79 = getelementptr inbounds i8, ptr %78, i64 1
  %80 = select i1 %.not52, ptr getelementptr inbounds (i8, ptr @.str.18, i64 21), ptr %79
  %81 = getelementptr inbounds i8, ptr %77, i64 8
  store ptr %80, ptr %81, align 8, !tbaa !10
  %82 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %82, align 4, !tbaa !11
  %83 = tail call i32 @s2n_calculate_stacktrace() #7
  call void @EC_KEY_free_pointer(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %109

84:                                               ; preds = %75
  %85 = tail call ptr @EC_KEY_get0_group(ptr noundef nonnull %76) #7
  %.not53.not = icmp eq ptr %85, null
  br i1 %.not53.not, label %88, label %.thread

.thread:                                          ; preds = %84
  %86 = tail call i32 @EC_GROUP_get_curve_name(ptr noundef nonnull %85) #7
  %87 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 %86, ptr %87, align 4, !tbaa !19
  call void @EC_KEY_free_pointer(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %.pre = load i32, ptr %87, align 4, !tbaa !19
  br label %99

88:                                               ; preds = %84
  %89 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.19, ptr %89, align 8, !tbaa !5
  %90 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.19, i64 21), i32 noundef 47) #6
  %.not54 = icmp eq ptr %90, null
  %91 = getelementptr inbounds i8, ptr %90, i64 1
  %92 = select i1 %.not54, ptr getelementptr inbounds (i8, ptr @.str.19, i64 21), ptr %91
  %93 = getelementptr inbounds i8, ptr %89, i64 8
  store ptr %92, ptr %93, align 8, !tbaa !10
  %94 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %94, align 4, !tbaa !11
  %95 = tail call i32 @s2n_calculate_stacktrace() #7
  call void @EC_KEY_free_pointer(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %109

96:                                               ; preds = %72
  %97 = tail call i32 @EVP_PKEY_get_id(ptr noundef nonnull %51) #7
  %98 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 %97, ptr %98, align 4, !tbaa !19
  br label %99

99:                                               ; preds = %.thread, %96
  %100 = phi i32 [ %.pre, %.thread ], [ %97, %96 ]
  %.not55 = icmp eq i32 %100, 0
  br i1 %.not55, label %101, label %109

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

109:                                              ; preds = %88, %99, %.critedge, %101, %64, %52
  %.sroa.0.2 = phi i32 [ -1, %101 ], [ -1, %88 ], [ -1, %64 ], [ -1, %52 ], [ -1, %.critedge ], [ 0, %99 ]
  call void @EVP_PKEY_free_pointer(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %110

110:                                              ; preds = %24, %109, %34, %14, %5
  %.sroa.0.5 = phi i32 [ -1, %14 ], [ -1, %5 ], [ -1, %24 ], [ %.sroa.0.2, %109 ], [ -1, %34 ]
  ret i32 %.sroa.0.5
}

declare ptr @X509_get_issuer_name(ptr noundef) local_unnamed_addr #2

declare ptr @X509_get_subject_name(ptr noundef) local_unnamed_addr #2

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

declare i32 @X509_get_signature_nid(ptr noundef) local_unnamed_addr #2

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

declare ptr @X509_get_pubkey(ptr noundef) local_unnamed_addr #2

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

declare i32 @EVP_PKEY_get_bits(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_PKEY_get_base_id(ptr noundef) local_unnamed_addr #2

declare ptr @EVP_PKEY_get1_EC_KEY(ptr noundef) local_unnamed_addr #2

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

declare ptr @EC_KEY_get0_group(ptr noundef) local_unnamed_addr #2

declare i32 @EC_GROUP_get_curve_name(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_PKEY_get_id(ptr 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 = { 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 = { 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 #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

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


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