; LLVM IR from intel/cryptography-primitives :: sources/ippcp (pcprsasign_pss)

; 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._cpBigNum = type { i32, i32, i32, i32, ptr, ptr }
%struct._cpRSA_private_key = type { i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpRSA_public_key = type { i32, i32, i32, i32, i32, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsRSASign_PSS(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8) #0 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca [64 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca %struct._cpBigNum, align 8
  %27 = alloca %struct._cpBigNum, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !9
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store i32 %7, ptr %18, align 4, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !5
  %37 = load i32, ptr %18, align 4, !tbaa !9
  %38 = call i32 @cpValidHashAlg(i32 noundef %37)
  store i32 %38, ptr %18, align 4, !tbaa !9
  %39 = load i32, ptr %18, align 4, !tbaa !9
  %40 = icmp eq i32 0, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %9
  store i32 -14, ptr %10, align 4
  br label %302

42:                                               ; preds = %9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  store i32 -15, ptr %10, align 4
  br label %302

46:                                               ; preds = %42
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %53

49:                                               ; preds = %46
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 -8, ptr %10, align 4
  br label %302

53:                                               ; preds = %49, %46
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = icmp eq ptr null, %54
  br i1 %55, label %56, label %57

56:                                               ; preds = %53
  store i32 -8, ptr %10, align 4
  br label %302

57:                                               ; preds = %53
  %58 = load i32, ptr %14, align 4, !tbaa !9
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  store i32 -15, ptr %10, align 4
  br label %302

61:                                               ; preds = %57
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %68

64:                                               ; preds = %61
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 -8, ptr %10, align 4
  br label %302

68:                                               ; preds = %64, %61
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = icmp eq ptr null, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  store i32 -8, ptr %10, align 4
  br label %302

72:                                               ; preds = %68
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = icmp eq ptr null, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  store i32 -8, ptr %10, align 4
  br label %302

76:                                               ; preds = %72
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._cpRSA_private_key, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = call i64 @IPP_UINT_PTR(ptr noundef %80)
  %82 = trunc i64 %81 to i32
  %83 = xor i32 %79, %82
  %84 = icmp eq i32 %83, 1381187889
  br i1 %84, label %95, label %85

85:                                               ; preds = %76
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._cpRSA_private_key, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = call i64 @IPP_UINT_PTR(ptr noundef %89)
  %91 = trunc i64 %90 to i32
  %92 = xor i32 %88, %91
  %93 = icmp eq i32 %92, 1381187890
  br i1 %93, label %95, label %94

94:                                               ; preds = %85
  store i32 -13, ptr %10, align 4
  br label %302

95:                                               ; preds = %85, %76
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._cpRSA_private_key, ptr %96, i32 0, i32 3
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %101, label %100

100:                                              ; preds = %95
  store i32 -1013, ptr %10, align 4
  br label %302

101:                                              ; preds = %95
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %121

104:                                              ; preds = %101
  %105 = load ptr, ptr %17, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._cpRSA_public_key, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !14
  %108 = load ptr, ptr %17, align 8, !tbaa !5
  %109 = call i64 @IPP_UINT_PTR(ptr noundef %108)
  %110 = trunc i64 %109 to i32
  %111 = xor i32 %107, %110
  %112 = icmp eq i32 %111, 1381187888
  br i1 %112, label %114, label %113

113:                                              ; preds = %104
  store i32 -13, ptr %10, align 4
  br label %302

114:                                              ; preds = %104
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._cpRSA_public_key, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !16
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %120, label %119

119:                                              ; preds = %114
  store i32 -1013, ptr %10, align 4
  br label %302

120:                                              ; preds = %114
  br label %121

121:                                              ; preds = %120, %101
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %122 = load i32, ptr %18, align 4, !tbaa !9
  %123 = call i32 @cpHashSize(i32 noundef %122)
  store i32 %123, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._cpRSA_private_key, ptr %124, i32 0, i32 3
  %126 = load i32, ptr %125, align 4, !tbaa !13
  store i32 %126, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = add nsw i32 %127, 7
  %129 = ashr i32 %128, 3
  store i32 %129, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %130 = load i32, ptr %22, align 4, !tbaa !9
  %131 = add nsw i32 %130, 64
  %132 = sub nsw i32 %131, 1
  %133 = sdiv i32 %132, 64
  store i32 %133, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = call i64 @IPP_INT_PTR(ptr noundef %135)
  %137 = and i64 %136, 7
  %138 = xor i64 %137, -1
  %139 = add nsw i64 %138, 1
  %140 = and i64 %139, 7
  %141 = getelementptr inbounds i8, ptr %134, i64 %140
  store ptr %141, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %142 = load i32, ptr %22, align 4, !tbaa !9
  %143 = sub nsw i32 %142, 1
  store i32 %143, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %144 = load i32, ptr %28, align 4, !tbaa !9
  %145 = add nsw i32 %144, 7
  %146 = ashr i32 %145, 3
  store i32 %146, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %147 = load i32, ptr %29, align 4, !tbaa !9
  %148 = load i32, ptr %21, align 4, !tbaa !9
  %149 = sub nsw i32 %147, %148
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = sub nsw i32 %149, %150
  %152 = sub nsw i32 %151, 2
  store i32 %152, ptr %30, align 4, !tbaa !9
  %153 = load i32, ptr %30, align 4, !tbaa !9
  %154 = icmp sgt i32 0, %153
  br i1 %154, label %155, label %156

155:                                              ; preds = %121
  store i32 -15, ptr %10, align 4
  store i32 1, ptr %31, align 4
  br label %301

156:                                              ; preds = %121
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %160 = load i32, ptr %18, align 4, !tbaa !9
  %161 = call i32 @ippsHashMessage(ptr noundef %157, i32 noundef %158, ptr noundef %159, i32 noundef %160)
  %162 = load ptr, ptr %25, align 8, !tbaa !5
  %163 = load ptr, ptr %25, align 8, !tbaa !5
  %164 = load i32, ptr %24, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i64, ptr %163, i64 %165
  %167 = getelementptr inbounds i64, ptr %166, i64 1
  %168 = load i32, ptr %24, align 4, !tbaa !9
  %169 = call ptr @BN_Make(ptr noundef %162, ptr noundef %167, i32 noundef %168, ptr noundef %26)
  %170 = load i32, ptr %24, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  %172 = mul nsw i32 %171, 2
  %173 = load ptr, ptr %25, align 8, !tbaa !5
  %174 = sext i32 %172 to i64
  %175 = getelementptr inbounds i64, ptr %173, i64 %174
  store ptr %175, ptr %25, align 8, !tbaa !5
  %176 = load ptr, ptr %25, align 8, !tbaa !5
  %177 = load ptr, ptr %25, align 8, !tbaa !5
  %178 = load i32, ptr %24, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i64, ptr %177, i64 %179
  %181 = getelementptr inbounds i64, ptr %180, i64 1
  %182 = load i32, ptr %24, align 4, !tbaa !9
  %183 = call ptr @BN_Make(ptr noundef %176, ptr noundef %181, i32 noundef %182, ptr noundef %27)
  %184 = load i32, ptr %24, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  %186 = mul nsw i32 %185, 2
  %187 = load ptr, ptr %25, align 8, !tbaa !5
  %188 = sext i32 %186 to i64
  %189 = getelementptr inbounds i64, ptr %187, i64 %188
  store ptr %189, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  %190 = getelementptr inbounds %struct._cpBigNum, ptr %27, i32 0, i32 4
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  store ptr %191, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %192, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %193 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %193, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  %194 = load i32, ptr %29, align 4, !tbaa !9
  %195 = load i32, ptr %21, align 4, !tbaa !9
  %196 = sub nsw i32 %194, %195
  %197 = sub nsw i32 %196, 1
  store i32 %197, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %198 = load ptr, ptr %15, align 8, !tbaa !5
  %199 = load i32, ptr %35, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i8, ptr %198, i64 %200
  store ptr %201, ptr %36, align 8, !tbaa !5
  %202 = load ptr, ptr %32, align 8, !tbaa !5
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef %202, i32 noundef 8)
  %203 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %204 = load ptr, ptr %32, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i64 8
  %206 = load i32, ptr %21, align 4, !tbaa !9
  call void @CopyBlock(ptr noundef %203, ptr noundef %205, i32 noundef %206)
  %207 = load ptr, ptr %13, align 8, !tbaa !5
  %208 = load ptr, ptr %32, align 8, !tbaa !5
  %209 = getelementptr inbounds i8, ptr %208, i64 8
  %210 = load i32, ptr %21, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds i8, ptr %209, i64 %211
  %213 = load i32, ptr %14, align 4, !tbaa !9
  call void @CopyBlock(ptr noundef %207, ptr noundef %212, i32 noundef %213)
  %214 = load ptr, ptr %33, align 8, !tbaa !5
  %215 = load i32, ptr %29, align 4, !tbaa !9
  %216 = sub nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i8, ptr %214, i64 %217
  store i8 -68, ptr %218, align 1, !tbaa !19
  %219 = load ptr, ptr %32, align 8, !tbaa !5
  %220 = load i32, ptr %21, align 4, !tbaa !9
  %221 = add nsw i32 8, %220
  %222 = load i32, ptr %14, align 4, !tbaa !9
  %223 = add nsw i32 %221, %222
  %224 = load ptr, ptr %36, align 8, !tbaa !5
  %225 = load i32, ptr %18, align 4, !tbaa !9
  %226 = call i32 @ippsHashMessage(ptr noundef %219, i32 noundef %223, ptr noundef %224, i32 noundef %225)
  %227 = load ptr, ptr %36, align 8, !tbaa !5
  %228 = load i32, ptr %21, align 4, !tbaa !9
  %229 = load ptr, ptr %34, align 8, !tbaa !5
  %230 = load i32, ptr %35, align 4, !tbaa !9
  %231 = load i32, ptr %18, align 4, !tbaa !9
  %232 = call i32 @ippsMGF(ptr noundef %227, i32 noundef %228, ptr noundef %229, i32 noundef %230, i32 noundef %231)
  %233 = load ptr, ptr %34, align 8, !tbaa !5
  %234 = load i32, ptr %30, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds i8, ptr %233, i64 %235
  %237 = getelementptr inbounds i8, ptr %236, i64 1
  %238 = load ptr, ptr %13, align 8, !tbaa !5
  %239 = load ptr, ptr %34, align 8, !tbaa !5
  %240 = load i32, ptr %30, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds i8, ptr %239, i64 %241
  %243 = getelementptr inbounds i8, ptr %242, i64 1
  %244 = load i32, ptr %14, align 4, !tbaa !9
  call void @XorBlock(ptr noundef %237, ptr noundef %238, ptr noundef %243, i32 noundef %244)
  %245 = load ptr, ptr %34, align 8, !tbaa !5
  %246 = load i32, ptr %30, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds i8, ptr %245, i64 %247
  %249 = load i8, ptr %248, align 1, !tbaa !19
  %250 = zext i8 %249 to i32
  %251 = xor i32 %250, 1
  %252 = trunc i32 %251 to i8
  store i8 %252, ptr %248, align 1, !tbaa !19
  %253 = load i32, ptr %29, align 4, !tbaa !9
  %254 = mul nsw i32 8, %253
  %255 = sub nsw i32 8, %254
  %256 = load i32, ptr %28, align 4, !tbaa !9
  %257 = add nsw i32 %255, %256
  %258 = and i32 %257, 31
  %259 = sub nsw i32 32, %258
  %260 = and i32 %259, 31
  %261 = lshr i32 -1, %260
  %262 = load ptr, ptr %34, align 8, !tbaa !5
  %263 = getelementptr inbounds i8, ptr %262, i64 0
  %264 = load i8, ptr %263, align 1, !tbaa !19
  %265 = zext i8 %264 to i32
  %266 = and i32 %265, %261
  %267 = trunc i32 %266 to i8
  store i8 %267, ptr %263, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  %268 = load ptr, ptr %15, align 8, !tbaa !5
  %269 = load i32, ptr %29, align 4, !tbaa !9
  %270 = call i32 @ippsSetOctString_BN(ptr noundef %268, i32 noundef %269, ptr noundef %26)
  %271 = load ptr, ptr %16, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct._cpRSA_private_key, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %272, align 8, !tbaa !11
  %274 = load ptr, ptr %16, align 8, !tbaa !5
  %275 = call i64 @IPP_UINT_PTR(ptr noundef %274)
  %276 = trunc i64 %275 to i32
  %277 = xor i32 %273, %276
  %278 = icmp eq i32 %277, 1381187889
  br i1 %278, label %279, label %282

279:                                              ; preds = %156
  %280 = load ptr, ptr %16, align 8, !tbaa !5
  %281 = load ptr, ptr %25, align 8, !tbaa !5
  call void @gsRSAprv_cipher(ptr noundef %27, ptr noundef %26, ptr noundef %280, ptr noundef %281)
  br label %285

282:                                              ; preds = %156
  %283 = load ptr, ptr %16, align 8, !tbaa !5
  %284 = load ptr, ptr %25, align 8, !tbaa !5
  call void @gsRSAprv_cipher_crt(ptr noundef %27, ptr noundef %26, ptr noundef %283, ptr noundef %284)
  br label %285

285:                                              ; preds = %282, %279
  %286 = load ptr, ptr %15, align 8, !tbaa !5
  %287 = load i32, ptr %23, align 4, !tbaa !9
  %288 = call i32 @ippsGetOctString_BN(ptr noundef %286, i32 noundef %287, ptr noundef %27)
  %289 = load ptr, ptr %17, align 8, !tbaa !5
  %290 = icmp ne ptr %289, null
  br i1 %290, label %292, label %291

291:                                              ; preds = %285
  store i32 0, ptr %10, align 4
  store i32 1, ptr %31, align 4
  br label %301

292:                                              ; preds = %285
  %293 = load ptr, ptr %17, align 8, !tbaa !5
  %294 = load ptr, ptr %25, align 8, !tbaa !5
  call void @gsRSApub_cipher(ptr noundef %27, ptr noundef %27, ptr noundef %293, ptr noundef %294)
  %295 = call i32 @cpBN_cmp(ptr noundef %27, ptr noundef %26)
  %296 = icmp eq i32 0, %295
  br i1 %296, label %297, label %298

297:                                              ; preds = %292
  store i32 0, ptr %10, align 4
  store i32 1, ptr %31, align 4
  br label %301

298:                                              ; preds = %292
  %299 = load ptr, ptr %15, align 8, !tbaa !5
  %300 = load i32, ptr %23, align 4, !tbaa !9
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef %299, i32 noundef %300)
  store i32 -2, ptr %10, align 4
  store i32 1, ptr %31, align 4
  br label %301

301:                                              ; preds = %298, %297, %291, %155
  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
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #4
  br label %302

302:                                              ; preds = %301, %119, %113, %100, %94, %75, %71, %67, %60, %56, %52, %45, %41
  %303 = load i32, ptr %10, align 4
  ret i32 %303
}

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

; 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

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

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

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

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

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

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

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

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

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

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

declare void @gsRSAprv_cipher(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @gsRSAprv_cipher_crt(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare void @gsRSApub_cipher(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpBN_cmp(ptr noundef, ptr 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 = !{!"_cpRSA_private_key", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!13 = !{!12, !10, i64 12}
!14 = !{!15, !10, i64 0}
!15 = !{!"_cpRSA_public_key", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32}
!16 = !{!15, !10, i64 12}
!17 = !{!18, !6, i64 16}
!18 = !{!"_cpBigNum", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24}
!19 = !{!7, !7, i64 0}


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

%struct._cpBigNum = type { i32, i32, i32, i32, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1013, 1) i32 @ippsRSASign_PSS(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca [64 x i8], align 16
  %11 = alloca %struct._cpBigNum, align 8
  %12 = alloca %struct._cpBigNum, align 8
  %13 = tail call i32 @cpValidHashAlg(i32 noundef %7)
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %128, label %15

15:                                               ; preds = %9
  %16 = icmp slt i32 %1, 0
  br i1 %16, label %128, label %17

17:                                               ; preds = %15
  %18 = icmp ne i32 %1, 0
  %19 = icmp eq ptr %0, null
  %or.cond.not115 = and i1 %19, %18
  %20 = icmp eq ptr %4, null
  %or.cond110 = or i1 %or.cond.not115, %20
  br i1 %or.cond110, label %128, label %21

21:                                               ; preds = %17
  %22 = icmp slt i32 %3, 0
  br i1 %22, label %128, label %23

23:                                               ; preds = %21
  %24 = icmp ne i32 %3, 0
  %25 = icmp eq ptr %2, null
  %or.cond3.not118 = and i1 %25, %24
  %26 = icmp eq ptr %5, null
  %or.cond111 = or i1 %or.cond3.not118, %26
  %27 = icmp eq ptr %8, null
  %or.cond112 = or i1 %or.cond111, %27
  br i1 %or.cond112, label %128, label %28

28:                                               ; preds = %23
  %29 = load i32, ptr %5, align 8, !tbaa !5
  %30 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %5)
  %31 = trunc i64 %30 to i32
  %32 = xor i32 %29, %31
  %33 = icmp eq i32 %32, 1381187889
  br i1 %33, label %40, label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %5, align 8, !tbaa !5
  %36 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %5)
  %37 = trunc i64 %36 to i32
  %38 = xor i32 %35, %37
  %39 = icmp eq i32 %38, 1381187890
  br i1 %39, label %40, label %128

40:                                               ; preds = %34, %28
  %41 = getelementptr inbounds i8, ptr %5, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %128

44:                                               ; preds = %40
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %55, label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %6, align 8, !tbaa !12
  %47 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %6)
  %48 = trunc i64 %47 to i32
  %49 = xor i32 %46, %48
  %50 = icmp eq i32 %49, 1381187888
  br i1 %50, label %51, label %128

51:                                               ; preds = %45
  %52 = getelementptr inbounds i8, ptr %6, i64 12
  %53 = load i32, ptr %52, align 4, !tbaa !14
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %128

55:                                               ; preds = %51, %44
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  %56 = tail call i32 @cpHashSize(i32 noundef %13)
  %57 = load i32, ptr %41, align 4, !tbaa !11
  %58 = add nsw i32 %57, 7
  %59 = ashr i32 %58, 3
  %60 = tail call i64 @IPP_INT_PTR(ptr noundef nonnull %8)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  %61 = add nsw i32 %57, 6
  %62 = ashr i32 %61, 3
  %63 = sub nsw i32 %62, %56
  %64 = sub nsw i32 %63, %3
  %65 = icmp slt i32 %64, 2
  br i1 %65, label %127, label %66

66:                                               ; preds = %55
  %67 = sub i64 0, %60
  %68 = and i64 %67, 7
  %69 = getelementptr inbounds i8, ptr %8, i64 %68
  %70 = add nsw i32 %57, 63
  %71 = sdiv i32 %70, 64
  %72 = call i32 @ippsHashMessage(ptr noundef %0, i32 noundef %1, ptr noundef nonnull %10, i32 noundef %13) #4
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds i64, ptr %69, i64 %73
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = call ptr @BN_Make(ptr noundef nonnull %69, ptr noundef nonnull %75, i32 noundef %71, ptr noundef nonnull %11)
  %77 = shl nsw i32 %71, 1
  %78 = add nsw i32 %77, 2
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i64, ptr %69, i64 %79
  %81 = getelementptr inbounds i64, ptr %80, i64 %73
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = call ptr @BN_Make(ptr noundef nonnull %80, ptr noundef nonnull %82, i32 noundef %71, ptr noundef nonnull %12)
  %84 = getelementptr inbounds i64, ptr %80, i64 %79
  %85 = getelementptr inbounds i8, ptr %12, i64 16
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = add nsw i32 %63, -1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %4, i64 %88
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef %86, i32 noundef 8)
  %90 = getelementptr inbounds i8, ptr %86, i64 8
  call void @CopyBlock(ptr noundef nonnull %10, ptr noundef nonnull %90, i32 noundef %56)
  %91 = sext i32 %56 to i64
  %92 = getelementptr inbounds i8, ptr %90, i64 %91
  call void @CopyBlock(ptr noundef %2, ptr noundef nonnull %92, i32 noundef %3)
  %93 = sext i32 %62 to i64
  %94 = getelementptr i8, ptr %4, i64 %93
  %95 = getelementptr i8, ptr %94, i64 -1
  store i8 -68, ptr %95, align 1, !tbaa !17
  %96 = add nuw i32 %3, 8
  %97 = add i32 %96, %56
  %98 = call i32 @ippsHashMessage(ptr noundef %86, i32 noundef %97, ptr noundef nonnull %89, i32 noundef %13) #4
  %99 = call i32 @ippsMGF(ptr noundef nonnull %89, i32 noundef %56, ptr noundef nonnull %4, i32 noundef %87, i32 noundef %13) #4
  %100 = zext nneg i32 %64 to i64
  %101 = getelementptr i8, ptr %4, i64 %100
  %102 = getelementptr i8, ptr %101, i64 -2
  %103 = getelementptr i8, ptr %101, i64 -1
  call void @XorBlock(ptr noundef %103, ptr noundef %2, ptr noundef %103, i32 noundef %3)
  %104 = load i8, ptr %102, align 1, !tbaa !17
  %105 = xor i8 %104, 1
  store i8 %105, ptr %102, align 1, !tbaa !17
  %106 = and i32 %61, 24
  %reass.sub = sub i32 %106, %57
  %107 = add i32 %reass.sub, 25
  %108 = and i32 %107, 31
  %109 = lshr i32 -1, %108
  %110 = load i8, ptr %4, align 1, !tbaa !17
  %111 = trunc i32 %109 to i8
  %112 = and i8 %110, %111
  store i8 %112, ptr %4, align 1, !tbaa !17
  %113 = call i32 @ippsSetOctString_BN(ptr noundef nonnull %4, i32 noundef %62, ptr noundef nonnull %11) #4
  %114 = load i32, ptr %5, align 8, !tbaa !5
  %115 = call i64 @IPP_UINT_PTR(ptr noundef nonnull %5)
  %116 = trunc i64 %115 to i32
  %117 = xor i32 %114, %116
  %118 = icmp eq i32 %117, 1381187889
  br i1 %118, label %119, label %120

119:                                              ; preds = %66
  call void @gsRSAprv_cipher(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef nonnull %5, ptr noundef nonnull %84) #4
  br label %121

120:                                              ; preds = %66
  call void @gsRSAprv_cipher_crt(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef nonnull %5, ptr noundef nonnull %84) #4
  br label %121

121:                                              ; preds = %120, %119
  %122 = call i32 @ippsGetOctString_BN(ptr noundef nonnull %4, i32 noundef %59, ptr noundef nonnull %12) #4
  br i1 %.not, label %127, label %123

123:                                              ; preds = %121
  call void @gsRSApub_cipher(ptr noundef nonnull %12, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %84) #4
  %124 = call i32 @cpBN_cmp(ptr noundef nonnull %12, ptr noundef nonnull %11)
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %127, label %126

126:                                              ; preds = %123
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef nonnull %4, i32 noundef %59)
  br label %127

127:                                              ; preds = %123, %121, %55, %126
  %.0 = phi i32 [ -2, %126 ], [ -15, %55 ], [ 0, %121 ], [ 0, %123 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  br label %128

128:                                              ; preds = %51, %45, %40, %34, %23, %21, %17, %15, %9, %127
  %.1 = phi i32 [ %.0, %127 ], [ -14, %9 ], [ -15, %15 ], [ -8, %17 ], [ -15, %21 ], [ -8, %23 ], [ -13, %34 ], [ -1013, %40 ], [ -13, %45 ], [ -1013, %51 ]
  ret i32 %.1
}

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

; 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

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

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

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

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

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

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

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

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

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

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

declare void @gsRSAprv_cipher(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @gsRSAprv_cipher_crt(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @gsRSApub_cipher(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpBN_cmp(ptr noundef, ptr 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 = !{!"_cpRSA_private_key", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!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 12}
!12 = !{!13, !7, i64 0}
!13 = !{!"_cpRSA_public_key", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32}
!14 = !{!13, !7, i64 12}
!15 = !{!16, !10, i64 16}
!16 = !{!"_cpBigNum", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24}
!17 = !{!8, !8, i64 0}


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