; LLVM IR from openanolis/openssl :: crypto/crmf (crmf_lib)

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

%struct.ossl_crmf_msg_st = type { ptr, ptr, ptr }
%struct.ossl_crmf_popo_st = type { i32, %union.anon.1 }
%union.anon.1 = type { ptr }
%struct.ossl_crmf_certrequest_st = type { ptr, ptr, ptr }
%struct.ossl_crmf_certtemplate_st = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ossl_crmf_poposigningkey_st = type { ptr, ptr, ptr }
%struct.ossl_crmf_poposigningkeyinput_st = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [75 x i8], align 1
@__func__.OSSL_CRMF_MSGS_verify_popo = external hidden unnamed_addr constant [27 x i8], align 1

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

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

declare void @ERR_new() #1

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) #1

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @OSSL_CRMF_MSGS_verify_popo(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %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 i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %26, label %20

20:                                               ; preds = %5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = call ptr @ossl_check_const_OSSL_CRMF_MSG_sk_type(ptr noundef %21)
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = call ptr @OPENSSL_sk_value(ptr noundef %22, i32 noundef %23)
  store ptr %24, ptr %12, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %20, %5
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 472, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 109, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

27:                                               ; preds = %20
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %27
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 477, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 121, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

33:                                               ; preds = %27
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = getelementptr inbounds %struct.ossl_crmf_popo_st, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !13
  switch i32 %38, label %121 [
    i32 0, label %39
    i32 1, label %44
    i32 2, label %120
    i32 3, label %120
  ]

39:                                               ; preds = %33
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 484, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 120, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

43:                                               ; preds = %39
  br label %122

44:                                               ; preds = %33
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = getelementptr inbounds %struct.ossl_crmf_certrequest_st, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %50 = getelementptr inbounds %struct.ossl_crmf_certtemplate_st, ptr %49, i32 0, i32 6
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  store ptr %51, ptr %13, align 8, !tbaa !5
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %55

54:                                               ; preds = %44
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 491, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 118, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

55:                                               ; preds = %44
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.ossl_crmf_popo_st, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  store ptr %60, ptr %14, align 8, !tbaa !5
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %88

65:                                               ; preds = %55
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !21
  %69 = getelementptr inbounds %struct.ossl_crmf_poposigningkeyinput_st, ptr %68, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %73

72:                                               ; preds = %65
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 502, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 118, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

73:                                               ; preds = %65
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  %78 = getelementptr inbounds %struct.ossl_crmf_poposigningkeyinput_st, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !23
  %80 = call i32 @X509_PUBKEY_eq(ptr noundef %74, ptr noundef %79)
  %81 = icmp ne i32 %80, 1
  br i1 %81, label %82, label %83

82:                                               ; preds = %73
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 506, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 117, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

83:                                               ; preds = %73
  %84 = call ptr @OSSL_CRMF_POPOSIGNINGKEYINPUT_it()
  store ptr %84, ptr %15, align 8, !tbaa !5
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !21
  store ptr %87, ptr %16, align 8, !tbaa !5
  br label %103

88:                                               ; preds = %55
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  %92 = getelementptr inbounds %struct.ossl_crmf_certrequest_st, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  %94 = getelementptr inbounds %struct.ossl_crmf_certtemplate_st, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !25
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %98

97:                                               ; preds = %88
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 519, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 119, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

98:                                               ; preds = %88
  %99 = call ptr @OSSL_CRMF_CERTREQUEST_it()
  store ptr %99, ptr %15, align 8, !tbaa !5
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ossl_crmf_msg_st, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  store ptr %102, ptr %16, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %98, %83
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !26
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ossl_crmf_poposigningkey_st, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !27
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = call ptr @X509_PUBKEY_get0(ptr noundef %112)
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = call i32 @ASN1_item_verify_ex(ptr noundef %104, ptr noundef %107, ptr noundef %110, ptr noundef %111, ptr noundef null, ptr noundef %113, ptr noundef %114, ptr noundef %115)
  %117 = icmp slt i32 %116, 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %103
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

119:                                              ; preds = %103
  br label %122

120:                                              ; preds = %33, %33
  br label %121

121:                                              ; preds = %120, %33
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 539, ptr noundef @__func__.OSSL_CRMF_MSGS_verify_popo)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 116, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

122:                                              ; preds = %119, %43
  store i32 1, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %123

123:                                              ; preds = %122, %121, %118, %97, %82, %72, %54, %42, %32, %26
  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
  %124 = load i32, ptr %6, align 4
  ret i32 %124
}

declare ptr @OPENSSL_sk_value(ptr noundef, i32 noundef) #1

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

declare i32 @X509_PUBKEY_eq(ptr noundef, ptr noundef) #1

declare ptr @OSSL_CRMF_POPOSIGNINGKEYINPUT_it() #1

declare ptr @OSSL_CRMF_CERTREQUEST_it() #1

declare i32 @ASN1_item_verify_ex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @X509_PUBKEY_get0(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"ossl_crmf_msg_st", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!14, !10, i64 0}
!14 = !{!"ossl_crmf_popo_st", !10, i64 0, !7, i64 8}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"ossl_crmf_certrequest_st", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!19, !6, i64 48}
!19 = !{!"ossl_crmf_certtemplate_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"ossl_crmf_poposigningkey_st", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !6, i64 8}
!24 = !{!"ossl_crmf_poposigningkeyinput_st", !6, i64 0, !6, i64 8}
!25 = !{!19, !6, i64 40}
!26 = !{!22, !6, i64 8}
!27 = !{!22, !6, i64 16}


; 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 [75 x i8], align 1
@__func__.OSSL_CRMF_MSGS_verify_popo = external hidden unnamed_addr constant [27 x i8], align 1

declare void @ERR_new() local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @OSSL_CRMF_MSGS_verify_popo(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = icmp eq ptr %0, null
  br i1 %6, label %11, label %7

7:                                                ; preds = %5
  %8 = tail call ptr @ossl_check_const_OSSL_CRMF_MSG_sk_type(ptr noundef nonnull %0)
  %9 = tail call ptr @OPENSSL_sk_value(ptr noundef %8, i32 noundef %1) #3
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %7, %5
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 472, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 109, ptr noundef null) #3
  br label %60

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %12
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 477, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 121, ptr noundef null) #3
  br label %60

17:                                               ; preds = %12
  %18 = load i32, ptr %14, align 8, !tbaa !10
  switch i32 %18, label %58 [
    i32 0, label %19
    i32 1, label %21
  ]

19:                                               ; preds = %17
  %.not32 = icmp eq i32 %2, 0
  br i1 %.not32, label %20, label %59

20:                                               ; preds = %19
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 484, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 120, ptr noundef null) #3
  br label %60

21:                                               ; preds = %17
  %22 = load ptr, ptr %9, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %24, i64 48
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %21
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 491, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 118, ptr noundef null) #3
  br label %60

29:                                               ; preds = %21
  %30 = getelementptr inbounds i8, ptr %14, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %.not = icmp eq ptr %32, null
  br i1 %.not, label %43, label %33

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %32, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %33
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 502, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 118, ptr noundef null) #3
  br label %60

38:                                               ; preds = %33
  %39 = tail call i32 @X509_PUBKEY_eq(ptr noundef nonnull %26, ptr noundef nonnull %35) #3
  %.not31 = icmp eq i32 %39, 1
  br i1 %.not31, label %41, label %40

40:                                               ; preds = %38
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 506, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 117, ptr noundef null) #3
  br label %60

41:                                               ; preds = %38
  %42 = tail call ptr @OSSL_CRMF_POPOSIGNINGKEYINPUT_it() #3
  br label %50

43:                                               ; preds = %29
  %44 = getelementptr inbounds i8, ptr %24, i64 40
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 519, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 119, ptr noundef null) #3
  br label %60

48:                                               ; preds = %43
  %49 = tail call ptr @OSSL_CRMF_CERTREQUEST_it() #3
  br label %50

50:                                               ; preds = %48, %41
  %.023 = phi ptr [ %42, %41 ], [ %49, %48 ]
  %.0.in = phi ptr [ %31, %41 ], [ %9, %48 ]
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !24
  %51 = getelementptr inbounds i8, ptr %31, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = getelementptr inbounds i8, ptr %31, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !26
  %55 = tail call ptr @X509_PUBKEY_get0(ptr noundef nonnull %26) #3
  %56 = tail call i32 @ASN1_item_verify_ex(ptr noundef %.023, ptr noundef %52, ptr noundef %54, ptr noundef %.0, ptr noundef null, ptr noundef %55, ptr noundef %3, ptr noundef %4) #3
  %57 = icmp slt i32 %56, 1
  br i1 %57, label %60, label %59

58:                                               ; preds = %17
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 539, ptr noundef nonnull @__func__.OSSL_CRMF_MSGS_verify_popo) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 56, i32 noundef 116, ptr noundef null) #3
  br label %60

59:                                               ; preds = %50, %19
  br label %60

60:                                               ; preds = %50, %59, %58, %47, %40, %37, %28, %20, %16, %11
  %.024 = phi i32 [ 0, %11 ], [ 0, %16 ], [ 0, %58 ], [ 0, %28 ], [ 0, %37 ], [ 0, %40 ], [ 1, %59 ], [ 0, %47 ], [ 0, %20 ], [ 0, %50 ]
  ret i32 %.024
}

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

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

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

declare ptr @OSSL_CRMF_POPOSIGNINGKEYINPUT_it() local_unnamed_addr #0

declare ptr @OSSL_CRMF_CERTREQUEST_it() local_unnamed_addr #0

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

declare ptr @X509_PUBKEY_get0(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 = { 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"ossl_crmf_msg_st", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !12, i64 0}
!11 = !{!"ossl_crmf_popo_st", !12, i64 0, !8, i64 8}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !7, i64 8}
!15 = !{!"ossl_crmf_certrequest_st", !7, i64 0, !7, i64 8, !7, i64 16}
!16 = !{!17, !7, i64 48}
!17 = !{!"ossl_crmf_certtemplate_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !7, i64 0}
!20 = !{!"ossl_crmf_poposigningkey_st", !7, i64 0, !7, i64 8, !7, i64 16}
!21 = !{!22, !7, i64 8}
!22 = !{!"ossl_crmf_poposigningkeyinput_st", !7, i64 0, !7, i64 8}
!23 = !{!17, !7, i64 40}
!24 = !{!7, !7, i64 0}
!25 = !{!20, !7, i64 8}
!26 = !{!20, !7, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass