; LLVM IR from guanzhi/GmSSL :: tools (certverify)

; 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"

@stdin = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@usage = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@options = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [66 x i8], align 1
@__FUNCTION__.certverify_main = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @certverify_main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [1024 x i8], align 16
  %14 = alloca i64, align 8
  %15 = alloca [1024 x i8], align 16
  %16 = alloca i64, align 8
  %17 = alloca [8192 x i8], align 16
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca [1024 x i8], align 16
  %33 = alloca i64, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  store ptr %40, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %41 = load ptr, ptr @stdin, align 8, !tbaa !9
  store ptr %41, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8192, ptr %17) #8
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 8192, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = add nsw i32 %42, -1
  store i32 %43, ptr %4, align 4, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i32 1
  store ptr %45, ptr %5, align 8, !tbaa !9
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = icmp slt i32 %46, 1
  br i1 %47, label %48, label %53

48:                                               ; preds = %2
  %49 = load ptr, ptr @stderr, align 8, !tbaa !9
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  %51 = load ptr, ptr @usage, align 8, !tbaa !9
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str, ptr noundef %50, ptr noundef %51) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %37, align 4
  br label %581

53:                                               ; preds = %2
  br label %54

54:                                               ; preds = %210, %53
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %57, label %215

57:                                               ; preds = %54
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.1) #9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %68, label %62

62:                                               ; preds = %57
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = load ptr, ptr @usage, align 8, !tbaa !9
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %63, ptr noundef %64)
  %66 = load ptr, ptr @options, align 8, !tbaa !9
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %66)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %564

68:                                               ; preds = %57
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = call i32 @strcmp(ptr noundef %70, ptr noundef @.str.3) #9
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %94, label %73

73:                                               ; preds = %68
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %4, align 4, !tbaa !5
  %76 = icmp slt i32 %75, 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %73
  br label %198

78:                                               ; preds = %73
  %79 = load ptr, ptr %5, align 8, !tbaa !9
  %80 = getelementptr inbounds ptr, ptr %79, i32 1
  store ptr %80, ptr %5, align 8, !tbaa !9
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  store ptr %81, ptr %9, align 8, !tbaa !9
  %82 = load ptr, ptr %9, align 8, !tbaa !9
  %83 = call noalias ptr @fopen(ptr noundef %82, ptr noundef @.str.4)
  store ptr %83, ptr %11, align 8, !tbaa !9
  %84 = icmp ne ptr %83, null
  br i1 %84, label %93, label %85

85:                                               ; preds = %78
  %86 = load ptr, ptr @stderr, align 8, !tbaa !9
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = load ptr, ptr %9, align 8, !tbaa !9
  %89 = call ptr @__errno_location() #10
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = call ptr @strerror(i32 noundef %90) #8
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.5, ptr noundef %87, ptr noundef %88, ptr noundef %91) #8
  br label %564

93:                                               ; preds = %78
  br label %209

94:                                               ; preds = %68
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = call i32 @strcmp(ptr noundef %96, ptr noundef @.str.6) #9
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %100, label %99

99:                                               ; preds = %94
  store i32 1, ptr %31, align 4, !tbaa !5
  br label %208

100:                                              ; preds = %94
  %101 = load ptr, ptr %5, align 8, !tbaa !9
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = call i32 @strcmp(ptr noundef %102, ptr noundef @.str.7) #9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %106, label %105

105:                                              ; preds = %100
  store i32 1, ptr %35, align 4, !tbaa !5
  br label %207

106:                                              ; preds = %100
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 @strcmp(ptr noundef %108, ptr noundef @.str.8) #9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %132, label %111

111:                                              ; preds = %106
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %4, align 4, !tbaa !5
  %114 = icmp slt i32 %113, 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %111
  br label %198

116:                                              ; preds = %111
  %117 = load ptr, ptr %5, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i32 1
  store ptr %118, ptr %5, align 8, !tbaa !9
  %119 = load ptr, ptr %118, align 8, !tbaa !9
  store ptr %119, ptr %10, align 8, !tbaa !9
  %120 = load ptr, ptr %10, align 8, !tbaa !9
  %121 = call noalias ptr @fopen(ptr noundef %120, ptr noundef @.str.4)
  store ptr %121, ptr %12, align 8, !tbaa !9
  %122 = icmp ne ptr %121, null
  br i1 %122, label %131, label %123

123:                                              ; preds = %116
  %124 = load ptr, ptr @stderr, align 8, !tbaa !9
  %125 = load ptr, ptr %7, align 8, !tbaa !9
  %126 = load ptr, ptr %10, align 8, !tbaa !9
  %127 = call ptr @__errno_location() #10
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = call ptr @strerror(i32 noundef %128) #8
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.5, ptr noundef %125, ptr noundef %126, ptr noundef %129) #8
  br label %564

131:                                              ; preds = %116
  br label %206

132:                                              ; preds = %106
  %133 = load ptr, ptr %5, align 8, !tbaa !9
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = call i32 @strcmp(ptr noundef %134, ptr noundef @.str.9) #9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %159, label %137

137:                                              ; preds = %132
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = add nsw i32 %138, -1
  store i32 %139, ptr %4, align 4, !tbaa !5
  %140 = icmp slt i32 %139, 1
  br i1 %140, label %141, label %142

141:                                              ; preds = %137
  br label %198

142:                                              ; preds = %137
  %143 = load ptr, ptr %5, align 8, !tbaa !9
  %144 = getelementptr inbounds ptr, ptr %143, i32 1
  store ptr %144, ptr %5, align 8, !tbaa !9
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  store ptr %145, ptr %8, align 8, !tbaa !9
  %146 = load ptr, ptr %8, align 8, !tbaa !9
  %147 = call i64 @strlen(ptr noundef %146) #9
  %148 = icmp ugt i64 %147, 8191
  br i1 %148, label %149, label %153

149:                                              ; preds = %142
  %150 = load ptr, ptr @stderr, align 8, !tbaa !9
  %151 = load ptr, ptr %7, align 8, !tbaa !9
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef @.str.10, ptr noundef %151) #8
  br label %564

153:                                              ; preds = %142
  %154 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  %156 = call ptr @strncpy(ptr noundef %154, ptr noundef %155, i64 noundef 8192) #8
  %157 = load ptr, ptr %8, align 8, !tbaa !9
  %158 = call i64 @strlen(ptr noundef %157) #9
  store i64 %158, ptr %18, align 8, !tbaa !11
  br label %205

159:                                              ; preds = %132
  %160 = load ptr, ptr %5, align 8, !tbaa !9
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  %162 = call i32 @strcmp(ptr noundef %161, ptr noundef @.str.11) #9
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %192, label %164

164:                                              ; preds = %159
  %165 = load i32, ptr %4, align 4, !tbaa !5
  %166 = add nsw i32 %165, -1
  store i32 %166, ptr %4, align 4, !tbaa !5
  %167 = icmp slt i32 %166, 1
  br i1 %167, label %168, label %169

168:                                              ; preds = %164
  br label %198

169:                                              ; preds = %164
  %170 = load ptr, ptr %5, align 8, !tbaa !9
  %171 = getelementptr inbounds ptr, ptr %170, i32 1
  store ptr %171, ptr %5, align 8, !tbaa !9
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  store ptr %172, ptr %8, align 8, !tbaa !9
  %173 = load ptr, ptr %8, align 8, !tbaa !9
  %174 = call i64 @strlen(ptr noundef %173) #9
  %175 = icmp ugt i64 %174, 16382
  br i1 %175, label %176, label %180

176:                                              ; preds = %169
  %177 = load ptr, ptr @stderr, align 8, !tbaa !9
  %178 = load ptr, ptr %7, align 8, !tbaa !9
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %177, ptr noundef @.str.12, ptr noundef %178) #8
  br label %564

180:                                              ; preds = %169
  %181 = load ptr, ptr %8, align 8, !tbaa !9
  %182 = load ptr, ptr %8, align 8, !tbaa !9
  %183 = call i64 @strlen(ptr noundef %182) #9
  %184 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %185 = call i32 @hex_to_bytes(ptr noundef %181, i64 noundef %183, ptr noundef %184, ptr noundef %18)
  %186 = icmp ne i32 %185, 1
  br i1 %186, label %187, label %191

187:                                              ; preds = %180
  %188 = load ptr, ptr @stderr, align 8, !tbaa !9
  %189 = load ptr, ptr %7, align 8, !tbaa !9
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.13, ptr noundef %189) #8
  br label %564

191:                                              ; preds = %180
  br label %204

192:                                              ; preds = %159
  %193 = load ptr, ptr @stderr, align 8, !tbaa !9
  %194 = load ptr, ptr %7, align 8, !tbaa !9
  %195 = load ptr, ptr %5, align 8, !tbaa !9
  %196 = load ptr, ptr %195, align 8, !tbaa !9
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.14, ptr noundef %194, ptr noundef %196) #8
  br label %564

198:                                              ; preds = %168, %141, %115, %77
  %199 = load ptr, ptr @stderr, align 8, !tbaa !9
  %200 = load ptr, ptr %7, align 8, !tbaa !9
  %201 = load ptr, ptr %5, align 8, !tbaa !9
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %199, ptr noundef @.str.15, ptr noundef %200, ptr noundef %202) #8
  br label %564

204:                                              ; preds = %191
  br label %205

205:                                              ; preds = %204, %153
  br label %206

206:                                              ; preds = %205, %131
  br label %207

207:                                              ; preds = %206, %105
  br label %208

208:                                              ; preds = %207, %99
  br label %209

209:                                              ; preds = %208, %93
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %4, align 4, !tbaa !5
  %212 = add nsw i32 %211, -1
  store i32 %212, ptr %4, align 4, !tbaa !5
  %213 = load ptr, ptr %5, align 8, !tbaa !9
  %214 = getelementptr inbounds ptr, ptr %213, i32 1
  store ptr %214, ptr %5, align 8, !tbaa !9
  br label %54, !llvm.loop !13

215:                                              ; preds = %54
  %216 = load ptr, ptr %9, align 8, !tbaa !9
  %217 = icmp ne ptr %216, null
  br i1 %217, label %222, label %218

218:                                              ; preds = %215
  %219 = load ptr, ptr @stderr, align 8, !tbaa !9
  %220 = load ptr, ptr %7, align 8, !tbaa !9
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef @.str.16, ptr noundef %220) #8
  br label %564

222:                                              ; preds = %215
  %223 = load ptr, ptr %10, align 8, !tbaa !9
  %224 = icmp ne ptr %223, null
  br i1 %224, label %229, label %225

225:                                              ; preds = %222
  %226 = load ptr, ptr @stderr, align 8, !tbaa !9
  %227 = load ptr, ptr %7, align 8, !tbaa !9
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.17, ptr noundef %227) #8
  br label %564

229:                                              ; preds = %222
  %230 = load i64, ptr %18, align 8, !tbaa !11
  %231 = icmp ne i64 %230, 0
  br i1 %231, label %235, label %232

232:                                              ; preds = %229
  %233 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %234 = call ptr @strcpy(ptr noundef %233, ptr noundef @.str.18) #8
  store i64 16, ptr %18, align 8, !tbaa !11
  br label %235

235:                                              ; preds = %232, %229
  %236 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %237 = load ptr, ptr %11, align 8, !tbaa !9
  %238 = call i32 @x509_cert_from_pem(ptr noundef %236, ptr noundef %14, i64 noundef 1024, ptr noundef %237)
  %239 = icmp ne i32 %238, 1
  br i1 %239, label %250, label %240

240:                                              ; preds = %235
  %241 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %242 = load i64, ptr %14, align 8, !tbaa !11
  %243 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %241, i64 noundef %242, ptr noundef %21, ptr noundef %22, ptr noundef %19, ptr noundef %20)
  %244 = icmp ne i32 %243, 1
  br i1 %244, label %250, label %245

245:                                              ; preds = %240
  %246 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %247 = load i64, ptr %14, align 8, !tbaa !11
  %248 = call i32 @x509_cert_get_subject(ptr noundef %246, i64 noundef %247, ptr noundef %23, ptr noundef %24)
  %249 = icmp ne i32 %248, 1
  br i1 %249, label %250, label %254

250:                                              ; preds = %245, %240, %235
  %251 = load ptr, ptr @stderr, align 8, !tbaa !9
  %252 = load ptr, ptr %7, align 8, !tbaa !9
  %253 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %251, ptr noundef @.str.19, ptr noundef %252) #8
  br label %564

254:                                              ; preds = %245
  %255 = load ptr, ptr @stdout, align 8, !tbaa !9
  %256 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %255, i32 noundef 0, i32 noundef 0, ptr noundef @.str.20)
  %257 = load ptr, ptr @stdout, align 8, !tbaa !9
  %258 = load ptr, ptr %19, align 8, !tbaa !9
  %259 = load i64, ptr %20, align 8, !tbaa !11
  %260 = call i32 @format_bytes(ptr noundef %257, i32 noundef 0, i32 noundef 4, ptr noundef @.str.21, ptr noundef %258, i64 noundef %259)
  %261 = load ptr, ptr @stdout, align 8, !tbaa !9
  %262 = load ptr, ptr %23, align 8, !tbaa !9
  %263 = load i64, ptr %24, align 8, !tbaa !11
  %264 = call i32 @x509_name_print(ptr noundef %261, i32 noundef 0, i32 noundef 4, ptr noundef @.str.22, ptr noundef %262, i64 noundef %263)
  %265 = load i32, ptr %31, align 4, !tbaa !5
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %267, label %305

267:                                              ; preds = %254
  %268 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %269 = load ptr, ptr %11, align 8, !tbaa !9
  %270 = call i32 @x509_cert_from_pem(ptr noundef %268, ptr noundef %33, i64 noundef 1024, ptr noundef %269)
  %271 = icmp ne i32 %270, 1
  br i1 %271, label %282, label %272

272:                                              ; preds = %267
  %273 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %274 = load i64, ptr %33, align 8, !tbaa !11
  %275 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %273, i64 noundef %274, ptr noundef %27, ptr noundef %28, ptr noundef %25, ptr noundef %26)
  %276 = icmp ne i32 %275, 1
  br i1 %276, label %282, label %277

277:                                              ; preds = %272
  %278 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %279 = load i64, ptr %33, align 8, !tbaa !11
  %280 = call i32 @x509_cert_get_subject(ptr noundef %278, i64 noundef %279, ptr noundef %29, ptr noundef %30)
  %281 = icmp ne i32 %280, 1
  br i1 %281, label %282, label %286

282:                                              ; preds = %277, %272, %267
  %283 = load ptr, ptr @stderr, align 8, !tbaa !9
  %284 = load ptr, ptr %7, align 8, !tbaa !9
  %285 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %283, ptr noundef @.str.23, ptr noundef %284) #8
  br label %564

286:                                              ; preds = %277
  %287 = load ptr, ptr %29, align 8, !tbaa !9
  %288 = load i64, ptr %30, align 8, !tbaa !11
  %289 = load ptr, ptr %23, align 8, !tbaa !9
  %290 = load i64, ptr %24, align 8, !tbaa !11
  %291 = call i32 @x509_name_equ(ptr noundef %287, i64 noundef %288, ptr noundef %289, i64 noundef %290)
  %292 = icmp ne i32 %291, 1
  br i1 %292, label %300, label %293

293:                                              ; preds = %286
  %294 = load ptr, ptr %27, align 8, !tbaa !9
  %295 = load i64, ptr %28, align 8, !tbaa !11
  %296 = load ptr, ptr %21, align 8, !tbaa !9
  %297 = load i64, ptr %22, align 8, !tbaa !11
  %298 = call i32 @x509_name_equ(ptr noundef %294, i64 noundef %295, ptr noundef %296, i64 noundef %297)
  %299 = icmp ne i32 %298, 1
  br i1 %299, label %300, label %304

300:                                              ; preds = %293, %286
  %301 = load ptr, ptr @stderr, align 8, !tbaa !9
  %302 = load ptr, ptr %7, align 8, !tbaa !9
  %303 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %301, ptr noundef @.str.24, ptr noundef %302) #8
  br label %564

304:                                              ; preds = %293
  br label %305

305:                                              ; preds = %304, %254
  br label %306

306:                                              ; preds = %426, %305
  %307 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %308 = load ptr, ptr %11, align 8, !tbaa !9
  %309 = call i32 @x509_cert_from_pem(ptr noundef %307, ptr noundef %16, i64 noundef 1024, ptr noundef %308)
  store i32 %309, ptr %34, align 4, !tbaa !5
  %310 = icmp ne i32 %309, 1
  br i1 %310, label %311, label %316

311:                                              ; preds = %306
  %312 = load i32, ptr %34, align 4, !tbaa !5
  %313 = icmp slt i32 %312, 0
  br i1 %313, label %314, label %315

314:                                              ; preds = %311
  br label %564

315:                                              ; preds = %311
  br label %437

316:                                              ; preds = %306
  %317 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %318 = load i64, ptr %14, align 8, !tbaa !11
  %319 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %320 = load i64, ptr %16, align 8, !tbaa !11
  %321 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %322 = load i64, ptr %18, align 8, !tbaa !11
  %323 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef %317, i64 noundef %318, ptr noundef %319, i64 noundef %320, ptr noundef %321, i64 noundef %322)
  store i32 %323, ptr %34, align 4, !tbaa !5
  %324 = icmp ne i32 %323, 1
  br i1 %324, label %325, label %329

325:                                              ; preds = %316
  %326 = load ptr, ptr @stderr, align 8, !tbaa !9
  %327 = load ptr, ptr %7, align 8, !tbaa !9
  %328 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %326, ptr noundef @.str.25, ptr noundef %327) #8
  br label %564

329:                                              ; preds = %316
  %330 = load ptr, ptr @stdout, align 8, !tbaa !9
  %331 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %330, i32 noundef 0, i32 noundef 4, ptr noundef @.str.26)
  %332 = load i32, ptr %35, align 4, !tbaa !5
  %333 = icmp ne i32 %332, 0
  br i1 %333, label %334, label %354

334:                                              ; preds = %329
  %335 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %336 = load i64, ptr %14, align 8, !tbaa !11
  %337 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %338 = load i64, ptr %16, align 8, !tbaa !11
  %339 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %340 = load i64, ptr %18, align 8, !tbaa !11
  %341 = call i32 @x509_cert_check_crl(ptr noundef %335, i64 noundef %336, ptr noundef %337, i64 noundef %338, ptr noundef %339, i64 noundef %340)
  store i32 %341, ptr %36, align 4, !tbaa !5
  %342 = icmp slt i32 %341, 0
  br i1 %342, label %343, label %347

343:                                              ; preds = %334
  %344 = load ptr, ptr @stderr, align 8, !tbaa !9
  %345 = load ptr, ptr %7, align 8, !tbaa !9
  %346 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %344, ptr noundef @.str.27, ptr noundef %345) #8
  br label %564

347:                                              ; preds = %334
  %348 = load ptr, ptr @stdout, align 8, !tbaa !9
  %349 = load i32, ptr %36, align 4, !tbaa !5
  %350 = icmp ne i32 %349, 0
  %351 = zext i1 %350 to i64
  %352 = select i1 %350, ptr @.str.29, ptr @.str.30
  %353 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %348, i32 noundef 0, i32 noundef 4, ptr noundef @.str.28, ptr noundef %352)
  br label %354

354:                                              ; preds = %347, %329
  %355 = load i32, ptr %31, align 4, !tbaa !5
  %356 = icmp ne i32 %355, 0
  br i1 %356, label %357, label %406

357:                                              ; preds = %354
  %358 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %359 = load i64, ptr %33, align 8, !tbaa !11
  %360 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %361 = load i64, ptr %16, align 8, !tbaa !11
  %362 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %363 = load i64, ptr %18, align 8, !tbaa !11
  %364 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef %358, i64 noundef %359, ptr noundef %360, i64 noundef %361, ptr noundef %362, i64 noundef %363)
  store i32 %364, ptr %34, align 4, !tbaa !5
  %365 = icmp slt i32 %364, 0
  br i1 %365, label %366, label %370

366:                                              ; preds = %357
  %367 = load ptr, ptr @stderr, align 8, !tbaa !9
  %368 = load ptr, ptr %7, align 8, !tbaa !9
  %369 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %367, ptr noundef @.str.25, ptr noundef %368) #8
  br label %564

370:                                              ; preds = %357
  %371 = load ptr, ptr @stdout, align 8, !tbaa !9
  %372 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %371, i32 noundef 0, i32 noundef 0, ptr noundef @.str.20)
  %373 = load ptr, ptr @stdout, align 8, !tbaa !9
  %374 = load ptr, ptr %25, align 8, !tbaa !9
  %375 = load i64, ptr %26, align 8, !tbaa !11
  %376 = call i32 @format_bytes(ptr noundef %373, i32 noundef 0, i32 noundef 4, ptr noundef @.str.21, ptr noundef %374, i64 noundef %375)
  %377 = load ptr, ptr @stdout, align 8, !tbaa !9
  %378 = load ptr, ptr %29, align 8, !tbaa !9
  %379 = load i64, ptr %30, align 8, !tbaa !11
  %380 = call i32 @x509_name_print(ptr noundef %377, i32 noundef 0, i32 noundef 4, ptr noundef @.str.22, ptr noundef %378, i64 noundef %379)
  %381 = load ptr, ptr @stdout, align 8, !tbaa !9
  %382 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %381, i32 noundef 0, i32 noundef 4, ptr noundef @.str.26)
  %383 = load i32, ptr %35, align 4, !tbaa !5
  %384 = icmp ne i32 %383, 0
  br i1 %384, label %385, label %405

385:                                              ; preds = %370
  %386 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %387 = load i64, ptr %33, align 8, !tbaa !11
  %388 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %389 = load i64, ptr %16, align 8, !tbaa !11
  %390 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %391 = load i64, ptr %18, align 8, !tbaa !11
  %392 = call i32 @x509_cert_check_crl(ptr noundef %386, i64 noundef %387, ptr noundef %388, i64 noundef %389, ptr noundef %390, i64 noundef %391)
  store i32 %392, ptr %36, align 4, !tbaa !5
  %393 = icmp slt i32 %392, 0
  br i1 %393, label %394, label %398

394:                                              ; preds = %385
  %395 = load ptr, ptr @stderr, align 8, !tbaa !9
  %396 = load ptr, ptr %7, align 8, !tbaa !9
  %397 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %395, ptr noundef @.str.27, ptr noundef %396) #8
  br label %564

398:                                              ; preds = %385
  %399 = load ptr, ptr @stdout, align 8, !tbaa !9
  %400 = load i32, ptr %36, align 4, !tbaa !5
  %401 = icmp ne i32 %400, 0
  %402 = zext i1 %401 to i64
  %403 = select i1 %401, ptr @.str.29, ptr @.str.30
  %404 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %399, i32 noundef 0, i32 noundef 4, ptr noundef @.str.28, ptr noundef %403)
  br label %405

405:                                              ; preds = %398, %370
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %406

406:                                              ; preds = %405, %354
  %407 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %408 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %409 = load i64, ptr %16, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %407, ptr align 16 %408, i64 %409, i1 false)
  %410 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %410, ptr %14, align 8, !tbaa !11
  %411 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %412 = load i64, ptr %14, align 8, !tbaa !11
  %413 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %411, i64 noundef %412, ptr noundef %21, ptr noundef %22, ptr noundef %19, ptr noundef %20)
  %414 = icmp ne i32 %413, 1
  br i1 %414, label %420, label %415

415:                                              ; preds = %406
  %416 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %417 = load i64, ptr %14, align 8, !tbaa !11
  %418 = call i32 @x509_cert_get_subject(ptr noundef %416, i64 noundef %417, ptr noundef %23, ptr noundef %24)
  %419 = icmp ne i32 %418, 1
  br i1 %419, label %420, label %426

420:                                              ; preds = %415, %406
  br label %421

421:                                              ; preds = %420
  %422 = load ptr, ptr @stderr, align 8, !tbaa !9
  %423 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %422, ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 241, ptr noundef @__FUNCTION__.certverify_main) #8
  br label %424

424:                                              ; preds = %421
  br label %425

425:                                              ; preds = %424
  br label %564

426:                                              ; preds = %415
  %427 = load ptr, ptr @stdout, align 8, !tbaa !9
  %428 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %427, i32 noundef 0, i32 noundef 0, ptr noundef @.str.33)
  %429 = load ptr, ptr @stdout, align 8, !tbaa !9
  %430 = load ptr, ptr %19, align 8, !tbaa !9
  %431 = load i64, ptr %20, align 8, !tbaa !11
  %432 = call i32 @format_bytes(ptr noundef %429, i32 noundef 0, i32 noundef 4, ptr noundef @.str.21, ptr noundef %430, i64 noundef %431)
  %433 = load ptr, ptr @stdout, align 8, !tbaa !9
  %434 = load ptr, ptr %23, align 8, !tbaa !9
  %435 = load i64, ptr %24, align 8, !tbaa !11
  %436 = call i32 @x509_name_print(ptr noundef %433, i32 noundef 0, i32 noundef 4, ptr noundef @.str.34, ptr noundef %434, i64 noundef %435)
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %306

437:                                              ; preds = %315
  %438 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %439 = load ptr, ptr %21, align 8, !tbaa !9
  %440 = load i64, ptr %22, align 8, !tbaa !11
  %441 = load ptr, ptr %12, align 8, !tbaa !9
  %442 = call i32 @x509_cert_from_pem_by_subject(ptr noundef %438, ptr noundef %16, i64 noundef 1024, ptr noundef %439, i64 noundef %440, ptr noundef %441)
  %443 = icmp ne i32 %442, 1
  br i1 %443, label %444, label %448

444:                                              ; preds = %437
  %445 = load ptr, ptr @stderr, align 8, !tbaa !9
  %446 = load ptr, ptr %7, align 8, !tbaa !9
  %447 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %445, ptr noundef @.str.35, ptr noundef %446) #8
  br label %564

448:                                              ; preds = %437
  %449 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %450 = load i64, ptr %14, align 8, !tbaa !11
  %451 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %452 = load i64, ptr %16, align 8, !tbaa !11
  %453 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %454 = load i64, ptr %18, align 8, !tbaa !11
  %455 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef %449, i64 noundef %450, ptr noundef %451, i64 noundef %452, ptr noundef %453, i64 noundef %454)
  store i32 %455, ptr %34, align 4, !tbaa !5
  %456 = icmp slt i32 %455, 0
  br i1 %456, label %457, label %461

457:                                              ; preds = %448
  %458 = load ptr, ptr @stderr, align 8, !tbaa !9
  %459 = load ptr, ptr %7, align 8, !tbaa !9
  %460 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %458, ptr noundef @.str.36, ptr noundef %459) #8
  br label %564

461:                                              ; preds = %448
  %462 = load ptr, ptr @stdout, align 8, !tbaa !9
  %463 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %462, i32 noundef 0, i32 noundef 4, ptr noundef @.str.26)
  %464 = load i32, ptr %35, align 4, !tbaa !5
  %465 = icmp ne i32 %464, 0
  br i1 %465, label %466, label %486

466:                                              ; preds = %461
  %467 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %468 = load i64, ptr %14, align 8, !tbaa !11
  %469 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %470 = load i64, ptr %16, align 8, !tbaa !11
  %471 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %472 = load i64, ptr %18, align 8, !tbaa !11
  %473 = call i32 @x509_cert_check_crl(ptr noundef %467, i64 noundef %468, ptr noundef %469, i64 noundef %470, ptr noundef %471, i64 noundef %472)
  store i32 %473, ptr %36, align 4, !tbaa !5
  %474 = icmp slt i32 %473, 0
  br i1 %474, label %475, label %479

475:                                              ; preds = %466
  %476 = load ptr, ptr @stderr, align 8, !tbaa !9
  %477 = load ptr, ptr %7, align 8, !tbaa !9
  %478 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %476, ptr noundef @.str.37, ptr noundef %477) #8
  br label %564

479:                                              ; preds = %466
  %480 = load ptr, ptr @stdout, align 8, !tbaa !9
  %481 = load i32, ptr %36, align 4, !tbaa !5
  %482 = icmp ne i32 %481, 0
  %483 = zext i1 %482 to i64
  %484 = select i1 %482, ptr @.str.29, ptr @.str.30
  %485 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %480, i32 noundef 0, i32 noundef 4, ptr noundef @.str.28, ptr noundef %484)
  br label %486

486:                                              ; preds = %479, %461
  %487 = load i32, ptr %31, align 4, !tbaa !5
  %488 = icmp ne i32 %487, 0
  br i1 %488, label %489, label %538

489:                                              ; preds = %486
  %490 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %491 = load i64, ptr %33, align 8, !tbaa !11
  %492 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %493 = load i64, ptr %16, align 8, !tbaa !11
  %494 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %495 = load i64, ptr %18, align 8, !tbaa !11
  %496 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef %490, i64 noundef %491, ptr noundef %492, i64 noundef %493, ptr noundef %494, i64 noundef %495)
  store i32 %496, ptr %34, align 4, !tbaa !5
  %497 = icmp slt i32 %496, 0
  br i1 %497, label %498, label %502

498:                                              ; preds = %489
  %499 = load ptr, ptr @stderr, align 8, !tbaa !9
  %500 = load ptr, ptr %7, align 8, !tbaa !9
  %501 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %499, ptr noundef @.str.36, ptr noundef %500) #8
  br label %564

502:                                              ; preds = %489
  %503 = load ptr, ptr @stdout, align 8, !tbaa !9
  %504 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %503, i32 noundef 0, i32 noundef 0, ptr noundef @.str.20)
  %505 = load ptr, ptr @stdout, align 8, !tbaa !9
  %506 = load ptr, ptr %25, align 8, !tbaa !9
  %507 = load i64, ptr %26, align 8, !tbaa !11
  %508 = call i32 @format_bytes(ptr noundef %505, i32 noundef 0, i32 noundef 4, ptr noundef @.str.21, ptr noundef %506, i64 noundef %507)
  %509 = load ptr, ptr @stdout, align 8, !tbaa !9
  %510 = load ptr, ptr %29, align 8, !tbaa !9
  %511 = load i64, ptr %30, align 8, !tbaa !11
  %512 = call i32 @x509_name_print(ptr noundef %509, i32 noundef 0, i32 noundef 4, ptr noundef @.str.22, ptr noundef %510, i64 noundef %511)
  %513 = load ptr, ptr @stdout, align 8, !tbaa !9
  %514 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %513, i32 noundef 0, i32 noundef 4, ptr noundef @.str.26)
  %515 = load i32, ptr %35, align 4, !tbaa !5
  %516 = icmp ne i32 %515, 0
  br i1 %516, label %517, label %537

517:                                              ; preds = %502
  %518 = getelementptr inbounds [1024 x i8], ptr %32, i64 0, i64 0
  %519 = load i64, ptr %33, align 8, !tbaa !11
  %520 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %521 = load i64, ptr %16, align 8, !tbaa !11
  %522 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %523 = load i64, ptr %18, align 8, !tbaa !11
  %524 = call i32 @x509_cert_check_crl(ptr noundef %518, i64 noundef %519, ptr noundef %520, i64 noundef %521, ptr noundef %522, i64 noundef %523)
  store i32 %524, ptr %36, align 4, !tbaa !5
  %525 = icmp slt i32 %524, 0
  br i1 %525, label %526, label %530

526:                                              ; preds = %517
  %527 = load ptr, ptr @stderr, align 8, !tbaa !9
  %528 = load ptr, ptr %7, align 8, !tbaa !9
  %529 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %527, ptr noundef @.str.37, ptr noundef %528) #8
  br label %564

530:                                              ; preds = %517
  %531 = load ptr, ptr @stdout, align 8, !tbaa !9
  %532 = load i32, ptr %36, align 4, !tbaa !5
  %533 = icmp ne i32 %532, 0
  %534 = zext i1 %533 to i64
  %535 = select i1 %533, ptr @.str.29, ptr @.str.30
  %536 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %531, i32 noundef 0, i32 noundef 4, ptr noundef @.str.28, ptr noundef %535)
  br label %537

537:                                              ; preds = %530, %502
  br label %538

538:                                              ; preds = %537, %486
  %539 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %540 = load i64, ptr %16, align 8, !tbaa !11
  %541 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %539, i64 noundef %540, ptr noundef null, ptr noundef null, ptr noundef %19, ptr noundef %20)
  %542 = icmp ne i32 %541, 1
  br i1 %542, label %548, label %543

543:                                              ; preds = %538
  %544 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %545 = load i64, ptr %16, align 8, !tbaa !11
  %546 = call i32 @x509_cert_get_subject(ptr noundef %544, i64 noundef %545, ptr noundef %23, ptr noundef %24)
  %547 = icmp ne i32 %546, 1
  br i1 %547, label %548, label %552

548:                                              ; preds = %543, %538
  %549 = load ptr, ptr @stderr, align 8, !tbaa !9
  %550 = load ptr, ptr %7, align 8, !tbaa !9
  %551 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %549, ptr noundef @.str.38, ptr noundef %550) #8
  br label %564

552:                                              ; preds = %543
  %553 = load ptr, ptr @stdout, align 8, !tbaa !9
  %554 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %553, i32 noundef 0, i32 noundef 0, ptr noundef @.str.33)
  %555 = load ptr, ptr @stdout, align 8, !tbaa !9
  %556 = load ptr, ptr %19, align 8, !tbaa !9
  %557 = load i64, ptr %20, align 8, !tbaa !11
  %558 = call i32 @format_bytes(ptr noundef %555, i32 noundef 0, i32 noundef 4, ptr noundef @.str.21, ptr noundef %556, i64 noundef %557)
  %559 = load ptr, ptr @stdout, align 8, !tbaa !9
  %560 = load ptr, ptr %23, align 8, !tbaa !9
  %561 = load i64, ptr %24, align 8, !tbaa !11
  %562 = call i32 @x509_name_print(ptr noundef %559, i32 noundef 0, i32 noundef 4, ptr noundef @.str.22, ptr noundef %560, i64 noundef %561)
  %563 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %564

564:                                              ; preds = %552, %548, %526, %498, %475, %457, %444, %425, %394, %366, %343, %325, %314, %300, %282, %250, %225, %218, %198, %192, %187, %176, %149, %123, %85, %62
  %565 = load ptr, ptr %9, align 8, !tbaa !9
  %566 = icmp ne ptr %565, null
  br i1 %566, label %567, label %573

567:                                              ; preds = %564
  %568 = load ptr, ptr %11, align 8, !tbaa !9
  %569 = icmp ne ptr %568, null
  br i1 %569, label %570, label %573

570:                                              ; preds = %567
  %571 = load ptr, ptr %11, align 8, !tbaa !9
  %572 = call i32 @fclose(ptr noundef %571)
  br label %573

573:                                              ; preds = %570, %567, %564
  %574 = load ptr, ptr %12, align 8, !tbaa !9
  %575 = icmp ne ptr %574, null
  br i1 %575, label %576, label %579

576:                                              ; preds = %573
  %577 = load ptr, ptr %12, align 8, !tbaa !9
  %578 = call i32 @fclose(ptr noundef %577)
  br label %579

579:                                              ; preds = %576, %573
  %580 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %580, ptr %3, align 4
  store i32 1, ptr %37, align 4
  br label %581

581:                                              ; preds = %579, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8192, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %582 = load i32, ptr %3, align 4
  ret i32 %582
}

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

declare i32 @printf(ptr noundef, ...) #5

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #3

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #3

declare i32 @hex_to_bytes(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

declare i32 @x509_cert_from_pem(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #5

declare i32 @x509_cert_get_issuer_and_serial_number(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare i32 @x509_cert_get_subject(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

declare i32 @format_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ...) #5

declare i32 @format_bytes(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) #5

declare i32 @x509_name_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) #5

declare i32 @x509_name_equ(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

declare i32 @x509_cert_verify_by_ca_cert(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

declare i32 @x509_cert_check_crl(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

declare i32 @x509_cert_from_pem_by_subject(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

@stdin = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@usage = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@options = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [66 x i8], align 1
@__FUNCTION__.certverify_main = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @certverify_main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca i64, align 8
  %5 = alloca [1024 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca [8192 x i8], align 16
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca [1024 x i8], align 16
  %22 = alloca i64, align 8
  %23 = load ptr, ptr %1, align 8, !tbaa !5
  %24 = load ptr, ptr @stdin, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %7) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8192) %7, i8 0, i64 8192, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #10
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %21) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #10
  %25 = icmp slt i32 %0, 2
  br i1 %25, label %26, label %.preheader

26:                                               ; preds = %2
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = load ptr, ptr @usage, align 8, !tbaa !5
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str, ptr noundef %23, ptr noundef %28) #11
  br label %352

.preheader:                                       ; preds = %2, %111
  %.0246 = phi i32 [ %.1, %111 ], [ 0, %2 ]
  %.083245 = phi i32 [ %.184, %111 ], [ 0, %2 ]
  %.086244 = phi ptr [ %.187, %111 ], [ null, %2 ]
  %.089243 = phi ptr [ %.190, %111 ], [ %24, %2 ]
  %.092242 = phi ptr [ %.193, %111 ], [ null, %2 ]
  %.094241 = phi ptr [ %.195, %111 ], [ null, %2 ]
  %.pn240 = phi ptr [ %.1100, %111 ], [ %1, %2 ]
  %.0101.in239 = phi i32 [ %.1102, %111 ], [ %0, %2 ]
  %.099247 = getelementptr inbounds i8, ptr %.pn240, i64 8
  %.0101248 = add nsw i32 %.0101.in239, -1
  %30 = load ptr, ptr %.099247, align 8, !tbaa !5
  %31 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.1) #12
  %.not144 = icmp eq i32 %31, 0
  br i1 %.not144, label %32, label %37

32:                                               ; preds = %.preheader
  %33 = load ptr, ptr @usage, align 8, !tbaa !5
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %23, ptr noundef %33)
  %35 = load ptr, ptr @options, align 8, !tbaa !5
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %35)
  br label %345

37:                                               ; preds = %.preheader
  %38 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.3) #12
  %.not145 = icmp eq i32 %38, 0
  br i1 %.not145, label %39, label %52

39:                                               ; preds = %37
  %40 = icmp eq i32 %.0101.in239, 2
  br i1 %40, label %108, label %41

41:                                               ; preds = %39
  %42 = add nsw i32 %.0101.in239, -2
  %43 = getelementptr inbounds i8, ptr %.pn240, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = call noalias ptr @fopen(ptr noundef %44, ptr noundef nonnull @.str.4)
  %.not146 = icmp eq ptr %45, null
  br i1 %.not146, label %46, label %111

46:                                               ; preds = %41
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = tail call ptr @__errno_location() #13
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = call ptr @strerror(i32 noundef %49) #10
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.5, ptr noundef %23, ptr noundef %44, ptr noundef %50) #11
  br label %.thread

52:                                               ; preds = %37
  %53 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %.not147 = icmp eq i32 %53, 0
  br i1 %.not147, label %111, label %54

54:                                               ; preds = %52
  %55 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %.not148 = icmp eq i32 %55, 0
  br i1 %.not148, label %111, label %56

56:                                               ; preds = %54
  %57 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.8) #12
  %.not149 = icmp eq i32 %57, 0
  br i1 %.not149, label %58, label %71

58:                                               ; preds = %56
  %59 = icmp eq i32 %.0101.in239, 2
  br i1 %59, label %108, label %60

60:                                               ; preds = %58
  %61 = add nsw i32 %.0101.in239, -2
  %62 = getelementptr inbounds i8, ptr %.pn240, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = call noalias ptr @fopen(ptr noundef %63, ptr noundef nonnull @.str.4)
  %.not150 = icmp eq ptr %64, null
  br i1 %.not150, label %65, label %111

65:                                               ; preds = %60
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = tail call ptr @__errno_location() #13
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = call ptr @strerror(i32 noundef %68) #10
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.5, ptr noundef %23, ptr noundef %63, ptr noundef %69) #11
  br label %345

71:                                               ; preds = %56
  %72 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.9) #12
  %.not151 = icmp eq i32 %72, 0
  br i1 %.not151, label %73, label %87

73:                                               ; preds = %71
  %74 = add nsw i32 %.0101.in239, -2
  %75 = icmp eq i32 %.0101.in239, 2
  br i1 %75, label %108, label %76

76:                                               ; preds = %73
  %77 = getelementptr inbounds i8, ptr %.pn240, i64 16
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %78) #12
  %80 = icmp ugt i64 %79, 8191
  br i1 %80, label %81, label %84

81:                                               ; preds = %76
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str.10, ptr noundef %23) #11
  br label %345

84:                                               ; preds = %76
  %85 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) %78, i64 noundef 8192) #10
  %86 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %78) #12
  store i64 %86, ptr %8, align 8, !tbaa !9
  br label %111

87:                                               ; preds = %71
  %88 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %30, ptr noundef nonnull dereferenceable(1) @.str.11) #12
  %.not152 = icmp eq i32 %88, 0
  br i1 %.not152, label %89, label %105

89:                                               ; preds = %87
  %90 = add nsw i32 %.0101.in239, -2
  %91 = icmp eq i32 %.0101.in239, 2
  br i1 %91, label %108, label %92

92:                                               ; preds = %89
  %93 = getelementptr inbounds i8, ptr %.pn240, i64 16
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %94) #12
  %96 = icmp ugt i64 %95, 16382
  br i1 %96, label %97, label %100

97:                                               ; preds = %92
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.12, ptr noundef %23) #11
  br label %345

100:                                              ; preds = %92
  %101 = call i32 @hex_to_bytes(ptr noundef %94, i64 noundef %95, ptr noundef nonnull %7, ptr noundef nonnull %8) #10
  %.not153 = icmp eq i32 %101, 1
  br i1 %.not153, label %111, label %102

102:                                              ; preds = %100
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.13, ptr noundef %23) #11
  br label %345

105:                                              ; preds = %87
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.14, ptr noundef %23, ptr noundef %30) #11
  br label %345

108:                                              ; preds = %89, %73, %58, %39
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.15, ptr noundef %23, ptr noundef %30) #11
  br label %345

111:                                              ; preds = %54, %52, %41, %84, %100, %60
  %.1102 = phi i32 [ %90, %100 ], [ %74, %84 ], [ %61, %60 ], [ %42, %41 ], [ %.0101248, %52 ], [ %.0101248, %54 ]
  %.1100 = phi ptr [ %93, %100 ], [ %77, %84 ], [ %62, %60 ], [ %43, %41 ], [ %.099247, %52 ], [ %.099247, %54 ]
  %.195 = phi ptr [ %.094241, %100 ], [ %.094241, %84 ], [ %.094241, %60 ], [ %44, %41 ], [ %.094241, %52 ], [ %.094241, %54 ]
  %.193 = phi ptr [ %.092242, %100 ], [ %.092242, %84 ], [ %63, %60 ], [ %.092242, %41 ], [ %.092242, %52 ], [ %.092242, %54 ]
  %.190 = phi ptr [ %.089243, %100 ], [ %.089243, %84 ], [ %.089243, %60 ], [ %45, %41 ], [ %.089243, %52 ], [ %.089243, %54 ]
  %.187 = phi ptr [ %.086244, %100 ], [ %.086244, %84 ], [ %64, %60 ], [ %.086244, %41 ], [ %.086244, %52 ], [ %.086244, %54 ]
  %.184 = phi i32 [ %.083245, %100 ], [ %.083245, %84 ], [ %.083245, %60 ], [ %.083245, %41 ], [ 1, %52 ], [ %.083245, %54 ]
  %.1 = phi i32 [ %.0246, %100 ], [ %.0246, %84 ], [ %.0246, %60 ], [ %.0246, %41 ], [ %.0246, %52 ], [ 1, %54 ]
  %112 = icmp sgt i32 %.1102, 1
  br i1 %112, label %.preheader, label %113, !llvm.loop !13

113:                                              ; preds = %111
  %.not = icmp eq ptr %.195, null
  br i1 %.not, label %114, label %117

114:                                              ; preds = %113
  %115 = load ptr, ptr @stderr, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.16, ptr noundef %23) #11
  br label %.thread

117:                                              ; preds = %113
  %.not118 = icmp eq ptr %.193, null
  br i1 %.not118, label %118, label %121

118:                                              ; preds = %117
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef nonnull @.str.17, ptr noundef %23) #11
  br label %345

121:                                              ; preds = %117
  %122 = load i64, ptr %8, align 8, !tbaa !9
  %.not119 = icmp eq i64 %122, 0
  br i1 %.not119, label %123, label %125

123:                                              ; preds = %121
  %124 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.18) #10
  store i64 16, ptr %8, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %123, %121
  %126 = call i32 @x509_cert_from_pem(ptr noundef nonnull %3, ptr noundef nonnull %4, i64 noundef 1024, ptr noundef %.190) #10
  %.not120 = icmp eq i32 %126, 1
  br i1 %.not120, label %127, label %133

127:                                              ; preds = %125
  %128 = load i64, ptr %4, align 8, !tbaa !9
  %129 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef nonnull %3, i64 noundef %128, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %9, ptr noundef nonnull %10) #10
  %.not121 = icmp eq i32 %129, 1
  br i1 %.not121, label %130, label %133

130:                                              ; preds = %127
  %131 = load i64, ptr %4, align 8, !tbaa !9
  %132 = call i32 @x509_cert_get_subject(ptr noundef nonnull %3, i64 noundef %131, ptr noundef nonnull %13, ptr noundef nonnull %14) #10
  %.not122 = icmp eq i32 %132, 1
  br i1 %.not122, label %136, label %133

133:                                              ; preds = %130, %127, %125
  %134 = load ptr, ptr @stderr, align 8, !tbaa !5
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef nonnull @.str.19, ptr noundef %23) #11
  br label %345

136:                                              ; preds = %130
  %137 = load ptr, ptr @stdout, align 8, !tbaa !5
  %138 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %137, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.20) #10
  %139 = load ptr, ptr @stdout, align 8, !tbaa !5
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = load i64, ptr %10, align 8, !tbaa !9
  %142 = call i32 @format_bytes(ptr noundef %139, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.21, ptr noundef %140, i64 noundef %141) #10
  %143 = load ptr, ptr @stdout, align 8, !tbaa !5
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = load i64, ptr %14, align 8, !tbaa !9
  %146 = call i32 @x509_name_print(ptr noundef %143, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.22, ptr noundef %144, i64 noundef %145) #10
  %.not123 = icmp eq i32 %.184, 0
  br i1 %.not123, label %173, label %147

147:                                              ; preds = %136
  %148 = call i32 @x509_cert_from_pem(ptr noundef nonnull %21, ptr noundef nonnull %22, i64 noundef 1024, ptr noundef %.190) #10
  %.not124 = icmp eq i32 %148, 1
  br i1 %.not124, label %149, label %155

149:                                              ; preds = %147
  %150 = load i64, ptr %22, align 8, !tbaa !9
  %151 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef nonnull %21, i64 noundef %150, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %15, ptr noundef nonnull %16) #10
  %.not125 = icmp eq i32 %151, 1
  br i1 %.not125, label %152, label %155

152:                                              ; preds = %149
  %153 = load i64, ptr %22, align 8, !tbaa !9
  %154 = call i32 @x509_cert_get_subject(ptr noundef nonnull %21, i64 noundef %153, ptr noundef nonnull %19, ptr noundef nonnull %20) #10
  %.not126 = icmp eq i32 %154, 1
  br i1 %.not126, label %158, label %155

155:                                              ; preds = %152, %149, %147
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef nonnull @.str.23, ptr noundef %23) #11
  br label %345

158:                                              ; preds = %152
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = load i64, ptr %20, align 8, !tbaa !9
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = load i64, ptr %14, align 8, !tbaa !9
  %163 = call i32 @x509_name_equ(ptr noundef %159, i64 noundef %160, ptr noundef %161, i64 noundef %162) #10
  %.not127 = icmp eq i32 %163, 1
  br i1 %.not127, label %164, label %170

164:                                              ; preds = %158
  %165 = load ptr, ptr %17, align 8, !tbaa !5
  %166 = load i64, ptr %18, align 8, !tbaa !9
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = load i64, ptr %12, align 8, !tbaa !9
  %169 = call i32 @x509_name_equ(ptr noundef %165, i64 noundef %166, ptr noundef %167, i64 noundef %168) #10
  %.not128 = icmp eq i32 %169, 1
  br i1 %.not128, label %173, label %170

170:                                              ; preds = %164, %158
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef nonnull @.str.24, ptr noundef %23) #11
  br label %345

173:                                              ; preds = %164, %136
  %174 = call i32 @x509_cert_from_pem(ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef 1024, ptr noundef %.190) #10
  %.not129249 = icmp eq i32 %174, 1
  br i1 %.not129249, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %244, %173
  %.285.lcssa = phi i32 [ %.184, %173 ], [ 0, %244 ]
  %.2.lcssa = phi i32 [ %.1, %173 ], [ 0, %244 ]
  %.lcssa = phi i32 [ %174, %173 ], [ %255, %244 ]
  %175 = icmp slt i32 %.lcssa, 0
  br i1 %175, label %345, label %256

.lr.ph:                                           ; preds = %173, %244
  %.2251 = phi i32 [ 0, %244 ], [ %.1, %173 ]
  %.285250 = phi i32 [ 0, %244 ], [ %.184, %173 ]
  %176 = load i64, ptr %4, align 8, !tbaa !9
  %177 = load i64, ptr %6, align 8, !tbaa !9
  %178 = load i64, ptr %8, align 8, !tbaa !9
  %179 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef nonnull %3, i64 noundef %176, ptr noundef nonnull %5, i64 noundef %177, ptr noundef nonnull %7, i64 noundef %178) #10
  %.not130 = icmp eq i32 %179, 1
  br i1 %.not130, label %183, label %180

180:                                              ; preds = %.lr.ph
  %181 = load ptr, ptr @stderr, align 8, !tbaa !5
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef nonnull @.str.25, ptr noundef %23) #11
  br label %345

183:                                              ; preds = %.lr.ph
  %184 = load ptr, ptr @stdout, align 8, !tbaa !5
  %185 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %184, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.26) #10
  %.not131 = icmp eq i32 %.2251, 0
  br i1 %.not131, label %199, label %186

186:                                              ; preds = %183
  %187 = load i64, ptr %4, align 8, !tbaa !9
  %188 = load i64, ptr %6, align 8, !tbaa !9
  %189 = load i64, ptr %8, align 8, !tbaa !9
  %190 = call i32 @x509_cert_check_crl(ptr noundef nonnull %3, i64 noundef %187, ptr noundef nonnull %5, i64 noundef %188, ptr noundef nonnull %7, i64 noundef %189) #10
  %191 = icmp slt i32 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %186
  %193 = load ptr, ptr @stderr, align 8, !tbaa !5
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef nonnull @.str.27, ptr noundef %23) #11
  br label %345

195:                                              ; preds = %186
  %196 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not132 = icmp eq i32 %190, 0
  %197 = select i1 %.not132, ptr @.str.30, ptr @.str.29
  %198 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %196, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.28, ptr noundef nonnull %197) #10
  br label %199

199:                                              ; preds = %195, %183
  %.not133 = icmp eq i32 %.285250, 0
  br i1 %.not133, label %235, label %200

200:                                              ; preds = %199
  %201 = load i64, ptr %22, align 8, !tbaa !9
  %202 = load i64, ptr %6, align 8, !tbaa !9
  %203 = load i64, ptr %8, align 8, !tbaa !9
  %204 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef nonnull %21, i64 noundef %201, ptr noundef nonnull %5, i64 noundef %202, ptr noundef nonnull %7, i64 noundef %203) #10
  %205 = icmp slt i32 %204, 0
  br i1 %205, label %206, label %209

206:                                              ; preds = %200
  %207 = load ptr, ptr @stderr, align 8, !tbaa !5
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef nonnull @.str.25, ptr noundef %23) #11
  br label %345

209:                                              ; preds = %200
  %210 = load ptr, ptr @stdout, align 8, !tbaa !5
  %211 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %210, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.20) #10
  %212 = load ptr, ptr @stdout, align 8, !tbaa !5
  %213 = load ptr, ptr %15, align 8, !tbaa !5
  %214 = load i64, ptr %16, align 8, !tbaa !9
  %215 = call i32 @format_bytes(ptr noundef %212, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.21, ptr noundef %213, i64 noundef %214) #10
  %216 = load ptr, ptr @stdout, align 8, !tbaa !5
  %217 = load ptr, ptr %19, align 8, !tbaa !5
  %218 = load i64, ptr %20, align 8, !tbaa !9
  %219 = call i32 @x509_name_print(ptr noundef %216, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.22, ptr noundef %217, i64 noundef %218) #10
  %220 = load ptr, ptr @stdout, align 8, !tbaa !5
  %221 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %220, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.26) #10
  br i1 %.not131, label %235, label %222

222:                                              ; preds = %209
  %223 = load i64, ptr %22, align 8, !tbaa !9
  %224 = load i64, ptr %6, align 8, !tbaa !9
  %225 = load i64, ptr %8, align 8, !tbaa !9
  %226 = call i32 @x509_cert_check_crl(ptr noundef nonnull %21, i64 noundef %223, ptr noundef nonnull %5, i64 noundef %224, ptr noundef nonnull %7, i64 noundef %225) #10
  %227 = icmp slt i32 %226, 0
  br i1 %227, label %228, label %231

228:                                              ; preds = %222
  %229 = load ptr, ptr @stderr, align 8, !tbaa !5
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef nonnull @.str.27, ptr noundef %23) #11
  br label %345

231:                                              ; preds = %222
  %232 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not134 = icmp eq i32 %226, 0
  %233 = select i1 %.not134, ptr @.str.30, ptr @.str.29
  %234 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %232, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.28, ptr noundef nonnull %233) #10
  br label %235

235:                                              ; preds = %209, %231, %199
  %236 = load i64, ptr %6, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %3, ptr nonnull align 16 %5, i64 %236, i1 false)
  store i64 %236, ptr %4, align 8, !tbaa !9
  %237 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef nonnull %3, i64 noundef %236, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %9, ptr noundef nonnull %10) #10
  %.not135 = icmp eq i32 %237, 1
  br i1 %.not135, label %238, label %241

238:                                              ; preds = %235
  %239 = load i64, ptr %4, align 8, !tbaa !9
  %240 = call i32 @x509_cert_get_subject(ptr noundef nonnull %3, i64 noundef %239, ptr noundef nonnull %13, ptr noundef nonnull %14) #10
  %.not136 = icmp eq i32 %240, 1
  br i1 %.not136, label %244, label %241

241:                                              ; preds = %235, %238
  %242 = load ptr, ptr @stderr, align 8, !tbaa !5
  %243 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %242, ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.32, i32 noundef 241, ptr noundef nonnull @__FUNCTION__.certverify_main) #11
  br label %345

244:                                              ; preds = %238
  %245 = load ptr, ptr @stdout, align 8, !tbaa !5
  %246 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %245, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.33) #10
  %247 = load ptr, ptr @stdout, align 8, !tbaa !5
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  %249 = load i64, ptr %10, align 8, !tbaa !9
  %250 = call i32 @format_bytes(ptr noundef %247, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.21, ptr noundef %248, i64 noundef %249) #10
  %251 = load ptr, ptr @stdout, align 8, !tbaa !5
  %252 = load ptr, ptr %13, align 8, !tbaa !5
  %253 = load i64, ptr %14, align 8, !tbaa !9
  %254 = call i32 @x509_name_print(ptr noundef %251, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.34, ptr noundef %252, i64 noundef %253) #10
  %255 = call i32 @x509_cert_from_pem(ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef 1024, ptr noundef %.190) #10
  %.not129 = icmp eq i32 %255, 1
  br i1 %.not129, label %.lr.ph, label %._crit_edge

256:                                              ; preds = %._crit_edge
  %257 = load ptr, ptr %11, align 8, !tbaa !5
  %258 = load i64, ptr %12, align 8, !tbaa !9
  %259 = call i32 @x509_cert_from_pem_by_subject(ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef 1024, ptr noundef %257, i64 noundef %258, ptr noundef %.187) #10
  %.not137 = icmp eq i32 %259, 1
  br i1 %.not137, label %263, label %260

260:                                              ; preds = %256
  %261 = load ptr, ptr @stderr, align 8, !tbaa !5
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef nonnull @.str.35, ptr noundef %23) #11
  br label %345

263:                                              ; preds = %256
  %264 = load i64, ptr %4, align 8, !tbaa !9
  %265 = load i64, ptr %6, align 8, !tbaa !9
  %266 = load i64, ptr %8, align 8, !tbaa !9
  %267 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef nonnull %3, i64 noundef %264, ptr noundef nonnull %5, i64 noundef %265, ptr noundef nonnull %7, i64 noundef %266) #10
  %268 = icmp slt i32 %267, 0
  br i1 %268, label %269, label %272

269:                                              ; preds = %263
  %270 = load ptr, ptr @stderr, align 8, !tbaa !5
  %271 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %270, ptr noundef nonnull @.str.36, ptr noundef %23) #11
  br label %345

272:                                              ; preds = %263
  %273 = load ptr, ptr @stdout, align 8, !tbaa !5
  %274 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %273, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.26) #10
  %.not138 = icmp eq i32 %.2.lcssa, 0
  br i1 %.not138, label %288, label %275

275:                                              ; preds = %272
  %276 = load i64, ptr %4, align 8, !tbaa !9
  %277 = load i64, ptr %6, align 8, !tbaa !9
  %278 = load i64, ptr %8, align 8, !tbaa !9
  %279 = call i32 @x509_cert_check_crl(ptr noundef nonnull %3, i64 noundef %276, ptr noundef nonnull %5, i64 noundef %277, ptr noundef nonnull %7, i64 noundef %278) #10
  %280 = icmp slt i32 %279, 0
  br i1 %280, label %281, label %284

281:                                              ; preds = %275
  %282 = load ptr, ptr @stderr, align 8, !tbaa !5
  %283 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef nonnull @.str.37, ptr noundef %23) #11
  br label %345

284:                                              ; preds = %275
  %285 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not139 = icmp eq i32 %279, 0
  %286 = select i1 %.not139, ptr @.str.30, ptr @.str.29
  %287 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %285, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.28, ptr noundef nonnull %286) #10
  br label %288

288:                                              ; preds = %284, %272
  %.not140 = icmp eq i32 %.285.lcssa, 0
  br i1 %.not140, label %324, label %289

289:                                              ; preds = %288
  %290 = load i64, ptr %22, align 8, !tbaa !9
  %291 = load i64, ptr %6, align 8, !tbaa !9
  %292 = load i64, ptr %8, align 8, !tbaa !9
  %293 = call i32 @x509_cert_verify_by_ca_cert(ptr noundef nonnull %21, i64 noundef %290, ptr noundef nonnull %5, i64 noundef %291, ptr noundef nonnull %7, i64 noundef %292) #10
  %294 = icmp slt i32 %293, 0
  br i1 %294, label %295, label %298

295:                                              ; preds = %289
  %296 = load ptr, ptr @stderr, align 8, !tbaa !5
  %297 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %296, ptr noundef nonnull @.str.36, ptr noundef %23) #11
  br label %345

298:                                              ; preds = %289
  %299 = load ptr, ptr @stdout, align 8, !tbaa !5
  %300 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %299, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.20) #10
  %301 = load ptr, ptr @stdout, align 8, !tbaa !5
  %302 = load ptr, ptr %15, align 8, !tbaa !5
  %303 = load i64, ptr %16, align 8, !tbaa !9
  %304 = call i32 @format_bytes(ptr noundef %301, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.21, ptr noundef %302, i64 noundef %303) #10
  %305 = load ptr, ptr @stdout, align 8, !tbaa !5
  %306 = load ptr, ptr %19, align 8, !tbaa !5
  %307 = load i64, ptr %20, align 8, !tbaa !9
  %308 = call i32 @x509_name_print(ptr noundef %305, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.22, ptr noundef %306, i64 noundef %307) #10
  %309 = load ptr, ptr @stdout, align 8, !tbaa !5
  %310 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %309, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.26) #10
  br i1 %.not138, label %324, label %311

311:                                              ; preds = %298
  %312 = load i64, ptr %22, align 8, !tbaa !9
  %313 = load i64, ptr %6, align 8, !tbaa !9
  %314 = load i64, ptr %8, align 8, !tbaa !9
  %315 = call i32 @x509_cert_check_crl(ptr noundef nonnull %21, i64 noundef %312, ptr noundef nonnull %5, i64 noundef %313, ptr noundef nonnull %7, i64 noundef %314) #10
  %316 = icmp slt i32 %315, 0
  br i1 %316, label %317, label %320

317:                                              ; preds = %311
  %318 = load ptr, ptr @stderr, align 8, !tbaa !5
  %319 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %318, ptr noundef nonnull @.str.37, ptr noundef %23) #11
  br label %345

320:                                              ; preds = %311
  %321 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not141 = icmp eq i32 %315, 0
  %322 = select i1 %.not141, ptr @.str.30, ptr @.str.29
  %323 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %321, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.28, ptr noundef nonnull %322) #10
  br label %324

324:                                              ; preds = %298, %320, %288
  %325 = load i64, ptr %6, align 8, !tbaa !9
  %326 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef nonnull %5, i64 noundef %325, ptr noundef null, ptr noundef null, ptr noundef nonnull %9, ptr noundef nonnull %10) #10
  %.not142 = icmp eq i32 %326, 1
  br i1 %.not142, label %327, label %330

327:                                              ; preds = %324
  %328 = load i64, ptr %6, align 8, !tbaa !9
  %329 = call i32 @x509_cert_get_subject(ptr noundef nonnull %5, i64 noundef %328, ptr noundef nonnull %13, ptr noundef nonnull %14) #10
  %.not143 = icmp eq i32 %329, 1
  br i1 %.not143, label %333, label %330

330:                                              ; preds = %327, %324
  %331 = load ptr, ptr @stderr, align 8, !tbaa !5
  %332 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %331, ptr noundef nonnull @.str.38, ptr noundef %23) #11
  br label %345

333:                                              ; preds = %327
  %334 = load ptr, ptr @stdout, align 8, !tbaa !5
  %335 = call i32 (ptr, i32, i32, ptr, ...) @format_print(ptr noundef %334, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.33) #10
  %336 = load ptr, ptr @stdout, align 8, !tbaa !5
  %337 = load ptr, ptr %9, align 8, !tbaa !5
  %338 = load i64, ptr %10, align 8, !tbaa !9
  %339 = call i32 @format_bytes(ptr noundef %336, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.21, ptr noundef %337, i64 noundef %338) #10
  %340 = load ptr, ptr @stdout, align 8, !tbaa !5
  %341 = load ptr, ptr %13, align 8, !tbaa !5
  %342 = load i64, ptr %14, align 8, !tbaa !9
  %343 = call i32 @x509_name_print(ptr noundef %340, i32 noundef 0, i32 noundef 4, ptr noundef nonnull @.str.22, ptr noundef %341, i64 noundef %342) #10
  %344 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  br label %345

345:                                              ; preds = %._crit_edge, %333, %330, %317, %295, %281, %269, %260, %241, %228, %206, %192, %180, %170, %155, %133, %118, %108, %105, %102, %97, %81, %65, %32
  %.094227 = phi ptr [ %.094241, %105 ], [ %.094241, %108 ], [ %.094241, %97 ], [ %.094241, %102 ], [ %.094241, %81 ], [ %.094241, %65 ], [ %.094241, %32 ], [ %.195, %133 ], [ %.195, %155 ], [ %.195, %170 ], [ %.195, %._crit_edge ], [ %.195, %260 ], [ %.195, %269 ], [ %.195, %281 ], [ %.195, %295 ], [ %.195, %317 ], [ %.195, %330 ], [ %.195, %333 ], [ %.195, %180 ], [ %.195, %192 ], [ %.195, %206 ], [ %.195, %228 ], [ %.195, %241 ], [ %.195, %118 ]
  %.089210 = phi ptr [ %.089243, %105 ], [ %.089243, %108 ], [ %.089243, %97 ], [ %.089243, %102 ], [ %.089243, %81 ], [ %.089243, %65 ], [ %.089243, %32 ], [ %.190, %133 ], [ %.190, %155 ], [ %.190, %170 ], [ %.190, %._crit_edge ], [ %.190, %260 ], [ %.190, %269 ], [ %.190, %281 ], [ %.190, %295 ], [ %.190, %317 ], [ %.190, %330 ], [ %.190, %333 ], [ %.190, %180 ], [ %.190, %192 ], [ %.190, %206 ], [ %.190, %228 ], [ %.190, %241 ], [ %.190, %118 ]
  %.098 = phi i32 [ 1, %105 ], [ 1, %108 ], [ 1, %97 ], [ 1, %102 ], [ 1, %81 ], [ 1, %65 ], [ 0, %32 ], [ 1, %133 ], [ 1, %155 ], [ 1, %170 ], [ 1, %._crit_edge ], [ 1, %260 ], [ 1, %269 ], [ 1, %281 ], [ 1, %295 ], [ 1, %317 ], [ 1, %330 ], [ 0, %333 ], [ 1, %180 ], [ 1, %192 ], [ 1, %206 ], [ 1, %228 ], [ 1, %241 ], [ 1, %118 ]
  %.288 = phi ptr [ %.086244, %105 ], [ %.086244, %108 ], [ %.086244, %97 ], [ %.086244, %102 ], [ %.086244, %81 ], [ null, %65 ], [ %.086244, %32 ], [ %.187, %133 ], [ %.187, %155 ], [ %.187, %170 ], [ %.187, %._crit_edge ], [ %.187, %260 ], [ %.187, %269 ], [ %.187, %281 ], [ %.187, %295 ], [ %.187, %317 ], [ %.187, %330 ], [ %.187, %333 ], [ %.187, %180 ], [ %.187, %192 ], [ %.187, %206 ], [ %.187, %228 ], [ %.187, %241 ], [ %.187, %118 ]
  %346 = icmp ne ptr %.094227, null
  %347 = icmp ne ptr %.089210, null
  %or.cond = select i1 %346, i1 %347, i1 false
  br i1 %or.cond, label %348, label %.thread

348:                                              ; preds = %345
  %349 = call i32 @fclose(ptr noundef nonnull %.089210)
  br label %.thread

.thread:                                          ; preds = %46, %114, %348, %345
  %.288161 = phi ptr [ %.288, %348 ], [ %.288, %345 ], [ %.187, %114 ], [ %.086244, %46 ]
  %.098160 = phi i32 [ %.098, %348 ], [ %.098, %345 ], [ 1, %114 ], [ 1, %46 ]
  %.not154 = icmp eq ptr %.288161, null
  br i1 %.not154, label %352, label %350

350:                                              ; preds = %.thread
  %351 = call i32 @fclose(ptr noundef nonnull %.288161)
  br label %352

352:                                              ; preds = %.thread, %350, %26
  %.097 = phi i32 [ 1, %26 ], [ %.098160, %350 ], [ %.098160, %.thread ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #10
  ret i32 %.097
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #7

declare i32 @hex_to_bytes(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #7

declare i32 @x509_cert_from_pem(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #8

declare i32 @x509_cert_get_issuer_and_serial_number(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

declare i32 @x509_cert_get_subject(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

declare i32 @format_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #8

declare i32 @format_bytes(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #8

declare i32 @x509_name_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #8

declare i32 @x509_name_equ(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #8

declare i32 @x509_cert_verify_by_ca_cert(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #8

declare i32 @x509_cert_check_crl(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #9

declare i32 @x509_cert_from_pem_by_subject(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

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

!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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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