; LLVM IR from guanzhi/GmSSL :: src (cms)

; 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.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@__FUNCTION__.cms_deenvelop_and_verify = external hidden unnamed_addr constant [25 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cms_content_info_from_der(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @asn1_length_is_zero(i64 noundef) #3

declare i32 @asn1_check(i32 noundef) #3

declare i32 @x509_cert_get_subject_public_key(ptr noundef, i64 noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cms_signed_and_enveloped_data_decipher_from_der(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @cms_deenvelop_and_verify(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23) #2 {
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i64, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i64, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca i64, align 8
  %52 = alloca ptr, align 8
  %53 = alloca i64, align 8
  %54 = alloca %struct.SM2_KEY, align 8
  %55 = alloca i32, align 4
  %56 = alloca ptr, align 8
  %57 = alloca i64, align 8
  %58 = alloca i32, align 4
  store ptr %0, ptr %26, align 8, !tbaa !5
  store i64 %1, ptr %27, align 8, !tbaa !9
  store ptr %2, ptr %28, align 8, !tbaa !5
  store ptr %3, ptr %29, align 8, !tbaa !5
  store i64 %4, ptr %30, align 8, !tbaa !9
  store ptr %5, ptr %31, align 8, !tbaa !5
  store i64 %6, ptr %32, align 8, !tbaa !9
  store ptr %7, ptr %33, align 8, !tbaa !5
  store i64 %8, ptr %34, align 8, !tbaa !9
  store ptr %9, ptr %35, align 8, !tbaa !5
  store ptr %10, ptr %36, align 8, !tbaa !5
  store ptr %11, ptr %37, align 8, !tbaa !5
  store ptr %12, ptr %38, align 8, !tbaa !5
  store ptr %13, ptr %39, align 8, !tbaa !5
  store ptr %14, ptr %40, align 8, !tbaa !5
  store ptr %15, ptr %41, align 8, !tbaa !5
  store ptr %16, ptr %42, align 8, !tbaa !5
  store ptr %17, ptr %43, align 8, !tbaa !5
  store ptr %18, ptr %44, align 8, !tbaa !5
  store ptr %19, ptr %45, align 8, !tbaa !5
  store ptr %20, ptr %46, align 8, !tbaa !5
  store ptr %21, ptr %47, align 8, !tbaa !5
  store ptr %22, ptr %48, align 8, !tbaa !5
  store ptr %23, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr %54) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #5
  %59 = call i32 @cms_content_info_from_der(ptr noundef %55, ptr noundef %56, ptr noundef %57, ptr noundef %26, ptr noundef %27)
  %60 = icmp ne i32 %59, 1
  br i1 %60, label %82, label %61

61:                                               ; preds = %24
  %62 = load i32, ptr %55, align 4, !tbaa !11
  %63 = icmp eq i32 %62, 121
  %64 = zext i1 %63 to i32
  %65 = call i32 @asn1_check(i32 noundef %64)
  %66 = icmp ne i32 %65, 1
  br i1 %66, label %82, label %67

67:                                               ; preds = %61
  %68 = load ptr, ptr %56, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %73

70:                                               ; preds = %67
  %71 = load i64, ptr %57, align 8, !tbaa !9
  %72 = icmp ne i64 %71, 0
  br label %73

73:                                               ; preds = %70, %67
  %74 = phi i1 [ false, %67 ], [ %72, %70 ]
  %75 = zext i1 %74 to i32
  %76 = call i32 @asn1_check(i32 noundef %75)
  %77 = icmp ne i32 %76, 1
  br i1 %77, label %82, label %78

78:                                               ; preds = %73
  %79 = load i64, ptr %27, align 8, !tbaa !9
  %80 = call i32 @asn1_length_is_zero(i64 noundef %79)
  %81 = icmp ne i32 %80, 1
  br i1 %81, label %82, label %88

82:                                               ; preds = %78, %73, %61, %24
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2378, ptr noundef @__FUNCTION__.cms_deenvelop_and_verify) #5
  br label %86

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  store i32 -1, ptr %25, align 4
  store i32 1, ptr %58, align 4
  br label %152

88:                                               ; preds = %78
  %89 = load ptr, ptr %29, align 8, !tbaa !5
  %90 = load i64, ptr %30, align 8, !tbaa !9
  %91 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %89, i64 noundef %90, ptr noundef %50, ptr noundef %51, ptr noundef %52, ptr noundef %53)
  %92 = icmp ne i32 %91, 1
  br i1 %92, label %98, label %93

93:                                               ; preds = %88
  %94 = load ptr, ptr %29, align 8, !tbaa !5
  %95 = load i64, ptr %30, align 8, !tbaa !9
  %96 = call i32 @x509_cert_get_subject_public_key(ptr noundef %94, i64 noundef %95, ptr noundef %54)
  %97 = icmp ne i32 %96, 1
  br i1 %97, label %98, label %104

98:                                               ; preds = %93, %88
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr @stderr, align 8, !tbaa !5
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2387, ptr noundef @__FUNCTION__.cms_deenvelop_and_verify) #5
  br label %102

102:                                              ; preds = %99
  br label %103

103:                                              ; preds = %102
  store i32 -1, ptr %25, align 4
  store i32 1, ptr %58, align 4
  br label %152

104:                                              ; preds = %93
  %105 = load ptr, ptr %28, align 8, !tbaa !5
  %106 = call i32 @memcmp(ptr noundef %54, ptr noundef %105, i64 noundef 64) #6
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %114

108:                                              ; preds = %104
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr @stderr, align 8, !tbaa !5
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2391, ptr noundef @__FUNCTION__.cms_deenvelop_and_verify) #5
  br label %112

112:                                              ; preds = %109
  br label %113

113:                                              ; preds = %112
  store i32 -1, ptr %25, align 4
  store i32 1, ptr %58, align 4
  br label %152

114:                                              ; preds = %104
  %115 = load ptr, ptr %28, align 8, !tbaa !5
  %116 = load ptr, ptr %50, align 8, !tbaa !5
  %117 = load i64, ptr %51, align 8, !tbaa !9
  %118 = load ptr, ptr %52, align 8, !tbaa !5
  %119 = load i64, ptr %53, align 8, !tbaa !9
  %120 = load ptr, ptr %35, align 8, !tbaa !5
  %121 = load ptr, ptr %36, align 8, !tbaa !5
  %122 = load ptr, ptr %37, align 8, !tbaa !5
  %123 = load ptr, ptr %38, align 8, !tbaa !5
  %124 = load ptr, ptr %39, align 8, !tbaa !5
  %125 = load ptr, ptr %46, align 8, !tbaa !5
  %126 = load ptr, ptr %47, align 8, !tbaa !5
  %127 = load ptr, ptr %48, align 8, !tbaa !5
  %128 = load ptr, ptr %49, align 8, !tbaa !5
  %129 = load ptr, ptr %42, align 8, !tbaa !5
  %130 = load ptr, ptr %43, align 8, !tbaa !5
  %131 = load ptr, ptr %44, align 8, !tbaa !5
  %132 = load ptr, ptr %45, align 8, !tbaa !5
  %133 = load ptr, ptr %40, align 8, !tbaa !5
  %134 = load ptr, ptr %41, align 8, !tbaa !5
  %135 = load ptr, ptr %31, align 8, !tbaa !5
  %136 = load i64, ptr %32, align 8, !tbaa !9
  %137 = load ptr, ptr %33, align 8, !tbaa !5
  %138 = load i64, ptr %34, align 8, !tbaa !9
  %139 = call i32 @cms_signed_and_enveloped_data_decipher_from_der(ptr noundef %115, ptr noundef %116, i64 noundef %117, ptr noundef %118, i64 noundef %119, ptr noundef %120, ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131, ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, i64 noundef %136, ptr noundef %137, i64 noundef %138, ptr noundef %56, ptr noundef %57)
  %140 = icmp ne i32 %139, 1
  br i1 %140, label %145, label %141

141:                                              ; preds = %114
  %142 = load i64, ptr %57, align 8, !tbaa !9
  %143 = call i32 @asn1_length_is_zero(i64 noundef %142)
  %144 = icmp ne i32 %143, 1
  br i1 %144, label %145, label %151

145:                                              ; preds = %141, %114
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2410, ptr noundef @__FUNCTION__.cms_deenvelop_and_verify) #5
  br label %149

149:                                              ; preds = %146
  br label %150

150:                                              ; preds = %149
  store i32 -1, ptr %25, align 4
  store i32 1, ptr %58, align 4
  br label %152

151:                                              ; preds = %141
  store i32 1, ptr %25, align 4
  store i32 1, ptr %58, align 4
  br label %152

152:                                              ; preds = %151, %150, %113, %103, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #5
  %153 = load i32, ptr %25, align 4
  ret i32 %153
}

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

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

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


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

%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@__FUNCTION__.cms_deenvelop_and_verify = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cms_content_info_from_der(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @asn1_length_is_zero(i64 noundef) local_unnamed_addr #3

declare i32 @asn1_check(i32 noundef) local_unnamed_addr #3

declare i32 @x509_cert_get_subject_public_key(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cms_signed_and_enveloped_data_decipher_from_der(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @cms_deenvelop_and_verify(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23) local_unnamed_addr #2 {
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca %struct.SM2_KEY, align 8
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i64, align 8
  store ptr %0, ptr %25, align 8, !tbaa !5
  store i64 %1, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %31) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #5
  %35 = call i32 @cms_content_info_from_der(ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef nonnull %34, ptr noundef nonnull %25, ptr noundef nonnull %26)
  %.not = icmp eq i32 %35, 1
  br i1 %.not, label %36, label %.sink.split

36:                                               ; preds = %24
  %37 = load i32, ptr %32, align 4, !tbaa !11
  %38 = icmp eq i32 %37, 121
  %39 = zext i1 %38 to i32
  %40 = call i32 @asn1_check(i32 noundef %39) #5
  %.not25 = icmp eq i32 %40, 1
  br i1 %.not25, label %41, label %.sink.split

41:                                               ; preds = %36
  %42 = load ptr, ptr %33, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  %44 = load i64, ptr %34, align 8
  %45 = icmp ne i64 %44, 0
  %46 = select i1 %43, i1 %45, i1 false
  %47 = zext i1 %46 to i32
  %48 = call i32 @asn1_check(i32 noundef %47) #5
  %.not26 = icmp eq i32 %48, 1
  br i1 %.not26, label %49, label %.sink.split

49:                                               ; preds = %41
  %50 = load i64, ptr %26, align 8, !tbaa !9
  %51 = call i32 @asn1_length_is_zero(i64 noundef %50) #5
  %.not27 = icmp eq i32 %51, 1
  br i1 %.not27, label %52, label %.sink.split

52:                                               ; preds = %49
  %53 = call i32 @x509_cert_get_issuer_and_serial_number(ptr noundef %3, i64 noundef %4, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %30) #5
  %.not28 = icmp eq i32 %53, 1
  br i1 %.not28, label %54, label %.sink.split

54:                                               ; preds = %52
  %55 = call i32 @x509_cert_get_subject_public_key(ptr noundef %3, i64 noundef %4, ptr noundef nonnull %31) #5
  %.not29 = icmp eq i32 %55, 1
  br i1 %.not29, label %56, label %.sink.split

56:                                               ; preds = %54
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %31, ptr noundef nonnull dereferenceable(64) %2, i64 64)
  %.not30 = icmp eq i32 %bcmp, 0
  br i1 %.not30, label %57, label %.sink.split

57:                                               ; preds = %56
  %58 = load ptr, ptr %27, align 8, !tbaa !5
  %59 = load i64, ptr %28, align 8, !tbaa !9
  %60 = load ptr, ptr %29, align 8, !tbaa !5
  %61 = load i64, ptr %30, align 8, !tbaa !9
  %62 = call i32 @cms_signed_and_enveloped_data_decipher_from_der(ptr noundef %2, ptr noundef %58, i64 noundef %59, ptr noundef %60, i64 noundef %61, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %14, ptr noundef %15, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef nonnull %33, ptr noundef nonnull %34)
  %.not31 = icmp eq i32 %62, 1
  br i1 %.not31, label %63, label %.sink.split

63:                                               ; preds = %57
  %64 = load i64, ptr %34, align 8, !tbaa !9
  %65 = call i32 @asn1_length_is_zero(i64 noundef %64) #5
  %.not32 = icmp eq i32 %65, 1
  br i1 %.not32, label %68, label %.sink.split

.sink.split:                                      ; preds = %63, %57, %56, %54, %52, %49, %41, %36, %24
  %.sink33 = phi i32 [ 2378, %24 ], [ 2378, %36 ], [ 2378, %41 ], [ 2378, %49 ], [ 2387, %52 ], [ 2387, %54 ], [ 2391, %56 ], [ 2410, %57 ], [ 2410, %63 ]
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef %.sink33, ptr noundef nonnull @__FUNCTION__.cms_deenvelop_and_verify) #6
  br label %68

68:                                               ; preds = %.sink.split, %63
  %.0 = phi i32 [ 1, %63 ], [ -1, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  ret i32 %.0
}

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

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


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