; LLVM IR from openanolis/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 [64 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 %172

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 %172

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 %172

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 %172

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 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = call i32 @X509_STORE_add_cert(ptr noundef %87, ptr noundef %88)
  %90 = call ptr @X509_VERIFY_PARAM_new()
  store ptr %90, ptr %13, align 8, !tbaa !5
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %91, i64 noundef 2097152)
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %93, i64 noundef 32)
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %95, i64 noundef 524288)
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %97, i64 noundef 4)
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = call i32 @X509_STORE_set1_param(ptr noundef %99, ptr noundef %100)
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  call void @X509_STORE_set_verify_cb(ptr noundef %102, ptr noundef @cb)
  %103 = call ptr @X509_STORE_CTX_new()
  store ptr %103, ptr %14, align 8, !tbaa !5
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %107

106:                                              ; preds = %76
  br label %172

107:                                              ; preds = %76
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = call i32 @X509_STORE_CTX_init(ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef null)
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %127

114:                                              ; preds = %107
  %115 = call ptr @OPENSSL_sk_new_null()
  store ptr %115, ptr %16, align 8, !tbaa !5
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = icmp eq ptr %116, null
  br i1 %117, label %118, label %119

118:                                              ; preds = %114
  br label %172

119:                                              ; preds = %114
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %120)
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = call ptr @ossl_check_X509_CRL_type(ptr noundef %122)
  %124 = call i32 @OPENSSL_sk_push(ptr noundef %121, ptr noundef %123)
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  call void @X509_STORE_CTX_set0_crls(ptr noundef %125, ptr noundef %126)
  br label %127

127:                                              ; preds = %119, %107
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = call i32 @X509_verify_cert(ptr noundef %128)
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %135

132:                                              ; preds = %127
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = call ptr @OCSP_response_get1_basic(ptr noundef %133)
  store ptr %134, ptr %19, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %132, %127
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %171

138:                                              ; preds = %135
  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
  %139 = call ptr @OPENSSL_sk_new_null()
  store ptr %139, ptr %17, align 8, !tbaa !5
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  %141 = icmp eq ptr %140, null
  br i1 %141, label %142, label %143

142:                                              ; preds = %138
  store i32 2, ptr %26, align 4
  br label %168

143:                                              ; preds = %138
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = call ptr @ossl_check_X509_sk_type(ptr noundef %144)
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = call ptr @ossl_check_X509_type(ptr noundef %146)
  %148 = call i32 @OPENSSL_sk_push(ptr noundef %145, ptr noundef %147)
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = call ptr @ossl_check_X509_sk_type(ptr noundef %149)
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = call ptr @ossl_check_X509_type(ptr noundef %151)
  %153 = call i32 @OPENSSL_sk_push(ptr noundef %150, ptr noundef %152)
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = call i32 @OCSP_basic_verify(ptr noundef %154, ptr noundef %155, ptr noundef %156, i64 noundef 4096)
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = call ptr @OCSP_cert_to_id(ptr noundef null, ptr noundef %158, ptr noundef %159)
  store ptr %160, ptr %20, align 8, !tbaa !5
  %161 = load ptr, ptr %20, align 8, !tbaa !5
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %164

163:                                              ; preds = %143
  store i32 2, ptr %26, align 4
  br label %168

164:                                              ; preds = %143
  %165 = load ptr, ptr %19, align 8, !tbaa !5
  %166 = load ptr, ptr %20, align 8, !tbaa !5
  %167 = call i32 @OCSP_resp_find_status(ptr noundef %165, ptr noundef %166, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25)
  store i32 0, ptr %26, align 4
  br label %168

168:                                              ; preds = %164, %163, %142
  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
  %169 = load i32, ptr %26, align 4
  switch i32 %169, label %186 [
    i32 0, label %170
    i32 2, label %172
  ]

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %170, %135
  br label %172

172:                                              ; preds = %171, %168, %118, %106, %75, %62, %39, %33
  %173 = load ptr, ptr %14, align 8, !tbaa !5
  call void @X509_STORE_CTX_free(ptr noundef %173)
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  call void @X509_VERIFY_PARAM_free(ptr noundef %174)
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  call void @X509_STORE_free(ptr noundef %175)
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  call void @X509_free(ptr noundef %176)
  %177 = load ptr, ptr %11, align 8, !tbaa !5
  call void @X509_free(ptr noundef %177)
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  call void @X509_CRL_free(ptr noundef %178)
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  call void @OCSP_CERTID_free(ptr noundef %179)
  %180 = load ptr, ptr %19, align 8, !tbaa !5
  call void @OCSP_BASICRESP_free(ptr noundef %180)
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  call void @OCSP_RESPONSE_free(ptr noundef %181)
  %182 = load ptr, ptr %16, align 8, !tbaa !5
  %183 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %182)
  call void @OPENSSL_sk_free(ptr noundef %183)
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = call ptr @ossl_check_X509_sk_type(ptr noundef %184)
  call void @OPENSSL_sk_free(ptr noundef %185)
  call void @ERR_clear_error()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %186

186:                                              ; preds = %172, %168
  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
  %187 = load i32, ptr %3, align 4
  ret i32 %187
}

; 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 [64 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 = call i32 @X509_STORE_add_cert(ptr noundef %39, ptr noundef nonnull %26) #4
  %41 = call ptr @X509_VERIFY_PARAM_new() #4
  %42 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %41, i64 noundef 2097152) #4
  %43 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %41, i64 noundef 32) #4
  %44 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %41, i64 noundef 524288) #4
  %45 = call i32 @X509_VERIFY_PARAM_set_flags(ptr noundef %41, i64 noundef 4) #4
  %46 = call i32 @X509_STORE_set1_param(ptr noundef %39, ptr noundef %41) #4
  call void @X509_STORE_set_verify_cb(ptr noundef %39, ptr noundef nonnull @cb) #4
  %47 = call ptr @X509_STORE_CTX_new() #4
  %48 = icmp eq ptr %47, null
  br i1 %48, label %.thread, label %49

49:                                               ; preds = %34
  %50 = call i32 @X509_STORE_CTX_init(ptr noundef nonnull %47, ptr noundef %39, ptr noundef nonnull %10, ptr noundef null) #4
  %51 = call ptr @OPENSSL_sk_new_null() #4
  %52 = icmp eq ptr %51, null
  br i1 %52, label %.thread, label %53

53:                                               ; preds = %49
  %54 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef nonnull %51)
  %55 = call ptr @ossl_check_X509_CRL_type(ptr noundef nonnull %32)
  %56 = call i32 @OPENSSL_sk_push(ptr noundef %54, ptr noundef %55) #4
  call void @X509_STORE_CTX_set0_crls(ptr noundef nonnull %47, ptr noundef nonnull %51) #4
  %57 = call i32 @X509_verify_cert(ptr noundef nonnull %47) #4
  %.not = icmp eq ptr %38, null
  br i1 %.not, label %.thread, label %58

58:                                               ; preds = %53
  %59 = call ptr @OCSP_response_get1_basic(ptr noundef nonnull %38) #4
  %.not97 = icmp eq ptr %59, null
  br i1 %.not97, label %.thread, label %60

60:                                               ; preds = %58
  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
  %61 = call ptr @OPENSSL_sk_new_null() #4
  %62 = icmp eq ptr %61, null
  br i1 %62, label %75, label %63

63:                                               ; preds = %60
  %64 = call ptr @ossl_check_X509_sk_type(ptr noundef nonnull %61)
  %65 = call ptr @ossl_check_X509_type(ptr noundef nonnull %10)
  %66 = call i32 @OPENSSL_sk_push(ptr noundef %64, ptr noundef %65) #4
  %67 = call ptr @ossl_check_X509_sk_type(ptr noundef nonnull %61)
  %68 = call ptr @ossl_check_X509_type(ptr noundef nonnull %26)
  %69 = call i32 @OPENSSL_sk_push(ptr noundef %67, ptr noundef %68) #4
  %70 = call i32 @OCSP_basic_verify(ptr noundef nonnull %59, ptr noundef nonnull %61, ptr noundef %39, i64 noundef 4096) #4
  %71 = call ptr @OCSP_cert_to_id(ptr noundef null, ptr noundef nonnull %10, ptr noundef nonnull %26) #4
  %72 = icmp eq ptr %71, null
  br i1 %72, label %75, label %73

73:                                               ; preds = %63
  %74 = call i32 @OCSP_resp_find_status(ptr noundef nonnull %59, ptr noundef nonnull %71, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  br label %75

75:                                               ; preds = %63, %60, %73
  %.069 = phi ptr [ %71, %73 ], [ null, %60 ], [ null, %63 ]
  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 = %53, %75, %58, %49, %34, %28, %16, %12, %2
  %.080 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ %26, %28 ], [ %26, %34 ], [ %26, %49 ], [ %26, %75 ], [ %26, %58 ], [ %26, %53 ]
  %.079 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %39, %34 ], [ %39, %49 ], [ %39, %75 ], [ %39, %58 ], [ %39, %53 ]
  %.078 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %41, %34 ], [ %41, %49 ], [ %41, %75 ], [ %41, %58 ], [ %41, %53 ]
  %.077 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ %47, %49 ], [ %47, %75 ], [ %47, %58 ], [ %47, %53 ]
  %.076 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %32, %34 ], [ %32, %49 ], [ %32, %75 ], [ %32, %58 ], [ %32, %53 ]
  %.175 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %49 ], [ %51, %75 ], [ %51, %58 ], [ %51, %53 ]
  %.073 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %49 ], [ %61, %75 ], [ null, %58 ], [ null, %53 ]
  %.072 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ %38, %34 ], [ %38, %49 ], [ %38, %75 ], [ %38, %58 ], [ null, %53 ]
  %.171 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %49 ], [ %59, %75 ], [ null, %58 ], [ null, %53 ]
  %.1 = phi ptr [ null, %2 ], [ null, %12 ], [ null, %16 ], [ null, %28 ], [ null, %34 ], [ null, %49 ], [ %.069, %75 ], [ null, %58 ], [ null, %53 ]
  call void @X509_STORE_CTX_free(ptr noundef %.077) #4
  call void @X509_VERIFY_PARAM_free(ptr noundef %.078) #4
  call void @X509_STORE_free(ptr noundef %.079) #4
  call void @X509_free(ptr noundef %10) #4
  call void @X509_free(ptr noundef %.080) #4
  call void @X509_CRL_free(ptr noundef %.076) #4
  call void @OCSP_CERTID_free(ptr noundef %.1) #4
  call void @OCSP_BASICRESP_free(ptr noundef %.171) #4
  call void @OCSP_RESPONSE_free(ptr noundef %.072) #4
  %76 = call ptr @ossl_check_X509_CRL_sk_type(ptr noundef %.175)
  call void @OPENSSL_sk_free(ptr noundef %76) #4
  %77 = call ptr @ossl_check_X509_sk_type(ptr noundef %.073)
  call void @OPENSSL_sk_free(ptr noundef %77) #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