; LLVM IR from openanolis/openssl :: crypto/sm2 (sm2_crypt)

; 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_Ciphertext_st = type { ptr, ptr, ptr, ptr }

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

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

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

declare void @ERR_new() #2

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @ec_field_size(ptr noundef) #0

declare ptr @EC_KEY_get0_group(ptr noundef) #2

declare i32 @EVP_MD_get_size(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_sm2_encrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, 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 ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.SM2_Ciphertext_st, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %37 = call ptr @EVP_MD_CTX_new()
  store ptr %37, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = call ptr @EC_KEY_get0_group(ptr noundef %38)
  store ptr %39, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %40 = load ptr, ptr %24, align 8, !tbaa !5
  %41 = call ptr @EC_GROUP_get0_order(ptr noundef %40)
  store ptr %41, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call ptr @EC_KEY_get0_public_key(ptr noundef %42)
  store ptr %43, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  store ptr null, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  store ptr null, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  store ptr null, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call i32 @EVP_MD_get_size(ptr noundef %44)
  store i32 %45, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  store ptr null, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call ptr @ossl_ec_key_get_libctx(ptr noundef %46)
  store ptr %47, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call ptr @ossl_ec_key_get0_propq(ptr noundef %48)
  store ptr %49, ptr %36, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 3
  store ptr null, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 2
  store ptr null, ptr %51, align 8, !tbaa !15
  %52 = load ptr, ptr %22, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %57, label %54

54:                                               ; preds = %6
  %55 = load i32, ptr %33, align 4, !tbaa !11
  %56 = icmp sle i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %54, %6
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 142, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

58:                                               ; preds = %54
  %59 = load ptr, ptr %24, align 8, !tbaa !5
  %60 = call i64 @ec_field_size(ptr noundef %59)
  store i64 %60, ptr %32, align 8, !tbaa !9
  %61 = load i64, ptr %32, align 8, !tbaa !9
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 148, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

64:                                               ; preds = %58
  %65 = load ptr, ptr %24, align 8, !tbaa !5
  %66 = call ptr @EC_POINT_new(ptr noundef %65)
  store ptr %66, ptr %27, align 8, !tbaa !5
  %67 = load ptr, ptr %24, align 8, !tbaa !5
  %68 = call ptr @EC_POINT_new(ptr noundef %67)
  store ptr %68, ptr %28, align 8, !tbaa !5
  %69 = load ptr, ptr %27, align 8, !tbaa !5
  %70 = icmp eq ptr %69, null
  br i1 %70, label %74, label %71

71:                                               ; preds = %64
  %72 = load ptr, ptr %28, align 8, !tbaa !5
  %73 = icmp eq ptr %72, null
  br i1 %73, label %74, label %75

74:                                               ; preds = %71, %64
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 155, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524304, ptr noundef null)
  br label %289

75:                                               ; preds = %71
  %76 = load ptr, ptr %35, align 8, !tbaa !5
  %77 = call ptr @BN_CTX_new_ex(ptr noundef %76)
  store ptr %77, ptr %16, align 8, !tbaa !5
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 160, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524291, ptr noundef null)
  br label %289

81:                                               ; preds = %75
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  call void @BN_CTX_start(ptr noundef %82)
  %83 = load ptr, ptr %16, align 8, !tbaa !5
  %84 = call ptr @BN_CTX_get(ptr noundef %83)
  store ptr %84, ptr %17, align 8, !tbaa !5
  %85 = load ptr, ptr %16, align 8, !tbaa !5
  %86 = call ptr @BN_CTX_get(ptr noundef %85)
  store ptr %86, ptr %18, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = call ptr @BN_CTX_get(ptr noundef %87)
  store ptr %88, ptr %20, align 8, !tbaa !5
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = call ptr @BN_CTX_get(ptr noundef %89)
  store ptr %90, ptr %19, align 8, !tbaa !5
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = call ptr @BN_CTX_get(ptr noundef %91)
  store ptr %92, ptr %21, align 8, !tbaa !5
  %93 = load ptr, ptr %21, align 8, !tbaa !5
  %94 = icmp eq ptr %93, null
  br i1 %94, label %95, label %96

95:                                               ; preds = %81
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 172, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524291, ptr noundef null)
  br label %289

96:                                               ; preds = %81
  %97 = load i64, ptr %32, align 8, !tbaa !9
  %98 = mul i64 2, %97
  %99 = call ptr @CRYPTO_zalloc(i64 noundef %98, ptr noundef @.str.1, i32 noundef 176)
  store ptr %99, ptr %30, align 8, !tbaa !5
  %100 = load i32, ptr %33, align 4, !tbaa !11
  %101 = sext i32 %100 to i64
  %102 = call ptr @CRYPTO_zalloc(i64 noundef %101, ptr noundef @.str.1, i32 noundef 177)
  store ptr %102, ptr %31, align 8, !tbaa !5
  %103 = load ptr, ptr %30, align 8, !tbaa !5
  %104 = icmp eq ptr %103, null
  br i1 %104, label %108, label %105

105:                                              ; preds = %96
  %106 = load ptr, ptr %31, align 8, !tbaa !5
  %107 = icmp eq ptr %106, null
  br i1 %107, label %108, label %109

108:                                              ; preds = %105, %96
  br label %289

109:                                              ; preds = %105
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = load i64, ptr %111, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 1 %110, i8 0, i64 %112, i1 false)
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = load ptr, ptr %25, align 8, !tbaa !5
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = call i32 @BN_priv_rand_range_ex(ptr noundef %113, ptr noundef %114, i32 noundef 0, ptr noundef %115)
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %119, label %118

118:                                              ; preds = %109
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 185, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

119:                                              ; preds = %109
  %120 = load ptr, ptr %24, align 8, !tbaa !5
  %121 = load ptr, ptr %27, align 8, !tbaa !5
  %122 = load ptr, ptr %17, align 8, !tbaa !5
  %123 = load ptr, ptr %16, align 8, !tbaa !5
  %124 = call i32 @EC_POINT_mul(ptr noundef %120, ptr noundef %121, ptr noundef %122, ptr noundef null, ptr noundef null, ptr noundef %123)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %150

126:                                              ; preds = %119
  %127 = load ptr, ptr %24, align 8, !tbaa !5
  %128 = load ptr, ptr %27, align 8, !tbaa !5
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = call i32 @EC_POINT_get_affine_coordinates(ptr noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131)
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %150

134:                                              ; preds = %126
  %135 = load ptr, ptr %24, align 8, !tbaa !5
  %136 = load ptr, ptr %28, align 8, !tbaa !5
  %137 = load ptr, ptr %26, align 8, !tbaa !5
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = load ptr, ptr %16, align 8, !tbaa !5
  %140 = call i32 @EC_POINT_mul(ptr noundef %135, ptr noundef %136, ptr noundef null, ptr noundef %137, ptr noundef %138, ptr noundef %139)
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %150

142:                                              ; preds = %134
  %143 = load ptr, ptr %24, align 8, !tbaa !5
  %144 = load ptr, ptr %28, align 8, !tbaa !5
  %145 = load ptr, ptr %20, align 8, !tbaa !5
  %146 = load ptr, ptr %21, align 8, !tbaa !5
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = call i32 @EC_POINT_get_affine_coordinates(ptr noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146, ptr noundef %147)
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %151, label %150

150:                                              ; preds = %142, %134, %126, %119
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 193, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524304, ptr noundef null)
  br label %289

151:                                              ; preds = %142
  %152 = load ptr, ptr %20, align 8, !tbaa !5
  %153 = load ptr, ptr %30, align 8, !tbaa !5
  %154 = load i64, ptr %32, align 8, !tbaa !9
  %155 = trunc i64 %154 to i32
  %156 = call i32 @BN_bn2binpad(ptr noundef %152, ptr noundef %153, i32 noundef %155)
  %157 = icmp slt i32 %156, 0
  br i1 %157, label %167, label %158

158:                                              ; preds = %151
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  %160 = load ptr, ptr %30, align 8, !tbaa !5
  %161 = load i64, ptr %32, align 8, !tbaa !9
  %162 = getelementptr inbounds i8, ptr %160, i64 %161
  %163 = load i64, ptr %32, align 8, !tbaa !9
  %164 = trunc i64 %163 to i32
  %165 = call i32 @BN_bn2binpad(ptr noundef %159, ptr noundef %162, i32 noundef %164)
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %158, %151
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 199, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

168:                                              ; preds = %158
  %169 = load i64, ptr %10, align 8, !tbaa !9
  %170 = call ptr @CRYPTO_zalloc(i64 noundef %169, ptr noundef @.str.1, i32 noundef 203)
  store ptr %170, ptr %29, align 8, !tbaa !5
  %171 = load ptr, ptr %29, align 8, !tbaa !5
  %172 = icmp eq ptr %171, null
  br i1 %172, label %173, label %174

173:                                              ; preds = %168
  br label %289

174:                                              ; preds = %168
  %175 = load ptr, ptr %29, align 8, !tbaa !5
  %176 = load i64, ptr %10, align 8, !tbaa !9
  %177 = load ptr, ptr %30, align 8, !tbaa !5
  %178 = load i64, ptr %32, align 8, !tbaa !9
  %179 = mul i64 2, %178
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load ptr, ptr %35, align 8, !tbaa !5
  %182 = load ptr, ptr %36, align 8, !tbaa !5
  %183 = call i32 @ossl_ecdh_kdf_X9_63(ptr noundef %175, i64 noundef %176, ptr noundef %177, i64 noundef %179, ptr noundef null, i64 noundef 0, ptr noundef %180, ptr noundef %181, ptr noundef %182)
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %186, label %185

185:                                              ; preds = %174
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 210, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524294, ptr noundef null)
  br label %289

186:                                              ; preds = %174
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %204, %186
  %188 = load i64, ptr %15, align 8, !tbaa !9
  %189 = load i64, ptr %10, align 8, !tbaa !9
  %190 = icmp ne i64 %188, %189
  br i1 %190, label %191, label %207

191:                                              ; preds = %187
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = load i64, ptr %15, align 8, !tbaa !9
  %194 = getelementptr inbounds i8, ptr %192, i64 %193
  %195 = load i8, ptr %194, align 1, !tbaa !16
  %196 = zext i8 %195 to i32
  %197 = load ptr, ptr %29, align 8, !tbaa !5
  %198 = load i64, ptr %15, align 8, !tbaa !9
  %199 = getelementptr inbounds i8, ptr %197, i64 %198
  %200 = load i8, ptr %199, align 1, !tbaa !16
  %201 = zext i8 %200 to i32
  %202 = xor i32 %201, %196
  %203 = trunc i32 %202 to i8
  store i8 %203, ptr %199, align 1, !tbaa !16
  br label %204

204:                                              ; preds = %191
  %205 = load i64, ptr %15, align 8, !tbaa !9
  %206 = add i64 %205, 1
  store i64 %206, ptr %15, align 8, !tbaa !9
  br label %187, !llvm.loop !17

207:                                              ; preds = %187
  %208 = load ptr, ptr %35, align 8, !tbaa !5
  %209 = load ptr, ptr %8, align 8, !tbaa !5
  %210 = call ptr @EVP_MD_get0_name(ptr noundef %209)
  %211 = load ptr, ptr %36, align 8, !tbaa !5
  %212 = call ptr @EVP_MD_fetch(ptr noundef %208, ptr noundef %210, ptr noundef %211)
  store ptr %212, ptr %34, align 8, !tbaa !5
  %213 = load ptr, ptr %34, align 8, !tbaa !5
  %214 = icmp eq ptr %213, null
  br i1 %214, label %215, label %216

215:                                              ; preds = %207
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 219, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

216:                                              ; preds = %207
  %217 = load ptr, ptr %22, align 8, !tbaa !5
  %218 = load ptr, ptr %34, align 8, !tbaa !5
  %219 = call i32 @EVP_DigestInit(ptr noundef %217, ptr noundef %218)
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %246, label %221

221:                                              ; preds = %216
  %222 = load ptr, ptr %22, align 8, !tbaa !5
  %223 = load ptr, ptr %30, align 8, !tbaa !5
  %224 = load i64, ptr %32, align 8, !tbaa !9
  %225 = call i32 @EVP_DigestUpdate(ptr noundef %222, ptr noundef %223, i64 noundef %224)
  %226 = icmp eq i32 %225, 0
  br i1 %226, label %246, label %227

227:                                              ; preds = %221
  %228 = load ptr, ptr %22, align 8, !tbaa !5
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = load i64, ptr %10, align 8, !tbaa !9
  %231 = call i32 @EVP_DigestUpdate(ptr noundef %228, ptr noundef %229, i64 noundef %230)
  %232 = icmp eq i32 %231, 0
  br i1 %232, label %246, label %233

233:                                              ; preds = %227
  %234 = load ptr, ptr %22, align 8, !tbaa !5
  %235 = load ptr, ptr %30, align 8, !tbaa !5
  %236 = load i64, ptr %32, align 8, !tbaa !9
  %237 = getelementptr inbounds i8, ptr %235, i64 %236
  %238 = load i64, ptr %32, align 8, !tbaa !9
  %239 = call i32 @EVP_DigestUpdate(ptr noundef %234, ptr noundef %237, i64 noundef %238)
  %240 = icmp eq i32 %239, 0
  br i1 %240, label %246, label %241

241:                                              ; preds = %233
  %242 = load ptr, ptr %22, align 8, !tbaa !5
  %243 = load ptr, ptr %31, align 8, !tbaa !5
  %244 = call i32 @EVP_DigestFinal(ptr noundef %242, ptr noundef %243, ptr noundef null)
  %245 = icmp eq i32 %244, 0
  br i1 %245, label %246, label %247

246:                                              ; preds = %241, %233, %227, %221, %216
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 227, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524294, ptr noundef null)
  br label %289

247:                                              ; preds = %241
  %248 = load ptr, ptr %18, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 0
  store ptr %248, ptr %249, align 8, !tbaa !19
  %250 = load ptr, ptr %19, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 1
  store ptr %250, ptr %251, align 8, !tbaa !20
  %252 = call ptr @ASN1_OCTET_STRING_new()
  %253 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 2
  store ptr %252, ptr %253, align 8, !tbaa !15
  %254 = call ptr @ASN1_OCTET_STRING_new()
  %255 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 3
  store ptr %254, ptr %255, align 8, !tbaa !13
  %256 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 2
  %257 = load ptr, ptr %256, align 8, !tbaa !15
  %258 = icmp eq ptr %257, null
  br i1 %258, label %263, label %259

259:                                              ; preds = %247
  %260 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 3
  %261 = load ptr, ptr %260, align 8, !tbaa !13
  %262 = icmp eq ptr %261, null
  br i1 %262, label %263, label %264

263:                                              ; preds = %259, %247
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 237, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524301, ptr noundef null)
  br label %289

264:                                              ; preds = %259
  %265 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 2
  %266 = load ptr, ptr %265, align 8, !tbaa !15
  %267 = load ptr, ptr %31, align 8, !tbaa !5
  %268 = load i32, ptr %33, align 4, !tbaa !11
  %269 = call i32 @ASN1_OCTET_STRING_set(ptr noundef %266, ptr noundef %267, i32 noundef %268)
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %279

271:                                              ; preds = %264
  %272 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 3
  %273 = load ptr, ptr %272, align 8, !tbaa !13
  %274 = load ptr, ptr %29, align 8, !tbaa !5
  %275 = load i64, ptr %10, align 8, !tbaa !9
  %276 = trunc i64 %275 to i32
  %277 = call i32 @ASN1_OCTET_STRING_set(ptr noundef %273, ptr noundef %274, i32 noundef %276)
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %280, label %279

279:                                              ; preds = %271, %264
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 242, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

280:                                              ; preds = %271
  %281 = call i32 @i2d_SM2_Ciphertext(ptr noundef %23, ptr noundef %11)
  store i32 %281, ptr %14, align 4, !tbaa !11
  %282 = load i32, ptr %14, align 4, !tbaa !11
  %283 = icmp slt i32 %282, 0
  br i1 %283, label %284, label %285

284:                                              ; preds = %280
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 249, ptr noundef @__func__.ossl_sm2_encrypt)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null)
  br label %289

285:                                              ; preds = %280
  %286 = load i32, ptr %14, align 4, !tbaa !11
  %287 = sext i32 %286 to i64
  %288 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 %287, ptr %288, align 8, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %289

289:                                              ; preds = %285, %284, %279, %263, %246, %215, %185, %173, %167, %150, %118, %108, %95, %80, %74, %63, %57
  %290 = load ptr, ptr %34, align 8, !tbaa !5
  call void @EVP_MD_free(ptr noundef %290)
  %291 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 3
  %292 = load ptr, ptr %291, align 8, !tbaa !13
  call void @ASN1_OCTET_STRING_free(ptr noundef %292)
  %293 = getelementptr inbounds %struct.SM2_Ciphertext_st, ptr %23, i32 0, i32 2
  %294 = load ptr, ptr %293, align 8, !tbaa !15
  call void @ASN1_OCTET_STRING_free(ptr noundef %294)
  %295 = load ptr, ptr %29, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %295, ptr noundef @.str.1, i32 noundef 260)
  %296 = load ptr, ptr %30, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %296, ptr noundef @.str.1, i32 noundef 261)
  %297 = load ptr, ptr %31, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %297, ptr noundef @.str.1, i32 noundef 262)
  %298 = load ptr, ptr %22, align 8, !tbaa !5
  call void @EVP_MD_CTX_free(ptr noundef %298)
  %299 = load ptr, ptr %16, align 8, !tbaa !5
  call void @BN_CTX_free(ptr noundef %299)
  %300 = load ptr, ptr %27, align 8, !tbaa !5
  call void @EC_POINT_free(ptr noundef %300)
  %301 = load ptr, ptr %28, align 8, !tbaa !5
  call void @EC_POINT_free(ptr noundef %301)
  %302 = load i32, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  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 32, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  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 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret i32 %302
}

declare ptr @EVP_MD_CTX_new() #2

declare ptr @EC_GROUP_get0_order(ptr noundef) #2

declare ptr @EC_KEY_get0_public_key(ptr noundef) #2

declare ptr @ossl_ec_key_get_libctx(ptr noundef) #2

declare ptr @ossl_ec_key_get0_propq(ptr noundef) #2

declare ptr @EC_POINT_new(ptr noundef) #2

declare ptr @BN_CTX_new_ex(ptr noundef) #2

declare void @BN_CTX_start(ptr noundef) #2

declare ptr @BN_CTX_get(ptr noundef) #2

declare ptr @CRYPTO_zalloc(i64 noundef, ptr noundef, i32 noundef) #2

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

declare i32 @BN_priv_rand_range_ex(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @EC_POINT_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @EC_POINT_get_affine_coordinates(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @BN_bn2binpad(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @ossl_ecdh_kdf_X9_63(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @EVP_MD_get0_name(ptr noundef) #2

declare i32 @EVP_DigestInit(ptr noundef, ptr noundef) #2

declare i32 @EVP_DigestUpdate(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @EVP_DigestFinal(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ASN1_OCTET_STRING_new() #2

declare i32 @ASN1_OCTET_STRING_set(ptr noundef, ptr noundef, i32 noundef) #2

declare void @EVP_MD_free(ptr noundef) #2

declare void @ASN1_OCTET_STRING_free(ptr noundef) #2

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

declare void @EVP_MD_CTX_free(ptr noundef) #2

declare void @BN_CTX_free(ptr noundef) #2

declare void @EC_POINT_free(ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"SM2_Ciphertext_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!14, !6, i64 16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !6, i64 0}
!20 = !{!14, !6, i64 8}


; 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_Ciphertext_st = type { ptr, ptr, ptr, ptr }

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

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

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

declare void @ERR_new() local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @ec_field_size(ptr noundef) local_unnamed_addr #0

declare ptr @EC_KEY_get0_group(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_MD_get_size(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @ossl_sm2_encrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr nocapture noundef %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca %struct.SM2_Ciphertext_st, align 8
  store ptr %4, ptr %7, align 8, !tbaa !5
  %9 = tail call ptr @EVP_MD_CTX_new() #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %10 = tail call ptr @EC_KEY_get0_group(ptr noundef %0) #4
  %11 = tail call ptr @EC_GROUP_get0_order(ptr noundef %10) #4
  %12 = tail call ptr @EC_KEY_get0_public_key(ptr noundef %0) #4
  %13 = tail call i32 @EVP_MD_get_size(ptr noundef %1) #4
  %14 = tail call ptr @ossl_ec_key_get_libctx(ptr noundef %0) #4
  %15 = tail call ptr @ossl_ec_key_get0_propq(ptr noundef %0) #4
  %16 = getelementptr inbounds i8, ptr %8, i64 24
  %17 = getelementptr inbounds i8, ptr %8, i64 16
  %18 = icmp eq ptr %9, null
  %19 = icmp slt i32 %13, 1
  %or.cond = select i1 %18, i1 true, i1 %19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  br i1 %or.cond, label %20, label %21

20:                                               ; preds = %6
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 142, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

21:                                               ; preds = %6
  %22 = tail call i64 @ec_field_size(ptr noundef %10)
  %23 = icmp eq i64 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 148, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

25:                                               ; preds = %21
  %26 = tail call ptr @EC_POINT_new(ptr noundef %10) #4
  %27 = tail call ptr @EC_POINT_new(ptr noundef %10) #4
  %28 = icmp eq ptr %26, null
  %29 = icmp eq ptr %27, null
  %or.cond3 = select i1 %28, i1 true, i1 %29
  br i1 %or.cond3, label %30, label %31

30:                                               ; preds = %25
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 155, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524304, ptr noundef null) #4
  br label %160

31:                                               ; preds = %25
  %32 = tail call ptr @BN_CTX_new_ex(ptr noundef %14) #4
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 160, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524291, ptr noundef null) #4
  br label %160

35:                                               ; preds = %31
  tail call void @BN_CTX_start(ptr noundef nonnull %32) #4
  %36 = tail call ptr @BN_CTX_get(ptr noundef nonnull %32) #4
  %37 = tail call ptr @BN_CTX_get(ptr noundef nonnull %32) #4
  %38 = tail call ptr @BN_CTX_get(ptr noundef nonnull %32) #4
  %39 = tail call ptr @BN_CTX_get(ptr noundef nonnull %32) #4
  %40 = tail call ptr @BN_CTX_get(ptr noundef nonnull %32) #4
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %35
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 172, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524291, ptr noundef null) #4
  br label %160

43:                                               ; preds = %35
  %44 = shl i64 %22, 1
  %45 = tail call ptr @CRYPTO_zalloc(i64 noundef %44, ptr noundef nonnull @.str.1, i32 noundef 176) #4
  %46 = zext nneg i32 %13 to i64
  %47 = tail call ptr @CRYPTO_zalloc(i64 noundef %46, ptr noundef nonnull @.str.1, i32 noundef 177) #4
  %48 = icmp eq ptr %45, null
  %49 = icmp eq ptr %47, null
  %or.cond5 = select i1 %48, i1 true, i1 %49
  br i1 %or.cond5, label %160, label %50

50:                                               ; preds = %43
  %51 = load i64, ptr %5, align 8, !tbaa !9
  tail call void @llvm.memset.p0.i64(ptr align 1 %4, i8 0, i64 %51, i1 false)
  %52 = tail call i32 @BN_priv_rand_range_ex(ptr noundef %36, ptr noundef %11, i32 noundef 0, ptr noundef nonnull %32) #4
  %.not = icmp eq i32 %52, 0
  br i1 %.not, label %53, label %54

53:                                               ; preds = %50
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 185, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

54:                                               ; preds = %50
  %55 = tail call i32 @EC_POINT_mul(ptr noundef %10, ptr noundef nonnull %26, ptr noundef %36, ptr noundef null, ptr noundef null, ptr noundef nonnull %32) #4
  %.not140 = icmp eq i32 %55, 0
  br i1 %.not140, label %62, label %56

56:                                               ; preds = %54
  %57 = tail call i32 @EC_POINT_get_affine_coordinates(ptr noundef %10, ptr noundef nonnull %26, ptr noundef %37, ptr noundef %39, ptr noundef nonnull %32) #4
  %.not141 = icmp eq i32 %57, 0
  br i1 %.not141, label %62, label %58

58:                                               ; preds = %56
  %59 = tail call i32 @EC_POINT_mul(ptr noundef %10, ptr noundef nonnull %27, ptr noundef null, ptr noundef %12, ptr noundef %36, ptr noundef nonnull %32) #4
  %.not142 = icmp eq i32 %59, 0
  br i1 %.not142, label %62, label %60

60:                                               ; preds = %58
  %61 = tail call i32 @EC_POINT_get_affine_coordinates(ptr noundef %10, ptr noundef nonnull %27, ptr noundef %38, ptr noundef nonnull %40, ptr noundef nonnull %32) #4
  %.not143 = icmp eq i32 %61, 0
  br i1 %.not143, label %62, label %63

62:                                               ; preds = %60, %58, %56, %54
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 193, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524304, ptr noundef null) #4
  br label %160

63:                                               ; preds = %60
  %64 = trunc i64 %22 to i32
  %65 = tail call i32 @BN_bn2binpad(ptr noundef %38, ptr noundef nonnull %45, i32 noundef %64) #4
  %66 = icmp slt i32 %65, 0
  br i1 %66, label %71, label %67

67:                                               ; preds = %63
  %68 = getelementptr inbounds i8, ptr %45, i64 %22
  %69 = tail call i32 @BN_bn2binpad(ptr noundef nonnull %40, ptr noundef nonnull %68, i32 noundef %64) #4
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %67, %63
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 199, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

72:                                               ; preds = %67
  %73 = tail call ptr @CRYPTO_zalloc(i64 noundef %3, ptr noundef nonnull @.str.1, i32 noundef 203) #4
  %74 = icmp eq ptr %73, null
  br i1 %74, label %160, label %75

75:                                               ; preds = %72
  %76 = tail call i32 @ossl_ecdh_kdf_X9_63(ptr noundef nonnull %73, i64 noundef %3, ptr noundef nonnull %45, i64 noundef %44, ptr noundef null, i64 noundef 0, ptr noundef %1, ptr noundef %14, ptr noundef %15) #4
  %.not144 = icmp eq i32 %76, 0
  br i1 %.not144, label %96, label %.preheader

.preheader:                                       ; preds = %75
  %.not145148 = icmp eq i64 %3, 0
  br i1 %.not145148, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %.preheader
  %min.iters.check = icmp ult i64 %3, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %scevgep = getelementptr i8, ptr %73, i64 %3
  %scevgep150 = getelementptr i8, ptr %2, i64 %3
  %bound0 = icmp ult ptr %73, %scevgep150
  %bound1 = icmp ugt ptr %scevgep, %2
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check151 = icmp ult i64 %3, 32
  br i1 %min.iters.check151, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %3, -32
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %77 = getelementptr inbounds i8, ptr %2, i64 %index
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %wide.load = load <16 x i8>, ptr %77, align 1, !tbaa !11, !alias.scope !12
  %wide.load152 = load <16 x i8>, ptr %78, align 1, !tbaa !11, !alias.scope !12
  %79 = getelementptr inbounds i8, ptr %73, i64 %index
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %wide.load153 = load <16 x i8>, ptr %79, align 1, !tbaa !11, !alias.scope !15, !noalias !12
  %wide.load154 = load <16 x i8>, ptr %80, align 1, !tbaa !11, !alias.scope !15, !noalias !12
  %81 = xor <16 x i8> %wide.load153, %wide.load
  %82 = xor <16 x i8> %wide.load154, %wide.load152
  store <16 x i8> %81, ptr %79, align 1, !tbaa !11, !alias.scope !15, !noalias !12
  store <16 x i8> %82, ptr %80, align 1, !tbaa !11, !alias.scope !15, !noalias !12
  %index.next = add nuw i64 %index, 32
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %3
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %3, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %.0116149.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec156, %vec.epilog.middle.block ]
  %xtraiter = and i64 %3, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.0116149.prol = phi i64 [ %89, %.lr.ph.prol ], [ %.0116149.ph, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %84 = getelementptr inbounds i8, ptr %2, i64 %.0116149.prol
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = getelementptr inbounds i8, ptr %73, i64 %.0116149.prol
  %87 = load i8, ptr %86, align 1, !tbaa !11
  %88 = xor i8 %87, %85
  store i8 %88, ptr %86, align 1, !tbaa !11
  %89 = add nuw i64 %.0116149.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !21

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.0116149.unr = phi i64 [ %.0116149.ph, %.lr.ph.preheader ], [ %89, %.lr.ph.prol ]
  %90 = sub i64 %.0116149.ph, %3
  %91 = icmp ugt i64 %90, -4
  br i1 %91, label %._crit_edge, label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec156 = and i64 %3, -8
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index157 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next160, %vec.epilog.vector.body ]
  %92 = getelementptr inbounds i8, ptr %2, i64 %index157
  %wide.load158 = load <8 x i8>, ptr %92, align 1, !tbaa !11, !alias.scope !23
  %93 = getelementptr inbounds i8, ptr %73, i64 %index157
  %wide.load159 = load <8 x i8>, ptr %93, align 1, !tbaa !11, !alias.scope !26, !noalias !23
  %94 = xor <8 x i8> %wide.load159, %wide.load158
  store <8 x i8> %94, ptr %93, align 1, !tbaa !11, !alias.scope !26, !noalias !23
  %index.next160 = add nuw i64 %index157, 8
  %95 = icmp eq i64 %index.next160, %n.vec156
  br i1 %95, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !28

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n161 = icmp eq i64 %n.vec156, %3
  br i1 %cmp.n161, label %._crit_edge, label %.lr.ph.preheader

96:                                               ; preds = %75
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 210, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524294, ptr noundef null) #4
  br label %160

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.0116149 = phi i64 [ %120, %.lr.ph ], [ %.0116149.unr, %.lr.ph.prol.loopexit ]
  %97 = getelementptr inbounds i8, ptr %2, i64 %.0116149
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = getelementptr inbounds i8, ptr %73, i64 %.0116149
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = xor i8 %100, %98
  store i8 %101, ptr %99, align 1, !tbaa !11
  %102 = add nuw i64 %.0116149, 1
  %103 = getelementptr inbounds i8, ptr %2, i64 %102
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = getelementptr inbounds i8, ptr %73, i64 %102
  %106 = load i8, ptr %105, align 1, !tbaa !11
  %107 = xor i8 %106, %104
  store i8 %107, ptr %105, align 1, !tbaa !11
  %108 = add nuw i64 %.0116149, 2
  %109 = getelementptr inbounds i8, ptr %2, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = getelementptr inbounds i8, ptr %73, i64 %108
  %112 = load i8, ptr %111, align 1, !tbaa !11
  %113 = xor i8 %112, %110
  store i8 %113, ptr %111, align 1, !tbaa !11
  %114 = add nuw i64 %.0116149, 3
  %115 = getelementptr inbounds i8, ptr %2, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !11
  %117 = getelementptr inbounds i8, ptr %73, i64 %114
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = xor i8 %118, %116
  store i8 %119, ptr %117, align 1, !tbaa !11
  %120 = add nuw i64 %.0116149, 4
  %.not145.3 = icmp eq i64 %120, %3
  br i1 %.not145.3, label %._crit_edge, label %.lr.ph, !llvm.loop !29

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %.preheader
  %121 = tail call ptr @EVP_MD_get0_name(ptr noundef %1) #4
  %122 = tail call ptr @EVP_MD_fetch(ptr noundef %14, ptr noundef %121, ptr noundef %15) #4
  %123 = icmp eq ptr %122, null
  br i1 %123, label %124, label %125

124:                                              ; preds = %._crit_edge
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 219, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

125:                                              ; preds = %._crit_edge
  %126 = tail call i32 @EVP_DigestInit(ptr noundef %9, ptr noundef nonnull %122) #4
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %140, label %128

128:                                              ; preds = %125
  %129 = tail call i32 @EVP_DigestUpdate(ptr noundef %9, ptr noundef %45, i64 noundef %22) #4
  %130 = icmp eq i32 %129, 0
  br i1 %130, label %140, label %131

131:                                              ; preds = %128
  %132 = tail call i32 @EVP_DigestUpdate(ptr noundef %9, ptr noundef %2, i64 noundef %3) #4
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %140, label %134

134:                                              ; preds = %131
  %135 = tail call i32 @EVP_DigestUpdate(ptr noundef %9, ptr noundef nonnull %68, i64 noundef %22) #4
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %140, label %137

137:                                              ; preds = %134
  %138 = tail call i32 @EVP_DigestFinal(ptr noundef %9, ptr noundef %47, ptr noundef null) #4
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %140, label %141

140:                                              ; preds = %137, %134, %131, %128, %125
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 227, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524294, ptr noundef null) #4
  br label %160

141:                                              ; preds = %137
  store ptr %37, ptr %8, align 8, !tbaa !30
  %142 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %39, ptr %142, align 8, !tbaa !32
  %143 = tail call ptr @ASN1_OCTET_STRING_new() #4
  store ptr %143, ptr %17, align 8, !tbaa !33
  %144 = tail call ptr @ASN1_OCTET_STRING_new() #4
  store ptr %144, ptr %16, align 8, !tbaa !34
  %145 = icmp eq ptr %143, null
  %146 = icmp eq ptr %144, null
  %or.cond8 = select i1 %145, i1 true, i1 %146
  br i1 %or.cond8, label %147, label %148

147:                                              ; preds = %141
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 237, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 524301, ptr noundef null) #4
  br label %160

148:                                              ; preds = %141
  %149 = tail call i32 @ASN1_OCTET_STRING_set(ptr noundef nonnull %143, ptr noundef %47, i32 noundef %13) #4
  %.not146 = icmp eq i32 %149, 0
  br i1 %.not146, label %153, label %150

150:                                              ; preds = %148
  %151 = trunc i64 %3 to i32
  %152 = tail call i32 @ASN1_OCTET_STRING_set(ptr noundef nonnull %144, ptr noundef nonnull %73, i32 noundef %151) #4
  %.not147 = icmp eq i32 %152, 0
  br i1 %.not147, label %153, label %154

153:                                              ; preds = %150, %148
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 242, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

154:                                              ; preds = %150
  %155 = call i32 @i2d_SM2_Ciphertext(ptr noundef nonnull %8, ptr noundef nonnull %7)
  %156 = icmp slt i32 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  call void @ERR_new() #4
  call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 249, ptr noundef nonnull @__func__.ossl_sm2_encrypt) #4
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 53, i32 noundef 786691, ptr noundef null) #4
  br label %160

158:                                              ; preds = %154
  %159 = zext nneg i32 %155 to i64
  store i64 %159, ptr %5, align 8, !tbaa !9
  br label %160

160:                                              ; preds = %72, %43, %158, %157, %153, %147, %140, %124, %96, %71, %62, %53, %42, %34, %30, %24, %20
  %.0123 = phi ptr [ null, %20 ], [ null, %24 ], [ %26, %30 ], [ %26, %34 ], [ %26, %42 ], [ %26, %43 ], [ %26, %71 ], [ %26, %72 ], [ %26, %124 ], [ %26, %140 ], [ %26, %147 ], [ %26, %157 ], [ %26, %158 ], [ %26, %153 ], [ %26, %96 ], [ %26, %62 ], [ %26, %53 ]
  %.0122 = phi ptr [ null, %20 ], [ null, %24 ], [ %27, %30 ], [ %27, %34 ], [ %27, %42 ], [ %27, %43 ], [ %27, %71 ], [ %27, %72 ], [ %27, %124 ], [ %27, %140 ], [ %27, %147 ], [ %27, %157 ], [ %27, %158 ], [ %27, %153 ], [ %27, %96 ], [ %27, %62 ], [ %27, %53 ]
  %.0121 = phi ptr [ null, %20 ], [ null, %24 ], [ null, %30 ], [ null, %34 ], [ null, %42 ], [ null, %43 ], [ null, %71 ], [ null, %72 ], [ %73, %124 ], [ %73, %140 ], [ %73, %147 ], [ %73, %157 ], [ %73, %158 ], [ %73, %153 ], [ %73, %96 ], [ null, %62 ], [ null, %53 ]
  %.0120 = phi ptr [ null, %20 ], [ null, %24 ], [ null, %30 ], [ null, %34 ], [ null, %42 ], [ %45, %43 ], [ %45, %71 ], [ %45, %72 ], [ %45, %124 ], [ %45, %140 ], [ %45, %147 ], [ %45, %157 ], [ %45, %158 ], [ %45, %153 ], [ %45, %96 ], [ %45, %62 ], [ %45, %53 ]
  %.0119 = phi ptr [ null, %20 ], [ null, %24 ], [ null, %30 ], [ null, %34 ], [ null, %42 ], [ %47, %43 ], [ %47, %71 ], [ %47, %72 ], [ %47, %124 ], [ %47, %140 ], [ %47, %147 ], [ %47, %157 ], [ %47, %158 ], [ %47, %153 ], [ %47, %96 ], [ %47, %62 ], [ %47, %53 ]
  %.0118 = phi ptr [ null, %20 ], [ null, %24 ], [ null, %30 ], [ null, %34 ], [ %32, %42 ], [ %32, %43 ], [ %32, %71 ], [ %32, %72 ], [ %32, %124 ], [ %32, %140 ], [ %32, %147 ], [ %32, %157 ], [ %32, %158 ], [ %32, %153 ], [ %32, %96 ], [ %32, %62 ], [ %32, %53 ]
  %.0117 = phi ptr [ null, %20 ], [ null, %24 ], [ null, %30 ], [ null, %34 ], [ null, %42 ], [ null, %43 ], [ null, %71 ], [ null, %72 ], [ null, %124 ], [ %122, %140 ], [ %122, %147 ], [ %122, %157 ], [ %122, %158 ], [ %122, %153 ], [ null, %96 ], [ null, %62 ], [ null, %53 ]
  %.0 = phi i32 [ 0, %20 ], [ 0, %24 ], [ 0, %30 ], [ 0, %34 ], [ 0, %42 ], [ 0, %43 ], [ 0, %71 ], [ 0, %72 ], [ 0, %124 ], [ 0, %140 ], [ 0, %147 ], [ 0, %157 ], [ 1, %158 ], [ 0, %153 ], [ 0, %96 ], [ 0, %62 ], [ 0, %53 ]
  call void @EVP_MD_free(ptr noundef %.0117) #4
  %161 = load ptr, ptr %16, align 8, !tbaa !34
  call void @ASN1_OCTET_STRING_free(ptr noundef %161) #4
  %162 = load ptr, ptr %17, align 8, !tbaa !33
  call void @ASN1_OCTET_STRING_free(ptr noundef %162) #4
  call void @CRYPTO_free(ptr noundef %.0121, ptr noundef nonnull @.str.1, i32 noundef 260) #4
  call void @CRYPTO_free(ptr noundef %.0120, ptr noundef nonnull @.str.1, i32 noundef 261) #4
  call void @CRYPTO_free(ptr noundef %.0119, ptr noundef nonnull @.str.1, i32 noundef 262) #4
  call void @EVP_MD_CTX_free(ptr noundef %9) #4
  call void @BN_CTX_free(ptr noundef %.0118) #4
  call void @EC_POINT_free(ptr noundef %.0123) #4
  call void @EC_POINT_free(ptr noundef %.0122) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  ret i32 %.0
}

declare ptr @EVP_MD_CTX_new() local_unnamed_addr #2

declare ptr @EC_GROUP_get0_order(ptr noundef) local_unnamed_addr #2

declare ptr @EC_KEY_get0_public_key(ptr noundef) local_unnamed_addr #2

declare ptr @ossl_ec_key_get_libctx(ptr noundef) local_unnamed_addr #2

declare ptr @ossl_ec_key_get0_propq(ptr noundef) local_unnamed_addr #2

declare ptr @EC_POINT_new(ptr noundef) local_unnamed_addr #2

declare ptr @BN_CTX_new_ex(ptr noundef) local_unnamed_addr #2

declare void @BN_CTX_start(ptr noundef) local_unnamed_addr #2

declare ptr @BN_CTX_get(ptr noundef) local_unnamed_addr #2

declare ptr @CRYPTO_zalloc(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @BN_priv_rand_range_ex(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @EC_POINT_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @EC_POINT_get_affine_coordinates(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @BN_bn2binpad(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @ossl_ecdh_kdf_X9_63(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @EVP_MD_get0_name(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_DigestInit(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @EVP_DigestUpdate(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @EVP_DigestFinal(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ASN1_OCTET_STRING_new() local_unnamed_addr #2

declare i32 @ASN1_OCTET_STRING_set(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @EVP_MD_free(ptr noundef) local_unnamed_addr #2

declare void @ASN1_OCTET_STRING_free(ptr noundef) local_unnamed_addr #2

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

declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @EC_POINT_free(ptr noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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}
!11 = !{!7, !7, i64 0}
!12 = !{!13}
!13 = distinct !{!13, !14}
!14 = distinct !{!14, !"LVerDomain"}
!15 = !{!16}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = !{!24}
!24 = distinct !{!24, !25}
!25 = distinct !{!25, !"LVerDomain"}
!26 = !{!27}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !18, !19, !20}
!29 = distinct !{!29, !18, !19}
!30 = !{!31, !6, i64 0}
!31 = !{!"SM2_Ciphertext_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!31, !6, i64 8}
!33 = !{!31, !6, i64 16}
!34 = !{!31, !6, i64 24}


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