; LLVM IR from openssl/openssl :: fuzz (x509)

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

@.str = external hidden unnamed_addr constant [61 x i8], align 1

declare void @ERR_clear_error() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @FuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, 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 ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %27, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %28 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %28, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store ptr null, ptr %20, align 8, !tbaa !5
  %29 = load i64, ptr %5, align 8, !tbaa !9
  %30 = call ptr @d2i_X509(ptr noundef null, ptr noundef %6, i64 noundef %29)
  store ptr %30, ptr %10, align 8, !tbaa !5
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %34

33:                                               ; preds = %2
  br label %186

34:                                               ; preds = %2
  %35 = call ptr @BIO_s_null()
  %36 = call ptr @BIO_new(ptr noundef %35)
  store ptr %36, ptr %9, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %34
  br label %186

40:                                               ; preds = %34
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = call i32 @X509_print(ptr noundef %41, ptr noundef %42)
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call i32 @BIO_free(ptr noundef %44)
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = call i64 @X509_issuer_and_serial_hash(ptr noundef %46)
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = call i32 @i2d_X509(ptr noundef %48, ptr noundef %8)
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %50, ptr noundef @.str, i32 noundef 65)
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = ptrtoint ptr %52 to i64
  %55 = ptrtoint ptr %53 to i64
  %56 = sub i64 %54, %55
  %57 = sub i64 %51, %56
  store i64 %57, ptr %5, align 8, !tbaa !9
  %58 = load i64, ptr %5, align 8, !tbaa !9
  %59 = call ptr @d2i_X509(ptr noundef null, ptr noundef %6, i64 noundef %58)
  store ptr %59, ptr %11, align 8, !tbaa !5
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = icmp eq ptr %60, null
  br i1 %61, label %62, label %63

62:                                               ; preds = %40
  br label %186

63:                                               ; preds = %40
  %64 = load i64, ptr %7, align 8, !tbaa !9
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = ptrtoint ptr %65 to i64
  %68 = ptrtoint ptr %66 to i64
  %69 = sub i64 %67, %68
  %70 = sub i64 %64, %69
  store i64 %70, ptr %5, align 8, !tbaa !9
  %71 = load i64, ptr %5, align 8, !tbaa !9
  %72 = call ptr @d2i_X509_CRL(ptr noundef null, ptr noundef %6, i64 noundef %71)
  store ptr %72, ptr %15, align 8, !tbaa !5
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = icmp eq ptr %73, null
  br i1 %74, label %75, label %76

75:                                               ; preds = %63
  br label %186

76:                                               ; preds = %63
  %77 = load i64, ptr %7, align 8, !tbaa !9
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = ptrtoint ptr %78 to i64
  %81 = ptrtoint ptr %79 to i64
  %82 = sub i64 %80, %81
  %83 = sub i64 %77, %82
  store i64 %83, ptr %5, align 8, !tbaa !9
  %84 = load i64, ptr %5, align 8, !tbaa !9
  %85 = call ptr @d2i_OCSP_RESPONSE(ptr noundef null, ptr noundef %6, i64 noundef %84)
  store ptr %85, ptr %18, align 8, !tbaa !5
  %86 = call ptr @X509_STORE_new()
  store ptr %86, ptr %12, align 8, !tbaa !5
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = icmp eq ptr %87, null
  br i1 %88, label %89, label %90

89:                                               ; preds = %76
  br label %186

90:                                               ; preds = %76
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = call i32 @X509_STORE_add_cert(ptr noundef %91, ptr noundef %92)
  %94 = call ptr @X509_VERIFY_PARAM_new()
  store ptr %94, ptr %13, align 8, !tbaa !5
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %98

97:                                               ; preds = %90
  br label %186

98:                                               ; preds = %90
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %99, i64 noundef 2097152)
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %101, i64 noundef 32)
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %103, i64 noundef 524288)
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %105, i64 noundef 4)
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  %109 = call i32 @X509_STORE_set1_param(ptr noundef %107, ptr noundef %108)
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  call void @X509_STORE_set_verify_cb(ptr noundef %110, ptr noundef @cb)
  %111 = call ptr @X509_STORE_CTX_new()
  store ptr %111, ptr %14, align 8, !tbaa !5
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %115

114:                                              ; preds = %98
  br label %186

115:                                              ; preds = %98
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = call i32 @X509_STORE_CTX_init(ptr noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef null)
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %137

122:                                              ; preds = %115
  %123 = call ptr @OPENSSL_sk_new_null()
  store ptr %123, ptr %16, align 8, !tbaa !5
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = icmp eq ptr %124, null
  br i1 %125, label %133, label %126

126:                                              ; preds = %122
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %127)
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = call ptr @ossl_check_X509_CRL_type(ptr noundef %129)
  %131 = call i32 @OPENSSL_sk_push(ptr noundef %128, ptr noundef %130)
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %134, label %133

133:                                              ; preds = %126, %122
  br label %186

134:                                              ; preds = %126
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = load ptr, ptr %16, align 8, !tbaa !5
  call void @X509_STORE_CTX_set0_crls(ptr noundef %135, ptr noundef %136)
  br label %137

137:                                              ; preds = %134, %115
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = call i32 @X509_verify_cert(ptr noundef %138)
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %145

142:                                              ; preds = %137
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  %144 = call ptr @OCSP_response_get1_basic(ptr noundef %143)
  store ptr %144, ptr %19, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %142, %137
  %146 = load ptr, ptr %19, align 8, !tbaa !5
  %147 = icmp ne ptr %146, null
  br i1 %147, label %148, label %185

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %149 = call ptr @OPENSSL_sk_new_null()
  store ptr %149, ptr %17, align 8, !tbaa !5
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = icmp eq ptr %150, null
  br i1 %151, label %166, label %152

152:                                              ; preds = %148
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = call ptr @ossl_check_X509_sk_type(ptr noundef %153)
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = call ptr @ossl_check_X509_type(ptr noundef %155)
  %157 = call i32 @OPENSSL_sk_push(ptr noundef %154, ptr noundef %156)
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %166

159:                                              ; preds = %152
  %160 = load ptr, ptr %17, align 8, !tbaa !5
  %161 = call ptr @ossl_check_X509_sk_type(ptr noundef %160)
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = call ptr @ossl_check_X509_type(ptr noundef %162)
  %164 = call i32 @OPENSSL_sk_push(ptr noundef %161, ptr noundef %163)
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %167, label %166

166:                                              ; preds = %159, %152, %148
  store i32 2, ptr %26, align 4
  br label %182

167:                                              ; preds = %159
  %168 = load ptr, ptr %19, align 8, !tbaa !5
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = call i32 @OCSP_basic_verify(ptr noundef %168, ptr noundef %169, ptr noundef %170, i64 noundef 4096)
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = load ptr, ptr %11, align 8, !tbaa !5
  %174 = call ptr @OCSP_cert_to_id(ptr noundef null, ptr noundef %172, ptr noundef %173)
  store ptr %174, ptr %20, align 8, !tbaa !5
  %175 = load ptr, ptr %20, align 8, !tbaa !5
  %176 = icmp eq ptr %175, null
  br i1 %176, label %177, label %178

177:                                              ; preds = %167
  store i32 2, ptr %26, align 4
  br label %182

178:                                              ; preds = %167
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = load ptr, ptr %20, align 8, !tbaa !5
  %181 = call i32 @OCSP_resp_find_status(ptr noundef %179, ptr noundef %180, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25)
  store i32 0, ptr %26, align 4
  br label %182

182:                                              ; preds = %178, %177, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  %183 = load i32, ptr %26, align 4
  switch i32 %183, label %200 [
    i32 0, label %184
    i32 2, label %186
  ]

184:                                              ; preds = %182
  br label %185

185:                                              ; preds = %184, %145
  br label %186

186:                                              ; preds = %185, %182, %133, %114, %97, %89, %75, %62, %39, %33
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  call void @X509_STORE_CTX_free(ptr noundef %187)
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  call void @X509_VERIFY_PARAM_free(ptr noundef %188)
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  call void @X509_STORE_free(ptr noundef %189)
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  call void @X509_free(ptr noundef %190)
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  call void @X509_free(ptr noundef %191)
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  call void @X509_CRL_free(ptr noundef %192)
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  call void @OCSP_CERTID_free(ptr noundef %193)
  %194 = load ptr, ptr %19, align 8, !tbaa !5
  call void @OCSP_BASICRESP_free(ptr noundef %194)
  %195 = load ptr, ptr %18, align 8, !tbaa !5
  call void @OCSP_RESPONSE_free(ptr noundef %195)
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %196)
  call void @OPENSSL_sk_free(ptr noundef %197)
  %198 = load ptr, ptr %17, align 8, !tbaa !5
  %199 = call ptr @ossl_check_X509_sk_type(ptr noundef %198)
  call void @OPENSSL_sk_free(ptr noundef %199)
  call void @ERR_clear_error()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %200

200:                                              ; preds = %186, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %201 = load i32, ptr %3, align 4
  ret i32 %201
}

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

declare ptr @d2i_X509(ptr noundef, ptr noundef, i64 noundef) #0

declare ptr @BIO_new(ptr noundef) #0

declare ptr @BIO_s_null() #0

declare i32 @X509_print(ptr noundef, ptr noundef) #0

declare i32 @BIO_free(ptr noundef) #0

declare i64 @X509_issuer_and_serial_hash(ptr noundef) #0

declare i32 @i2d_X509(ptr noundef, ptr noundef) #0

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) #0

declare ptr @d2i_X509_CRL(ptr noundef, ptr noundef, i64 noundef) #0

declare ptr @d2i_OCSP_RESPONSE(ptr noundef, ptr noundef, i64 noundef) #0

declare ptr @X509_STORE_new() #0

declare i32 @X509_STORE_add_cert(ptr noundef, ptr noundef) #0

declare ptr @X509_VERIFY_PARAM_new() #0

declare i32 @X509_VERIFY_PARAM_set_flags(ptr noundef, i64 noundef) #0

declare i32 @X509_STORE_set1_param(ptr noundef, ptr noundef) #0

declare void @X509_STORE_set_verify_cb(ptr noundef, ptr noundef) #0

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

declare ptr @X509_STORE_CTX_new() #0

declare i32 @X509_STORE_CTX_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare ptr @OPENSSL_sk_new_null() #0

declare i32 @OPENSSL_sk_push(ptr noundef, ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_CRL_sk_type(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_CRL_type(ptr noundef) #3

declare void @X509_STORE_CTX_set0_crls(ptr noundef, ptr noundef) #0

declare i32 @X509_verify_cert(ptr noundef) #0

declare ptr @OCSP_response_get1_basic(ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_sk_type(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_type(ptr noundef) #3

declare i32 @OCSP_basic_verify(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #0

declare ptr @OCSP_cert_to_id(ptr noundef, ptr noundef, ptr noundef) #0

declare i32 @OCSP_resp_find_status(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

declare void @X509_STORE_CTX_free(ptr noundef) #0

declare void @X509_VERIFY_PARAM_free(ptr noundef) #0

declare void @X509_STORE_free(ptr noundef) #0

declare void @X509_free(ptr noundef) #0

declare void @X509_CRL_free(ptr noundef) #0

declare void @OCSP_CERTID_free(ptr noundef) #0

declare void @OCSP_BASICRESP_free(ptr noundef) #0

declare void @OCSP_RESPONSE_free(ptr noundef) #0

declare void @OPENSSL_sk_free(ptr noundef) #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [61 x i8], align 1

declare void @ERR_clear_error() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @FuzzerTestOneInput(ptr noundef %0, i64 noundef %1) local_unnamed_addr #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr null, ptr %4, align 8, !tbaa !5
  %10 = call ptr @d2i_X509(ptr noundef null, ptr noundef nonnull %3, i64 noundef %1) #4
  %11 = icmp eq ptr %10, null
  br i1 %11, label %.thread, label %12

12:                                               ; preds = %2
  %13 = call ptr @BIO_s_null() #4
  %14 = call ptr @BIO_new(ptr noundef %13) #4
  %15 = icmp eq ptr %14, null
  br i1 %15, label %.thread, label %16

16:                                               ; preds = %12
  %17 = call i32 @X509_print(ptr noundef nonnull %14, ptr noundef nonnull %10) #4
  %18 = call i32 @BIO_free(ptr noundef nonnull %14) #4
  %19 = call i64 @X509_issuer_and_serial_hash(ptr noundef nonnull %10) #4
  %20 = call i32 @i2d_X509(ptr noundef nonnull %10, ptr noundef nonnull %4) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %21, ptr noundef nonnull @.str, i32 noundef 65) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = ptrtoint ptr %22 to i64
  %24 = ptrtoint ptr %0 to i64
  %.neg = add i64 %24, %1
  %25 = sub i64 %.neg, %23
  %26 = call ptr @d2i_X509(ptr noundef null, ptr noundef nonnull %3, i64 noundef %25) #4
  %27 = icmp eq ptr %26, null
  br i1 %27, label %.thread, label %28

28:                                               ; preds = %16
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = ptrtoint ptr %29 to i64
  %31 = sub i64 %.neg, %30
  %32 = call ptr @d2i_X509_CRL(ptr noundef null, ptr noundef nonnull %3, i64 noundef %31) #4
  %33 = icmp eq ptr %32, null
  br i1 %33, label %.thread, label %34

34:                                               ; preds = %28
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = ptrtoint ptr %35 to i64
  %37 = sub i64 %.neg, %36
  %38 = call ptr @d2i_OCSP_RESPONSE(ptr noundef null, ptr noundef nonnull %3, i64 noundef %37) #4
  %39 = call ptr @X509_STORE_new() #4
  %40 = icmp eq ptr %39, null
  br i1 %40, label %.thread, label %41

41:                                               ; preds = %34
  %42 = call i32 @X509_STORE_add_cert(ptr noundef nonnull %39, ptr noundef nonnull %26) #4
  %43 = call ptr @X509_VERIFY_PARAM_new() #4
  %44 = icmp eq ptr %43, null
  br i1 %44, label %.thread, label %45

45:                                               ; preds = %41
  %46 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef nonnull %43, i64 noundef 2097152) #4
  %47 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef nonnull %43, i64 noundef 32) #4
  %48 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef nonnull %43, i64 noundef 524288) #4
  %49 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef nonnull %43, i64 noundef 4) #4
  %50 = call i32 @X509_STORE_set1_param(ptr noundef nonnull %39, ptr noundef nonnull %43) #4
  call void @X509_STORE_set_verify_cb(ptr noundef nonnull %39, ptr noundef nonnull @cb) #4
  %51 = call ptr @X509_STORE_CTX_new() #4
  %52 = icmp eq ptr %51, null
  br i1 %52, label %.thread, label %53

53:                                               ; preds = %45
  %54 = call i32 @X509_STORE_CTX_init(ptr noundef nonnull %51, ptr noundef nonnull %39, ptr noundef nonnull %10, ptr noundef null) #4
  %55 = call ptr @OPENSSL_sk_new_null() #4
  %56 = icmp eq ptr %55, null
  br i1 %56, label %.thread, label %57

57:                                               ; preds = %53
  %58 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef nonnull %55)
  %59 = call ptr @ossl_check_X509_CRL_type(ptr noundef nonnull %32)
  %60 = call i32 @OPENSSL_sk_push(ptr noundef %58, ptr noundef %59) #4
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %.thread, label %61

61:                                               ; preds = %57
  call void @X509_STORE_CTX_set0_crls(ptr noundef nonnull %51, ptr noundef nonnull %55) #4
  %62 = call i32 @X509_verify_cert(ptr noundef nonnull %51) #4
  %.not103 = icmp eq ptr %38, null
  br i1 %.not103, label %.thread, label %63

63:                                               ; preds = %61
  %64 = call ptr @OCSP_response_get1_basic(ptr noundef nonnull %38) #4
  %.not104 = icmp eq ptr %64, null
  br i1 %.not104, label %.thread, label %65

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %66 = call ptr @OPENSSL_sk_new_null() #4
  %67 = icmp eq ptr %66, null
  br i1 %67, label %82, label %68

68:                                               ; preds = %65
  %69 = call ptr @ossl_check_X509_sk_type(ptr noundef nonnull %66)
  %70 = call ptr @ossl_check_X509_type(ptr noundef nonnull %10)
  %71 = call i32 @OPENSSL_sk_push(ptr noundef %69, ptr noundef %70) #4
  %.not105 = icmp eq i32 %71, 0
  br i1 %.not105, label %82, label %72

72:                                               ; preds = %68
  %73 = call ptr @ossl_check_X509_sk_type(ptr noundef nonnull %66)
  %74 = call ptr @ossl_check_X509_type(ptr noundef nonnull %26)
  %75 = call i32 @OPENSSL_sk_push(ptr noundef %73, ptr noundef %74) #4
  %.not106 = icmp eq i32 %75, 0
  br i1 %.not106, label %82, label %76

76:                                               ; preds = %72
  %77 = call i32 @OCSP_basic_verify(ptr noundef nonnull %64, ptr noundef nonnull %66, ptr noundef nonnull %39, i64 noundef 4096) #4
  %78 = call ptr @OCSP_cert_to_id(ptr noundef null, ptr noundef nonnull %10, ptr noundef nonnull %26) #4
  %79 = icmp eq ptr %78, null
  br i1 %79, label %82, label %80

80:                                               ; preds = %76
  %81 = call i32 @OCSP_resp_find_status(ptr noundef nonnull %64, ptr noundef nonnull %78, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  br label %82

82:                                               ; preds = %76, %65, %68, %72, %80
  %.071 = phi ptr [ %78, %80 ], [ null, %72 ], [ null, %68 ], [ null, %65 ], [ null, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %.thread

.thread:                                          ; preds = %61, %82, %63, %53, %57, %45, %41, %34, %28, %16, %12, %2
  %.082 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ %26, %28 ], [ %26, %34 ], [ %26, %41 ], [ %26, %45 ], [ %26, %53 ], [ %26, %82 ], [ %26, %63 ], [ %26, %57 ], [ %26, %61 ]
  %.081 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ %39, %41 ], [ %39, %45 ], [ %39, %53 ], [ %39, %82 ], [ %39, %63 ], [ %39, %57 ], [ %39, %61 ]
  %.080 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ %43, %45 ], [ %43, %53 ], [ %43, %82 ], [ %43, %63 ], [ %43, %57 ], [ %43, %61 ]
  %.079 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ null, %45 ], [ %51, %53 ], [ %51, %82 ], [ %51, %63 ], [ %51, %57 ], [ %51, %61 ]
  %.078 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %32, %34 ], [ %32, %41 ], [ %32, %45 ], [ %32, %53 ], [ %32, %82 ], [ %32, %63 ], [ %32, %57 ], [ %32, %61 ]
  %.177 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ null, %45 ], [ null, %53 ], [ %55, %82 ], [ %55, %63 ], [ %55, %57 ], [ %55, %61 ]
  %.075 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ null, %45 ], [ null, %53 ], [ %66, %82 ], [ null, %63 ], [ null, %57 ], [ null, %61 ]
  %.074 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %38, %34 ], [ %38, %41 ], [ %38, %45 ], [ %38, %53 ], [ %38, %82 ], [ %38, %63 ], [ %38, %57 ], [ null, %61 ]
  %.173 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ null, %45 ], [ null, %53 ], [ %64, %82 ], [ null, %63 ], [ null, %57 ], [ null, %61 ]
  %.1 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %41 ], [ null, %45 ], [ null, %53 ], [ %.071, %82 ], [ null, %63 ], [ null, %57 ], [ null, %61 ]
  call void @X509_STORE_CTX_free(ptr noundef %.079) #4
  call void @X509_VERIFY_PARAM_free(ptr noundef %.080) #4
  call void @X509_STORE_free(ptr noundef %.081) #4
  call void @X509_free(ptr noundef %10) #4
  call void @X509_free(ptr noundef %.082) #4
  call void @X509_CRL_free(ptr noundef %.078) #4
  call void @OCSP_CERTID_free(ptr noundef %.1) #4
  call void @OCSP_BASICRESP_free(ptr noundef %.173) #4
  call void @OCSP_RESPONSE_free(ptr noundef %.074) #4
  %83 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %.177)
  call void @OPENSSL_sk_free(ptr noundef %83) #4
  %84 = call ptr @ossl_check_X509_sk_type(ptr noundef %.075)
  call void @OPENSSL_sk_free(ptr noundef %84) #4
  call void @ERR_clear_error() #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 0
}

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

declare ptr @d2i_X509(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @BIO_new(ptr noundef) local_unnamed_addr #0

declare ptr @BIO_s_null() local_unnamed_addr #0

declare i32 @X509_print(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @BIO_free(ptr noundef) local_unnamed_addr #0

declare i64 @X509_issuer_and_serial_hash(ptr noundef) local_unnamed_addr #0

declare i32 @i2d_X509(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @d2i_X509_CRL(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @d2i_OCSP_RESPONSE(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @X509_STORE_new() local_unnamed_addr #0

declare i32 @X509_STORE_add_cert(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @X509_VERIFY_PARAM_new() local_unnamed_addr #0

declare i32 @X509_VERIFY_PARAM_set_flags(ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @X509_STORE_set1_param(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @X509_STORE_set_verify_cb(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare ptr @X509_STORE_CTX_new() local_unnamed_addr #0

declare i32 @X509_STORE_CTX_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @OPENSSL_sk_new_null() local_unnamed_addr #0

declare i32 @OPENSSL_sk_push(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_CRL_sk_type(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_CRL_type(ptr noundef) local_unnamed_addr #3

declare void @X509_STORE_CTX_set0_crls(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @X509_verify_cert(ptr noundef) local_unnamed_addr #0

declare ptr @OCSP_response_get1_basic(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_sk_type(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_X509_type(ptr noundef) local_unnamed_addr #3

declare i32 @OCSP_basic_verify(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @OCSP_cert_to_id(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @OCSP_resp_find_status(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare void @X509_STORE_CTX_free(ptr noundef) local_unnamed_addr #0

declare void @X509_VERIFY_PARAM_free(ptr noundef) local_unnamed_addr #0

declare void @X509_STORE_free(ptr noundef) local_unnamed_addr #0

declare void @X509_free(ptr noundef) local_unnamed_addr #0

declare void @X509_CRL_free(ptr noundef) local_unnamed_addr #0

declare void @OCSP_CERTID_free(ptr noundef) local_unnamed_addr #0

declare void @OCSP_BASICRESP_free(ptr noundef) local_unnamed_addr #0

declare void @OCSP_RESPONSE_free(ptr noundef) local_unnamed_addr #0

declare void @OPENSSL_sk_free(ptr noundef) local_unnamed_addr #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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