; LLVM IR from intel/cryptography-primitives :: sources/ippcp/gfpec/sm2 (sm2_encrypt_ext)

; 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._cpHashCtx_rmf = type { i32, ptr, i32, [128 x i8], i64, i64, [8 x i64] }
%struct._cpGFpECPoint = type { i32, i32, i32, ptr }
%struct._cpGFpEC = type { i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpGFp = type { i32, i32, ptr }
%struct._gsModEngine = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, i32, ptr }
%struct._cpBigNum = type { i32, i32, i32, i32, ptr, ptr }
%struct._gsModMethod = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@ippsGFpECEncryptSM2_Ext.ctx = external hidden global %struct._cpHashCtx_rmf, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECEncryptSM2_Ext(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #0 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %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 i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct._cpGFpECPoint, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %struct._cpGFpECPoint, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !9
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  %44 = load ptr, ptr %20, align 8, !tbaa !5
  %45 = icmp eq ptr null, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %10
  store i32 -8, ptr %11, align 4
  br label %381

47:                                               ; preds = %10
  %48 = load ptr, ptr %20, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._cpGFpEC, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = load ptr, ptr %20, align 8, !tbaa !5
  %52 = call i64 @IPP_UINT_PTR(ptr noundef %51)
  %53 = trunc i64 %52 to i32
  %54 = xor i32 %50, %53
  %55 = icmp eq i32 %54, 1129136461
  br i1 %55, label %57, label %56

56:                                               ; preds = %47
  store i32 -13, ptr %11, align 4
  br label %381

57:                                               ; preds = %47
  %58 = load ptr, ptr %20, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._cpGFpEC, ptr %58, i32 0, i32 3
  %60 = load i32, ptr %59, align 8, !tbaa !13
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %63, label %62

62:                                               ; preds = %57
  store i32 -13, ptr %11, align 4
  br label %381

63:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %64 = load ptr, ptr %20, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._cpGFpEC, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !14
  %67 = getelementptr inbounds %struct._cpGFp, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  store ptr %68, ptr %22, align 8, !tbaa !5
  %69 = load ptr, ptr %22, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._gsModEngine, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !17
  %72 = icmp slt i32 1, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %63
  store i32 -14, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %380

74:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %75 = load ptr, ptr %20, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._cpGFpEC, ptr %75, i32 0, i32 13
  %77 = load ptr, ptr %76, align 8, !tbaa !20
  store ptr %77, ptr %24, align 8, !tbaa !5
  %78 = load ptr, ptr %24, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._gsModEngine, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !17
  %81 = icmp slt i32 1, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %74
  store i32 -14, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %379

83:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._gsModEngine, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 4, !tbaa !21
  store i32 %86, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %87 = load i32, ptr %25, align 4, !tbaa !9
  %88 = add nsw i32 %87, 7
  %89 = sdiv i32 %88, 8
  store i32 %89, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %90 = load ptr, ptr %22, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._gsModEngine, ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 8, !tbaa !22
  store i32 %92, ptr %27, align 4, !tbaa !9
  %93 = load ptr, ptr %21, align 8, !tbaa !5
  %94 = icmp eq ptr null, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %83
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %378

96:                                               ; preds = %83
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = icmp eq ptr null, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %378

100:                                              ; preds = %96
  %101 = load i32, ptr %16, align 4, !tbaa !9
  %102 = icmp sge i32 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  store i32 -11, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %378

104:                                              ; preds = %100
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = icmp eq ptr null, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %104
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %378

108:                                              ; preds = %104
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = icmp eq ptr null, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %378

112:                                              ; preds = %108
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %113, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  store i32 1, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %114 = load i32, ptr %27, align 4, !tbaa !9
  %115 = mul nsw i32 8, %114
  %116 = mul nsw i32 %115, 2
  store i32 %116, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  store i32 32, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %117 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %117, ptr %31, align 4, !tbaa !9
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = load i32, ptr %29, align 4, !tbaa !9
  %120 = add nsw i32 1, %119
  %121 = load i32, ptr %31, align 4, !tbaa !9
  %122 = add nsw i32 %120, %121
  %123 = add nsw i32 %122, 32
  %124 = icmp sge i32 %118, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %112
  store i32 -11, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

126:                                              ; preds = %112
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = icmp eq ptr null, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %126
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

130:                                              ; preds = %126
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._cpBigNum, ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 8, !tbaa !23
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = call i64 @IPP_UINT_PTR(ptr noundef %134)
  %136 = trunc i64 %135 to i32
  %137 = xor i32 %133, %136
  %138 = icmp eq i32 %137, 1112098638
  br i1 %138, label %140, label %139

139:                                              ; preds = %130
  store i32 -13, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

140:                                              ; preds = %130
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._cpBigNum, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !25
  %144 = icmp eq i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %140
  store i32 -1008, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

146:                                              ; preds = %140
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = call i32 @gfec_CheckPrivateKey(ptr noundef %147, ptr noundef %148)
  %150 = icmp eq i32 0, %149
  br i1 %150, label %151, label %152

151:                                              ; preds = %146
  store i32 -1008, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

152:                                              ; preds = %146
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = icmp eq ptr null, %153
  br i1 %154, label %155, label %156

155:                                              ; preds = %152
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

156:                                              ; preds = %152
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._cpGFpECPoint, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !26
  %160 = load ptr, ptr %17, align 8, !tbaa !5
  %161 = call i64 @IPP_UINT_PTR(ptr noundef %160)
  %162 = trunc i64 %161 to i32
  %163 = xor i32 %159, %162
  %164 = icmp eq i32 %163, 1129136462
  br i1 %164, label %166, label %165

165:                                              ; preds = %156
  store i32 -13, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

166:                                              ; preds = %156
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._cpGFpECPoint, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !28
  %170 = load ptr, ptr %22, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._gsModEngine, ptr %170, i32 0, i32 3
  %172 = load i32, ptr %171, align 8, !tbaa !22
  %173 = icmp ne i32 %169, %172
  br i1 %173, label %174, label %175

174:                                              ; preds = %166
  store i32 -11, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

175:                                              ; preds = %166
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = load ptr, ptr %20, align 8, !tbaa !5
  %178 = call i32 @gfec_IsPointOnCurve(ptr noundef %176, ptr noundef %177)
  %179 = icmp eq i32 0, %178
  br i1 %179, label %180, label %181

180:                                              ; preds = %175
  store i32 -1017, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

181:                                              ; preds = %175
  %182 = load ptr, ptr %18, align 8, !tbaa !5
  %183 = icmp eq ptr null, %182
  br i1 %183, label %184, label %185

184:                                              ; preds = %181
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

185:                                              ; preds = %181
  %186 = load ptr, ptr %18, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._cpGFpECPoint, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !26
  %189 = load ptr, ptr %18, align 8, !tbaa !5
  %190 = call i64 @IPP_UINT_PTR(ptr noundef %189)
  %191 = trunc i64 %190 to i32
  %192 = xor i32 %188, %191
  %193 = icmp eq i32 %192, 1129136462
  br i1 %193, label %195, label %194

194:                                              ; preds = %185
  store i32 -13, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

195:                                              ; preds = %185
  %196 = load ptr, ptr %18, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct._cpGFpECPoint, ptr %196, i32 0, i32 2
  %198 = load i32, ptr %197, align 8, !tbaa !28
  %199 = load ptr, ptr %22, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct._gsModEngine, ptr %199, i32 0, i32 3
  %201 = load i32, ptr %200, align 8, !tbaa !22
  %202 = icmp ne i32 %198, %201
  br i1 %202, label %203, label %204

203:                                              ; preds = %195
  store i32 -11, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

204:                                              ; preds = %195
  %205 = load ptr, ptr %18, align 8, !tbaa !5
  %206 = load ptr, ptr %20, align 8, !tbaa !5
  %207 = call i32 @gfec_IsPointOnCurve(ptr noundef %205, ptr noundef %206)
  %208 = icmp eq i32 0, %207
  br i1 %208, label %209, label %210

209:                                              ; preds = %204
  store i32 -1017, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %377

210:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #4
  %211 = load ptr, ptr %20, align 8, !tbaa !5
  %212 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %211)
  %213 = load ptr, ptr %20, align 8, !tbaa !5
  %214 = call ptr @cpEcGFpInitPoint(ptr noundef %32, ptr noundef %212, i32 noundef 0, ptr noundef %213)
  %215 = load ptr, ptr %19, align 8, !tbaa !5
  %216 = load ptr, ptr %20, align 8, !tbaa !5
  %217 = load ptr, ptr %21, align 8, !tbaa !5
  %218 = call i32 @ippsGFpECPublicKey(ptr noundef %215, ptr noundef %32, ptr noundef %216, ptr noundef %217)
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  %220 = load ptr, ptr %20, align 8, !tbaa !5
  %221 = call i32 @gfec_ComparePoint(ptr noundef %32, ptr noundef %219, ptr noundef %220)
  store i32 %221, ptr %33, align 4, !tbaa !9
  %222 = load ptr, ptr %20, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %222)
  %223 = load i32, ptr %33, align 4, !tbaa !9
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %226, label %225

225:                                              ; preds = %210
  store i32 -1011, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %376

226:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  store i32 0, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %227 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %227, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %228 = load ptr, ptr %35, align 8, !tbaa !5
  %229 = getelementptr inbounds i8, ptr %228, i64 1
  store ptr %229, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  %230 = load ptr, ptr %36, align 8, !tbaa !5
  %231 = load i32, ptr %29, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i8, ptr %230, i64 %232
  store ptr %233, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %234 = load ptr, ptr %37, align 8, !tbaa !5
  %235 = getelementptr inbounds i8, ptr %234, i64 32
  store ptr %235, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #4
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %236)
  %238 = load ptr, ptr %20, align 8, !tbaa !5
  %239 = call ptr @cpEcGFpInitPoint(ptr noundef %39, ptr noundef %237, i32 noundef 0, ptr noundef %238)
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #4
  store ptr null, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #4
  store ptr null, ptr %41, align 8, !tbaa !5
  %240 = load ptr, ptr %35, align 8, !tbaa !5
  %241 = getelementptr inbounds i8, ptr %240, i64 0
  store i8 4, ptr %241, align 1, !tbaa !29
  %242 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %242, ptr %40, align 8, !tbaa !5
  %243 = load ptr, ptr %40, align 8, !tbaa !5
  %244 = load i32, ptr %27, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i64, ptr %243, i64 %245
  store ptr %246, ptr %41, align 8, !tbaa !5
  %247 = load ptr, ptr %40, align 8, !tbaa !5
  %248 = load ptr, ptr %41, align 8, !tbaa !5
  %249 = load ptr, ptr %18, align 8, !tbaa !5
  %250 = load ptr, ptr %20, align 8, !tbaa !5
  %251 = call i32 @gfec_GetPoint(ptr noundef %247, ptr noundef %248, ptr noundef %249, ptr noundef %250)
  %252 = load ptr, ptr %22, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct._gsModEngine, ptr %252, i32 0, i32 6
  %254 = load ptr, ptr %253, align 8, !tbaa !30
  %255 = getelementptr inbounds %struct._gsModMethod, ptr %254, i32 0, i32 1
  %256 = load ptr, ptr %255, align 8, !tbaa !31
  %257 = load ptr, ptr %40, align 8, !tbaa !5
  %258 = load ptr, ptr %40, align 8, !tbaa !5
  %259 = load ptr, ptr %22, align 8, !tbaa !5
  %260 = call ptr %256(ptr noundef %257, ptr noundef %258, ptr noundef %259)
  %261 = load ptr, ptr %22, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct._gsModEngine, ptr %261, i32 0, i32 6
  %263 = load ptr, ptr %262, align 8, !tbaa !30
  %264 = getelementptr inbounds %struct._gsModMethod, ptr %263, i32 0, i32 1
  %265 = load ptr, ptr %264, align 8, !tbaa !31
  %266 = load ptr, ptr %41, align 8, !tbaa !5
  %267 = load ptr, ptr %41, align 8, !tbaa !5
  %268 = load ptr, ptr %22, align 8, !tbaa !5
  %269 = call ptr %265(ptr noundef %266, ptr noundef %267, ptr noundef %268)
  %270 = load ptr, ptr %40, align 8, !tbaa !5
  %271 = load i32, ptr %26, align 4, !tbaa !9
  call void @cpSM2KE_reverse_inplace(ptr noundef %270, i32 noundef %271)
  %272 = load ptr, ptr %41, align 8, !tbaa !5
  %273 = load i32, ptr %26, align 4, !tbaa !9
  call void @cpSM2KE_reverse_inplace(ptr noundef %272, i32 noundef %273)
  %274 = load ptr, ptr %17, align 8, !tbaa !5
  %275 = load ptr, ptr %19, align 8, !tbaa !5
  %276 = load ptr, ptr %20, align 8, !tbaa !5
  %277 = load ptr, ptr %21, align 8, !tbaa !5
  %278 = call i32 @ippsGFpECMulPoint(ptr noundef %274, ptr noundef %275, ptr noundef %39, ptr noundef %276, ptr noundef %277)
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #4
  %279 = load ptr, ptr %22, align 8, !tbaa !5
  %280 = call ptr @gsModPoolAlloc(ptr noundef %279, i32 noundef 2)
  store ptr %280, ptr %42, align 8, !tbaa !5
  %281 = load ptr, ptr %42, align 8, !tbaa !5
  store ptr %281, ptr %40, align 8, !tbaa !5
  %282 = load ptr, ptr %40, align 8, !tbaa !5
  %283 = load i32, ptr %27, align 4, !tbaa !9
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds i64, ptr %282, i64 %284
  store ptr %285, ptr %41, align 8, !tbaa !5
  %286 = load ptr, ptr %40, align 8, !tbaa !5
  %287 = load ptr, ptr %41, align 8, !tbaa !5
  %288 = load ptr, ptr %20, align 8, !tbaa !5
  %289 = call i32 @gfec_GetPoint(ptr noundef %286, ptr noundef %287, ptr noundef %39, ptr noundef %288)
  %290 = load ptr, ptr %22, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct._gsModEngine, ptr %290, i32 0, i32 6
  %292 = load ptr, ptr %291, align 8, !tbaa !30
  %293 = getelementptr inbounds %struct._gsModMethod, ptr %292, i32 0, i32 1
  %294 = load ptr, ptr %293, align 8, !tbaa !31
  %295 = load ptr, ptr %40, align 8, !tbaa !5
  %296 = load ptr, ptr %40, align 8, !tbaa !5
  %297 = load ptr, ptr %22, align 8, !tbaa !5
  %298 = call ptr %294(ptr noundef %295, ptr noundef %296, ptr noundef %297)
  %299 = load ptr, ptr %22, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct._gsModEngine, ptr %299, i32 0, i32 6
  %301 = load ptr, ptr %300, align 8, !tbaa !30
  %302 = getelementptr inbounds %struct._gsModMethod, ptr %301, i32 0, i32 1
  %303 = load ptr, ptr %302, align 8, !tbaa !31
  %304 = load ptr, ptr %41, align 8, !tbaa !5
  %305 = load ptr, ptr %41, align 8, !tbaa !5
  %306 = load ptr, ptr %22, align 8, !tbaa !5
  %307 = call ptr %303(ptr noundef %304, ptr noundef %305, ptr noundef %306)
  %308 = load ptr, ptr %40, align 8, !tbaa !5
  %309 = load i32, ptr %26, align 4, !tbaa !9
  call void @cpSM2KE_reverse_inplace(ptr noundef %308, i32 noundef %309)
  %310 = load ptr, ptr %41, align 8, !tbaa !5
  %311 = load i32, ptr %26, align 4, !tbaa !9
  call void @cpSM2KE_reverse_inplace(ptr noundef %310, i32 noundef %311)
  %312 = load ptr, ptr %38, align 8, !tbaa !5
  %313 = load i32, ptr %31, align 4, !tbaa !9
  %314 = load ptr, ptr %42, align 8, !tbaa !5
  %315 = load i32, ptr %26, align 4, !tbaa !9
  %316 = mul nsw i32 2, %315
  %317 = call i32 @KDF_sm3(ptr noundef %312, i32 noundef %313, ptr noundef %314, i32 noundef %316)
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #4
  store i32 0, ptr %43, align 4, !tbaa !9
  br label %318

318:                                              ; preds = %342, %226
  %319 = load i32, ptr %43, align 4, !tbaa !9
  %320 = load i32, ptr %31, align 4, !tbaa !9
  %321 = icmp slt i32 %319, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %318
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #4
  br label %345

323:                                              ; preds = %318
  %324 = load ptr, ptr %38, align 8, !tbaa !5
  %325 = load i32, ptr %43, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds i8, ptr %324, i64 %326
  %328 = load i8, ptr %327, align 1, !tbaa !29
  %329 = zext i8 %328 to i32
  %330 = load ptr, ptr %15, align 8, !tbaa !5
  %331 = load i32, ptr %43, align 4, !tbaa !9
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds i8, ptr %330, i64 %332
  %334 = load i8, ptr %333, align 1, !tbaa !29
  %335 = zext i8 %334 to i32
  %336 = xor i32 %329, %335
  %337 = trunc i32 %336 to i8
  %338 = load ptr, ptr %38, align 8, !tbaa !5
  %339 = load i32, ptr %43, align 4, !tbaa !9
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds i8, ptr %338, i64 %340
  store i8 %337, ptr %341, align 1, !tbaa !29
  br label %342

342:                                              ; preds = %323
  %343 = load i32, ptr %43, align 4, !tbaa !9
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %43, align 4, !tbaa !9
  br label %318, !llvm.loop !33

345:                                              ; preds = %322
  %346 = call ptr @ippsHashMethod_SM3_TT()
  %347 = call i32 @ippsHashInit_rmf(ptr noundef @ippsGFpECEncryptSM2_Ext.ctx, ptr noundef %346)
  %348 = load ptr, ptr %40, align 8, !tbaa !5
  %349 = load i32, ptr %26, align 4, !tbaa !9
  %350 = call i32 @ippsHashUpdate_rmf(ptr noundef %348, i32 noundef %349, ptr noundef @ippsGFpECEncryptSM2_Ext.ctx)
  %351 = load ptr, ptr %15, align 8, !tbaa !5
  %352 = load i32, ptr %31, align 4, !tbaa !9
  %353 = call i32 @ippsHashUpdate_rmf(ptr noundef %351, i32 noundef %352, ptr noundef @ippsGFpECEncryptSM2_Ext.ctx)
  %354 = load ptr, ptr %41, align 8, !tbaa !5
  %355 = load i32, ptr %26, align 4, !tbaa !9
  %356 = call i32 @ippsHashUpdate_rmf(ptr noundef %354, i32 noundef %355, ptr noundef @ippsGFpECEncryptSM2_Ext.ctx)
  %357 = load ptr, ptr %37, align 8, !tbaa !5
  %358 = call i32 @ippsHashFinal_rmf(ptr noundef %357, ptr noundef @ippsGFpECEncryptSM2_Ext.ctx)
  %359 = load i32, ptr %34, align 4, !tbaa !9
  %360 = icmp eq i32 %359, 0
  br i1 %360, label %361, label %368

361:                                              ; preds = %345
  %362 = load i32, ptr %29, align 4, !tbaa !9
  %363 = add nsw i32 1, %362
  %364 = load i32, ptr %31, align 4, !tbaa !9
  %365 = add nsw i32 %363, %364
  %366 = add nsw i32 %365, 32
  %367 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 %366, ptr %367, align 4, !tbaa !9
  br label %368

368:                                              ; preds = %361, %345
  %369 = load ptr, ptr %19, align 8, !tbaa !5
  %370 = call ptr @cpBN_zero(ptr noundef %369)
  %371 = load ptr, ptr %18, align 8, !tbaa !5
  %372 = call ptr @gfec_SetPointAtInfinity(ptr noundef %371)
  %373 = load ptr, ptr %22, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %373, i32 noundef 2)
  %374 = load ptr, ptr %20, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %374)
  %375 = load i32, ptr %34, align 4, !tbaa !9
  store i32 %375, ptr %11, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  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 4, ptr %34) #4
  br label %376

376:                                              ; preds = %368, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #4
  br label %377

377:                                              ; preds = %376, %209, %203, %194, %184, %180, %174, %165, %155, %151, %145, %139, %129, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %378

378:                                              ; preds = %377, %111, %107, %103, %99, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %379

379:                                              ; preds = %378, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %380

380:                                              ; preds = %379, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %381

381:                                              ; preds = %380, %62, %56, %46
  %382 = load i32, ptr %11, align 4
  ret i32 %382
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) #1

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

declare i32 @gfec_CheckPrivateKey(ptr noundef, ptr noundef) #3

declare i32 @gfec_IsPointOnCurve(ptr noundef, ptr noundef) #3

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

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

declare i32 @ippsGFpECPublicKey(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @gfec_ComparePoint(ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @gfec_GetPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @ippsGFpECMulPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @KDF_sm3(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

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

declare i32 @ippsHashInit_rmf(ptr noundef, ptr noundef) #3

declare ptr @ippsHashMethod_SM3_TT() #3

declare i32 @ippsHashUpdate_rmf(ptr noundef, i32 noundef, ptr noundef) #3

declare i32 @ippsHashFinal_rmf(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @cpBN_zero(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @gfec_SetPointAtInfinity(ptr noundef) #1

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

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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, !10, i64 0}
!12 = !{!"_cpGFpEC", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !6, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"_cpGFp", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!18, !10, i64 8}
!18 = !{!"_gsModEngine", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !19, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104}
!19 = !{!"long long", !7, i64 0}
!20 = !{!12, !6, i64 80}
!21 = !{!18, !10, i64 12}
!22 = !{!18, !10, i64 16}
!23 = !{!24, !10, i64 0}
!24 = !{!"_cpBigNum", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24}
!25 = !{!24, !10, i64 4}
!26 = !{!27, !10, i64 0}
!27 = !{!"_cpGFpECPoint", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16}
!28 = !{!27, !10, i64 8}
!29 = !{!7, !7, i64 0}
!30 = !{!18, !6, i64 32}
!31 = !{!32, !6, i64 8}
!32 = !{!"_gsModMethod", !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, !6, i64 80}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; 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._cpHashCtx_rmf = type { i32, ptr, i32, [128 x i8], i64, i64, [8 x i64] }
%struct._cpGFpECPoint = type { i32, i32, i32, ptr }

@ippsGFpECEncryptSM2_Ext.ctx = external hidden global %struct._cpHashCtx_rmf, align 8

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1017, 1) i32 @ippsGFpECEncryptSM2_Ext(ptr noundef %0, i32 noundef %1, ptr noundef writeonly %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 {
  %11 = alloca %struct._cpGFpECPoint, align 8
  %12 = alloca %struct._cpGFpECPoint, align 8
  %13 = icmp eq ptr %8, null
  br i1 %13, label %187, label %14

14:                                               ; preds = %10
  %15 = load i32, ptr %8, align 8, !tbaa !5
  %16 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %8)
  %17 = trunc i64 %16 to i32
  %18 = xor i32 %15, %17
  %19 = icmp eq i32 %18, 1129136461
  br i1 %19, label %20, label %187

20:                                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %8, i64 16
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %187, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %8, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !15
  %30 = icmp sgt i32 %29, 1
  br i1 %30, label %187, label %31

31:                                               ; preds = %23
  %32 = getelementptr inbounds i8, ptr %8, i64 80
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !15
  %36 = icmp sgt i32 %35, 1
  br i1 %36, label %187, label %37

37:                                               ; preds = %31
  %38 = getelementptr inbounds i8, ptr %27, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !19
  %40 = add nsw i32 %39, 7
  %41 = sdiv i32 %40, 8
  %42 = getelementptr inbounds i8, ptr %27, i64 16
  %43 = load i32, ptr %42, align 8, !tbaa !20
  %44 = icmp eq ptr %9, null
  %45 = icmp eq ptr %3, null
  %or.cond = or i1 %45, %44
  br i1 %or.cond, label %187, label %46

46:                                               ; preds = %37
  %47 = icmp sgt i32 %4, -1
  br i1 %47, label %48, label %187

48:                                               ; preds = %46
  %49 = icmp eq ptr %0, null
  %50 = icmp eq ptr %2, null
  %or.cond145 = or i1 %49, %50
  br i1 %or.cond145, label %187, label %51

51:                                               ; preds = %48
  store i32 0, ptr %2, align 4, !tbaa !21
  %52 = shl nsw i32 %43, 4
  %53 = add nuw i32 %4, 33
  %54 = add i32 %53, %52
  %.not141 = icmp sgt i32 %54, %1
  br i1 %.not141, label %187, label %55

55:                                               ; preds = %51
  %56 = icmp eq ptr %7, null
  br i1 %56, label %187, label %57

57:                                               ; preds = %55
  %58 = load i32, ptr %7, align 8, !tbaa !22
  %59 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %7)
  %60 = trunc i64 %59 to i32
  %61 = xor i32 %58, %60
  %62 = icmp eq i32 %61, 1112098638
  br i1 %62, label %63, label %187

63:                                               ; preds = %57
  %64 = getelementptr inbounds i8, ptr %7, i64 4
  %65 = load i32, ptr %64, align 4, !tbaa !24
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %187, label %67

67:                                               ; preds = %63
  %68 = tail call i32 @gfec_CheckPrivateKey(ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %187, label %70

70:                                               ; preds = %67
  %71 = icmp eq ptr %5, null
  br i1 %71, label %187, label %72

72:                                               ; preds = %70
  %73 = load i32, ptr %5, align 8, !tbaa !25
  %74 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %5)
  %75 = trunc i64 %74 to i32
  %76 = xor i32 %73, %75
  %77 = icmp eq i32 %76, 1129136462
  br i1 %77, label %78, label %187

78:                                               ; preds = %72
  %79 = getelementptr inbounds i8, ptr %5, i64 8
  %80 = load i32, ptr %79, align 8, !tbaa !27
  %81 = load i32, ptr %42, align 8, !tbaa !20
  %.not142 = icmp eq i32 %80, %81
  br i1 %.not142, label %82, label %187

82:                                               ; preds = %78
  %83 = tail call i32 @gfec_IsPointOnCurve(ptr noundef nonnull %5, ptr noundef nonnull %8) #4
  %84 = icmp eq i32 %83, 0
  br i1 %84, label %187, label %85

85:                                               ; preds = %82
  %86 = icmp eq ptr %6, null
  br i1 %86, label %187, label %87

87:                                               ; preds = %85
  %88 = load i32, ptr %6, align 8, !tbaa !25
  %89 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %6)
  %90 = trunc i64 %89 to i32
  %91 = xor i32 %88, %90
  %92 = icmp eq i32 %91, 1129136462
  br i1 %92, label %93, label %187

93:                                               ; preds = %87
  %94 = getelementptr inbounds i8, ptr %6, i64 8
  %95 = load i32, ptr %94, align 8, !tbaa !27
  %96 = load i32, ptr %42, align 8, !tbaa !20
  %.not143 = icmp eq i32 %95, %96
  br i1 %.not143, label %97, label %187

97:                                               ; preds = %93
  %98 = tail call i32 @gfec_IsPointOnCurve(ptr noundef nonnull %6, ptr noundef nonnull %8) #4
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %187, label %100

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  %101 = tail call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef nonnull %8)
  %102 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %11, ptr noundef %101, i32 noundef 0, ptr noundef nonnull %8)
  %103 = call i32 @ippsGFpECPublicKey(ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  %104 = call i32 @gfec_ComparePoint(ptr noundef nonnull %11, ptr noundef nonnull %6, ptr noundef nonnull %8) #4
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef nonnull %8)
  %.not144 = icmp eq i32 %104, 0
  br i1 %.not144, label %186, label %105

105:                                              ; preds = %100
  %106 = getelementptr i8, ptr %0, i64 1
  %107 = sext i32 %52 to i64
  %108 = getelementptr i8, ptr %106, i64 %107
  %109 = getelementptr i8, ptr %108, i64 32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  %110 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef nonnull %8)
  %111 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %12, ptr noundef %110, i32 noundef 0, ptr noundef nonnull %8)
  store i8 4, ptr %0, align 1, !tbaa !28
  %112 = sext i32 %43 to i64
  %113 = getelementptr inbounds i64, ptr %106, i64 %112
  %114 = call i32 @gfec_GetPoint(ptr noundef nonnull %106, ptr noundef nonnull %113, ptr noundef nonnull %6, ptr noundef nonnull %8) #4
  %115 = getelementptr inbounds i8, ptr %27, i64 32
  %116 = load ptr, ptr %115, align 8, !tbaa !29
  %117 = getelementptr inbounds i8, ptr %116, i64 8
  %118 = load ptr, ptr %117, align 8, !tbaa !30
  %119 = call ptr %118(ptr noundef nonnull %106, ptr noundef nonnull %106, ptr noundef nonnull %27) #4
  %120 = load ptr, ptr %115, align 8, !tbaa !29
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  %122 = load ptr, ptr %121, align 8, !tbaa !30
  %123 = call ptr %122(ptr noundef nonnull %113, ptr noundef nonnull %113, ptr noundef nonnull %27) #4
  call void @cpSM2KE_reverse_inplace(ptr noundef nonnull %106, i32 noundef %41)
  call void @cpSM2KE_reverse_inplace(ptr noundef nonnull %113, i32 noundef %41)
  %124 = call i32 @ippsGFpECMulPoint(ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef nonnull %12, ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  %125 = call ptr @gsModPoolAlloc(ptr noundef nonnull %27, i32 noundef 2)
  %126 = getelementptr inbounds i64, ptr %125, i64 %112
  %127 = call i32 @gfec_GetPoint(ptr noundef %125, ptr noundef %126, ptr noundef nonnull %12, ptr noundef nonnull %8) #4
  %128 = load ptr, ptr %115, align 8, !tbaa !29
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  %130 = load ptr, ptr %129, align 8, !tbaa !30
  %131 = call ptr %130(ptr noundef %125, ptr noundef %125, ptr noundef nonnull %27) #4
  %132 = load ptr, ptr %115, align 8, !tbaa !29
  %133 = getelementptr inbounds i8, ptr %132, i64 8
  %134 = load ptr, ptr %133, align 8, !tbaa !30
  %135 = call ptr %134(ptr noundef %126, ptr noundef %126, ptr noundef nonnull %27) #4
  call void @cpSM2KE_reverse_inplace(ptr noundef %125, i32 noundef %41)
  call void @cpSM2KE_reverse_inplace(ptr noundef %126, i32 noundef %41)
  %136 = shl nsw i32 %41, 1
  %137 = call i32 @KDF_sm3(ptr noundef nonnull %109, i32 noundef %4, ptr noundef %125, i32 noundef %136) #4
  %.not147 = icmp eq i32 %4, 0
  br i1 %.not147, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %105
  %wide.trip.count = zext nneg i32 %4 to i64
  %min.iters.check = icmp ult i32 %4, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %138 = getelementptr i8, ptr %0, i64 %107
  %139 = getelementptr i8, ptr %138, i64 %wide.trip.count
  %scevgep = getelementptr i8, ptr %139, i64 33
  %scevgep149 = getelementptr i8, ptr %3, i64 %wide.trip.count
  %bound0 = icmp ult ptr %109, %scevgep149
  %bound1 = icmp ugt ptr %scevgep, %3
  %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.check150 = icmp ult i32 %4, 32
  br i1 %min.iters.check150, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 2147483616
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %140 = getelementptr inbounds i8, ptr %109, i64 %index
  %141 = getelementptr inbounds i8, ptr %140, i64 16
  %wide.load = load <16 x i8>, ptr %140, align 1, !tbaa !28, !alias.scope !32, !noalias !35
  %wide.load151 = load <16 x i8>, ptr %141, align 1, !tbaa !28, !alias.scope !32, !noalias !35
  %142 = getelementptr inbounds i8, ptr %3, i64 %index
  %143 = getelementptr inbounds i8, ptr %142, i64 16
  %wide.load152 = load <16 x i8>, ptr %142, align 1, !tbaa !28, !alias.scope !35
  %wide.load153 = load <16 x i8>, ptr %143, align 1, !tbaa !28, !alias.scope !35
  %144 = xor <16 x i8> %wide.load152, %wide.load
  %145 = xor <16 x i8> %wide.load153, %wide.load151
  store <16 x i8> %144, ptr %140, align 1, !tbaa !28, !alias.scope !32, !noalias !35
  store <16 x i8> %145, ptr %141, align 1, !tbaa !28, !alias.scope !32, !noalias !35
  %index.next = add nuw i64 %index, 32
  %146 = icmp eq i64 %index.next, %n.vec
  br i1 %146, label %middle.block, label %vector.body, !llvm.loop !37

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

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count, 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
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec155, %vec.epilog.middle.block ]
  %xtraiter = and i64 %wide.trip.count, 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
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %147 = getelementptr inbounds i8, ptr %109, i64 %indvars.iv.prol
  %148 = load i8, ptr %147, align 1, !tbaa !28
  %149 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.prol
  %150 = load i8, ptr %149, align 1, !tbaa !28
  %151 = xor i8 %150, %148
  store i8 %151, ptr %147, align 1, !tbaa !28
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.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 !41

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %152 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %153 = icmp ugt i64 %152, -4
  br i1 %153, 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.vec155 = and i64 %wide.trip.count, 2147483640
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index156 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next159, %vec.epilog.vector.body ]
  %154 = getelementptr inbounds i8, ptr %109, i64 %index156
  %wide.load157 = load <8 x i8>, ptr %154, align 1, !tbaa !28, !alias.scope !43, !noalias !46
  %155 = getelementptr inbounds i8, ptr %3, i64 %index156
  %wide.load158 = load <8 x i8>, ptr %155, align 1, !tbaa !28, !alias.scope !46
  %156 = xor <8 x i8> %wide.load158, %wide.load157
  store <8 x i8> %156, ptr %154, align 1, !tbaa !28, !alias.scope !43, !noalias !46
  %index.next159 = add nuw i64 %index156, 8
  %157 = icmp eq i64 %index.next159, %n.vec155
  br i1 %157, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !48

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n160 = icmp eq i64 %n.vec155, %wide.trip.count
  br i1 %cmp.n160, label %._crit_edge, label %.lr.ph.preheader

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %105
  %158 = call ptr @ippsHashMethod_SM3_TT() #4
  %159 = call i32 @ippsHashInit_rmf(ptr noundef nonnull @ippsGFpECEncryptSM2_Ext.ctx, ptr noundef %158) #4
  %160 = call i32 @ippsHashUpdate_rmf(ptr noundef %125, i32 noundef %41, ptr noundef nonnull @ippsGFpECEncryptSM2_Ext.ctx) #4
  %161 = call i32 @ippsHashUpdate_rmf(ptr noundef nonnull %3, i32 noundef %4, ptr noundef nonnull @ippsGFpECEncryptSM2_Ext.ctx) #4
  %162 = call i32 @ippsHashUpdate_rmf(ptr noundef %126, i32 noundef %41, ptr noundef nonnull @ippsGFpECEncryptSM2_Ext.ctx) #4
  %163 = call i32 @ippsHashFinal_rmf(ptr noundef nonnull %108, ptr noundef nonnull @ippsGFpECEncryptSM2_Ext.ctx) #4
  store i32 %54, ptr %2, align 4, !tbaa !21
  %164 = call ptr @cpBN_zero(ptr noundef nonnull %7)
  %165 = call ptr @gfec_SetPointAtInfinity(ptr noundef nonnull %6)
  call void @gsModPoolFree(ptr noundef %27, i32 noundef 2)
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef nonnull %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  br label %186

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %166 = getelementptr inbounds i8, ptr %109, i64 %indvars.iv
  %167 = load i8, ptr %166, align 1, !tbaa !28
  %168 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv
  %169 = load i8, ptr %168, align 1, !tbaa !28
  %170 = xor i8 %169, %167
  store i8 %170, ptr %166, align 1, !tbaa !28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %171 = getelementptr inbounds i8, ptr %109, i64 %indvars.iv.next
  %172 = load i8, ptr %171, align 1, !tbaa !28
  %173 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next
  %174 = load i8, ptr %173, align 1, !tbaa !28
  %175 = xor i8 %174, %172
  store i8 %175, ptr %171, align 1, !tbaa !28
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %176 = getelementptr inbounds i8, ptr %109, i64 %indvars.iv.next.1
  %177 = load i8, ptr %176, align 1, !tbaa !28
  %178 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next.1
  %179 = load i8, ptr %178, align 1, !tbaa !28
  %180 = xor i8 %179, %177
  store i8 %180, ptr %176, align 1, !tbaa !28
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %181 = getelementptr inbounds i8, ptr %109, i64 %indvars.iv.next.2
  %182 = load i8, ptr %181, align 1, !tbaa !28
  %183 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next.2
  %184 = load i8, ptr %183, align 1, !tbaa !28
  %185 = xor i8 %184, %182
  store i8 %185, ptr %181, align 1, !tbaa !28
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !49

186:                                              ; preds = %100, %._crit_edge
  %.0130 = phi i32 [ 0, %._crit_edge ], [ -1011, %100 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %187

187:                                              ; preds = %23, %37, %46, %48, %97, %93, %87, %85, %82, %78, %72, %70, %67, %63, %57, %55, %51, %186, %31, %20, %14, %10
  %.5 = phi i32 [ -8, %10 ], [ -13, %14 ], [ -13, %20 ], [ -14, %23 ], [ -14, %31 ], [ -8, %37 ], [ -11, %46 ], [ -8, %48 ], [ %.0130, %186 ], [ -11, %51 ], [ -8, %55 ], [ -13, %57 ], [ -1008, %63 ], [ -1008, %67 ], [ -8, %70 ], [ -13, %72 ], [ -11, %78 ], [ -1017, %82 ], [ -8, %85 ], [ -13, %87 ], [ -11, %93 ], [ -1017, %97 ]
  ret i32 %.5
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) local_unnamed_addr #1

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

declare i32 @gfec_CheckPrivateKey(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @gfec_IsPointOnCurve(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare i32 @ippsGFpECPublicKey(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @gfec_ComparePoint(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpEcGFpReleasePool(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @gfec_GetPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpSM2KE_reverse_inplace(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @ippsGFpECMulPoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @KDF_sm3(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare i32 @ippsHashInit_rmf(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @ippsHashMethod_SM3_TT() local_unnamed_addr #3

declare i32 @ippsHashUpdate_rmf(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @ippsHashFinal_rmf(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @gsModPoolFree(ptr noundef, i32 noundef) local_unnamed_addr #1

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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 0}
!6 = !{!"_cpGFpEC", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !10, i64 8}
!14 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!15 = !{!16, !7, i64 8}
!16 = !{!"_gsModEngine", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !17, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!17 = !{!"long long", !8, i64 0}
!18 = !{!6, !10, i64 80}
!19 = !{!16, !7, i64 12}
!20 = !{!16, !7, i64 16}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !7, i64 0}
!23 = !{!"_cpBigNum", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24}
!24 = !{!23, !7, i64 4}
!25 = !{!26, !7, i64 0}
!26 = !{!"_cpGFpECPoint", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!27 = !{!26, !7, i64 8}
!28 = !{!8, !8, i64 0}
!29 = !{!16, !10, i64 32}
!30 = !{!31, !10, i64 8}
!31 = !{!"_gsModMethod", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!32 = !{!33}
!33 = distinct !{!33, !34}
!34 = distinct !{!34, !"LVerDomain"}
!35 = !{!36}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !38, !39, !40}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!"llvm.loop.isvectorized", i32 1}
!40 = !{!"llvm.loop.unroll.runtime.disable"}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.unroll.disable"}
!43 = !{!44}
!44 = distinct !{!44, !45}
!45 = distinct !{!45, !"LVerDomain"}
!46 = !{!47}
!47 = distinct !{!47, !45}
!48 = distinct !{!48, !38, !39, !40}
!49 = distinct !{!49, !38, !39}


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