; LLVM IR from intel/cryptography-primitives :: sources/ippcp (pcprsaverify_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_public_key = type { i32, i32, i32, i32, i32, ptr, ptr }

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

38:                                               ; preds = %7
  store i32 -14, ptr %8, align 4
  br label %280

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

42:                                               ; preds = %39
  store i32 -15, ptr %8, align 4
  br label %280

43:                                               ; preds = %39
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %50

46:                                               ; preds = %43
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 -8, ptr %8, align 4
  br label %280

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

53:                                               ; preds = %50
  store i32 -8, ptr %8, align 4
  br label %280

54:                                               ; preds = %50
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = icmp eq ptr null, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  store i32 -8, ptr %8, align 4
  br label %280

58:                                               ; preds = %54
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = icmp eq ptr null, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i32 -8, ptr %8, align 4
  br label %280

62:                                               ; preds = %58
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  %64 = icmp eq ptr null, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store i32 -8, ptr %8, align 4
  br label %280

66:                                               ; preds = %62
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._cpRSA_public_key, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = call i64 @IPP_UINT_PTR(ptr noundef %70)
  %72 = trunc i64 %71 to i32
  %73 = xor i32 %69, %72
  %74 = icmp eq i32 %73, 1381187888
  br i1 %74, label %76, label %75

75:                                               ; preds = %66
  store i32 -13, ptr %8, align 4
  br label %280

76:                                               ; preds = %66
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._cpRSA_public_key, ptr %77, i32 0, i32 3
  %79 = load i32, ptr %78, align 4, !tbaa !13
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  store i32 -1013, ptr %8, align 4
  br label %280

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = call i32 @cpHashSize(i32 noundef %83)
  store i32 %84, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._cpRSA_public_key, ptr %85, i32 0, i32 3
  %87 = load i32, ptr %86, align 4, !tbaa !13
  store i32 %87, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %88 = load i32, ptr %18, align 4, !tbaa !9
  %89 = add nsw i32 %88, 7
  %90 = ashr i32 %89, 3
  store i32 %90, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %91 = load i32, ptr %18, align 4, !tbaa !9
  %92 = add nsw i32 %91, 64
  %93 = sub nsw i32 %92, 1
  %94 = sdiv i32 %93, 64
  store i32 %94, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = call i64 @IPP_INT_PTR(ptr noundef %96)
  %98 = and i64 %97, 7
  %99 = xor i64 %98, -1
  %100 = add nsw i64 %99, 1
  %101 = and i64 %100, 7
  %102 = getelementptr inbounds i8, ptr %95, i64 %101
  store ptr %102, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %103 = load i32, ptr %18, align 4, !tbaa !9
  %104 = sub nsw i32 %103, 1
  store i32 %104, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %105 = load i32, ptr %24, align 4, !tbaa !9
  %106 = add nsw i32 %105, 7
  %107 = ashr i32 %106, 3
  store i32 %107, ptr %25, align 4, !tbaa !9
  %108 = load i32, ptr %19, align 4, !tbaa !9
  %109 = load i32, ptr %17, align 4, !tbaa !9
  %110 = add nsw i32 %109, 2
  %111 = icmp sle i32 %108, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %82
  store i32 -15, ptr %8, align 4
  store i32 1, ptr %26, align 4
  br label %279

113:                                              ; preds = %82
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = getelementptr inbounds [64 x i8], ptr %16, i64 0, i64 0
  %117 = load i32, ptr %14, align 4, !tbaa !9
  %118 = call i32 @ippsHashMessage(ptr noundef %114, i32 noundef %115, ptr noundef %116, i32 noundef %117)
  %119 = load ptr, ptr %21, align 8, !tbaa !5
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = load i32, ptr %20, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i64, ptr %120, i64 %122
  %124 = getelementptr inbounds i64, ptr %123, i64 1
  %125 = load i32, ptr %20, align 4, !tbaa !9
  %126 = call ptr @BN_Make(ptr noundef %119, ptr noundef %124, i32 noundef %125, ptr noundef %22)
  %127 = load i32, ptr %20, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  %129 = mul nsw i32 %128, 2
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  %131 = sext i32 %129 to i64
  %132 = getelementptr inbounds i64, ptr %130, i64 %131
  store ptr %132, ptr %21, align 8, !tbaa !5
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = load ptr, ptr %21, align 8, !tbaa !5
  %135 = load i32, ptr %20, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i64, ptr %134, i64 %136
  %138 = getelementptr inbounds i64, ptr %137, i64 1
  %139 = load i32, ptr %20, align 4, !tbaa !9
  %140 = call ptr @BN_Make(ptr noundef %133, ptr noundef %138, i32 noundef %139, ptr noundef %23)
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  %143 = mul nsw i32 %142, 2
  %144 = load ptr, ptr %21, align 8, !tbaa !5
  %145 = sext i32 %143 to i64
  %146 = getelementptr inbounds i64, ptr %144, i64 %145
  store ptr %146, ptr %21, align 8, !tbaa !5
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = load i32, ptr %19, align 4, !tbaa !9
  %149 = call i32 @ippsSetOctString_BN(ptr noundef %147, i32 noundef %148, ptr noundef %23)
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = load ptr, ptr %21, align 8, !tbaa !5
  call void @gsRSApub_cipher(ptr noundef %22, ptr noundef %23, ptr noundef %150, ptr noundef %151)
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %152, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %153 = getelementptr inbounds %struct._cpBigNum, ptr %22, i32 0, i32 5
  %154 = load ptr, ptr %153, align 8, !tbaa !14
  store ptr %154, ptr %27, align 8, !tbaa !5
  %155 = load ptr, ptr %27, align 8, !tbaa !5
  %156 = load i32, ptr %25, align 4, !tbaa !9
  %157 = call i32 @ippsGetOctString_BN(ptr noundef %155, i32 noundef %156, ptr noundef %22)
  %158 = load ptr, ptr %27, align 8, !tbaa !5
  %159 = load i32, ptr %25, align 4, !tbaa !9
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i8, ptr %158, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !16
  %164 = zext i8 %163 to i32
  %165 = icmp eq i32 188, %164
  br i1 %165, label %166, label %278

166:                                              ; preds = %113
  %167 = load ptr, ptr %27, align 8, !tbaa !5
  %168 = getelementptr inbounds i8, ptr %167, i64 0
  %169 = load i8, ptr %168, align 1, !tbaa !16
  %170 = zext i8 %169 to i32
  %171 = load i32, ptr %25, align 4, !tbaa !9
  %172 = mul nsw i32 8, %171
  %173 = load i32, ptr %24, align 4, !tbaa !9
  %174 = sub nsw i32 %172, %173
  %175 = sub nsw i32 8, %174
  %176 = ashr i32 %170, %175
  %177 = icmp eq i32 0, %176
  br i1 %177, label %178, label %278

178:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %179 = getelementptr inbounds %struct._cpBigNum, ptr %23, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !17
  store ptr %180, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %181 = load i32, ptr %25, align 4, !tbaa !9
  %182 = load i32, ptr %17, align 4, !tbaa !9
  %183 = sub nsw i32 %181, %182
  %184 = sub nsw i32 %183, 1
  store i32 %184, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %185 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %185, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  %186 = load ptr, ptr %27, align 8, !tbaa !5
  %187 = load i32, ptr %30, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i8, ptr %186, i64 %188
  store ptr %189, ptr %32, align 8, !tbaa !5
  %190 = load ptr, ptr %32, align 8, !tbaa !5
  %191 = load i32, ptr %17, align 4, !tbaa !9
  %192 = load ptr, ptr %29, align 8, !tbaa !5
  %193 = load i32, ptr %30, align 4, !tbaa !9
  %194 = load i32, ptr %14, align 4, !tbaa !9
  %195 = call i32 @ippsMGF(ptr noundef %190, i32 noundef %191, ptr noundef %192, i32 noundef %193, i32 noundef %194)
  %196 = load ptr, ptr %31, align 8, !tbaa !5
  %197 = load ptr, ptr %29, align 8, !tbaa !5
  %198 = load ptr, ptr %31, align 8, !tbaa !5
  %199 = load i32, ptr %30, align 4, !tbaa !9
  call void @XorBlock(ptr noundef %196, ptr noundef %197, ptr noundef %198, i32 noundef %199)
  %200 = load i32, ptr %25, align 4, !tbaa !9
  %201 = mul nsw i32 8, %200
  %202 = sub nsw i32 8, %201
  %203 = load i32, ptr %24, align 4, !tbaa !9
  %204 = add nsw i32 %202, %203
  %205 = and i32 %204, 31
  %206 = sub nsw i32 32, %205
  %207 = and i32 %206, 31
  %208 = lshr i32 -1, %207
  %209 = load ptr, ptr %31, align 8, !tbaa !5
  %210 = getelementptr inbounds i8, ptr %209, i64 0
  %211 = load i8, ptr %210, align 1, !tbaa !16
  %212 = zext i8 %211 to i32
  %213 = and i32 %212, %208
  %214 = trunc i32 %213 to i8
  store i8 %214, ptr %210, align 1, !tbaa !16
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %228, %178
  %216 = load i32, ptr %28, align 4, !tbaa !9
  %217 = load i32, ptr %30, align 4, !tbaa !9
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %219, label %231

219:                                              ; preds = %215
  %220 = load ptr, ptr %31, align 8, !tbaa !5
  %221 = load i32, ptr %28, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %220, i64 %222
  %224 = load i8, ptr %223, align 1, !tbaa !16
  %225 = icmp ne i8 %224, 0
  br i1 %225, label %226, label %227

226:                                              ; preds = %219
  br label %231

227:                                              ; preds = %219
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %28, align 4, !tbaa !9
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %28, align 4, !tbaa !9
  br label %215, !llvm.loop !18

231:                                              ; preds = %226, %215
  %232 = load i32, ptr %28, align 4, !tbaa !9
  %233 = load i32, ptr %30, align 4, !tbaa !9
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %235, label %277

235:                                              ; preds = %231
  %236 = load ptr, ptr %27, align 8, !tbaa !5
  %237 = load i32, ptr %28, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i8, ptr %236, i64 %238
  %240 = load i8, ptr %239, align 1, !tbaa !16
  %241 = zext i8 %240 to i32
  %242 = icmp eq i32 1, %241
  br i1 %242, label %243, label %277

243:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %244 = load i32, ptr %30, align 4, !tbaa !9
  %245 = sub nsw i32 %244, 1
  %246 = load i32, ptr %28, align 4, !tbaa !9
  %247 = sub nsw i32 %245, %246
  store i32 %247, ptr %33, align 4, !tbaa !9
  %248 = load ptr, ptr %29, align 8, !tbaa !5
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef %248, i32 noundef 8)
  %249 = getelementptr inbounds [64 x i8], ptr %16, i64 0, i64 0
  %250 = load ptr, ptr %29, align 8, !tbaa !5
  %251 = getelementptr inbounds i8, ptr %250, i64 8
  %252 = load i32, ptr %17, align 4, !tbaa !9
  call void @CopyBlock(ptr noundef %249, ptr noundef %251, i32 noundef %252)
  %253 = load ptr, ptr %31, align 8, !tbaa !5
  %254 = load i32, ptr %28, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds i8, ptr %253, i64 %255
  %257 = getelementptr inbounds i8, ptr %256, i64 1
  %258 = load ptr, ptr %29, align 8, !tbaa !5
  %259 = getelementptr inbounds i8, ptr %258, i64 8
  %260 = load i32, ptr %17, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds i8, ptr %259, i64 %261
  %263 = load i32, ptr %33, align 4, !tbaa !9
  call void @CopyBlock(ptr noundef %257, ptr noundef %262, i32 noundef %263)
  %264 = load ptr, ptr %29, align 8, !tbaa !5
  %265 = load i32, ptr %17, align 4, !tbaa !9
  %266 = add nsw i32 8, %265
  %267 = load i32, ptr %33, align 4, !tbaa !9
  %268 = add nsw i32 %266, %267
  %269 = load ptr, ptr %29, align 8, !tbaa !5
  %270 = load i32, ptr %14, align 4, !tbaa !9
  %271 = call i32 @ippsHashMessage(ptr noundef %264, i32 noundef %268, ptr noundef %269, i32 noundef %270)
  %272 = load ptr, ptr %32, align 8, !tbaa !5
  %273 = load ptr, ptr %29, align 8, !tbaa !5
  %274 = load i32, ptr %17, align 4, !tbaa !9
  %275 = call i32 @EquBlock(ptr noundef %272, ptr noundef %273, i32 noundef %274)
  %276 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %275, ptr %276, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %277

277:                                              ; preds = %243, %235, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %278

278:                                              ; preds = %277, %166, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  store i32 0, ptr %8, align 4
  store i32 1, ptr %26, align 4
  br label %279

279:                                              ; preds = %278, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #4
  br label %280

280:                                              ; preds = %279, %81, %75, %65, %61, %57, %53, %49, %42, %38
  %281 = load i32, ptr %8, align 4
  ret i32 %281
}

; 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

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

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

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

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: 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @EquBlock(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

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_public_key", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32}
!13 = !{!12, !10, i64 12}
!14 = !{!15, !6, i64 24}
!15 = !{!"_cpBigNum", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24}
!16 = !{!7, !7, i64 0}
!17 = !{!15, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"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._cpBigNum = type { i32, i32, i32, i32, ptr, ptr }

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

13:                                               ; preds = %7
  %14 = icmp slt i32 %1, 0
  br i1 %14, label %111, label %15

15:                                               ; preds = %13
  %16 = icmp ne i32 %1, 0
  %17 = icmp eq ptr %0, null
  %or.cond.not112 = and i1 %17, %16
  %18 = insertelement <4 x ptr> poison, ptr %2, i64 0
  %19 = insertelement <4 x ptr> %18, ptr %3, i64 1
  %20 = insertelement <4 x ptr> %19, ptr %4, i64 2
  %21 = insertelement <4 x ptr> %20, ptr %6, i64 3
  %22 = icmp eq <4 x ptr> %21, zeroinitializer
  %23 = bitcast <4 x i1> %22 to i4
  %24 = icmp ne i4 %23, 0
  %op.rdx = or i1 %24, %or.cond.not112
  br i1 %op.rdx, label %111, label %25

25:                                               ; preds = %15
  %26 = load i32, ptr %4, align 8, !tbaa !5
  %27 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %4)
  %28 = trunc i64 %27 to i32
  %29 = xor i32 %26, %28
  %30 = icmp eq i32 %29, 1381187888
  br i1 %30, label %31, label %111

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %4, i64 12
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %111

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  %36 = tail call i32 @cpHashSize(i32 noundef %11)
  %37 = load i32, ptr %32, align 4, !tbaa !11
  %38 = add nsw i32 %37, 7
  %39 = ashr i32 %38, 3
  %40 = tail call i64 @IPP_INT_PTR(ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  %41 = add nsw i32 %37, 6
  %42 = ashr i32 %41, 3
  %43 = add nsw i32 %36, 2
  %.not = icmp sgt i32 %39, %43
  br i1 %.not, label %44, label %.critedge

44:                                               ; preds = %35
  %45 = sub i64 0, %40
  %46 = and i64 %45, 7
  %47 = getelementptr inbounds i8, ptr %6, i64 %46
  %48 = add nsw i32 %37, 63
  %49 = sdiv i32 %48, 64
  %50 = call i32 @ippsHashMessage(ptr noundef %0, i32 noundef %1, ptr noundef nonnull %8, i32 noundef %11) #4
  %51 = sext i32 %49 to i64
  %52 = getelementptr inbounds i64, ptr %47, i64 %51
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = call ptr @BN_Make(ptr noundef nonnull %47, ptr noundef nonnull %53, i32 noundef %49, ptr noundef nonnull %9)
  %55 = shl nsw i32 %49, 1
  %56 = add nsw i32 %55, 2
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i64, ptr %47, i64 %57
  %59 = getelementptr inbounds i64, ptr %58, i64 %51
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = call ptr @BN_Make(ptr noundef nonnull %58, ptr noundef nonnull %60, i32 noundef %49, ptr noundef nonnull %10)
  %62 = getelementptr inbounds i64, ptr %58, i64 %57
  %63 = call i32 @ippsSetOctString_BN(ptr noundef nonnull %2, i32 noundef %39, ptr noundef nonnull %10) #4
  call void @gsRSApub_cipher(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %4, ptr noundef nonnull %62) #4
  store i32 0, ptr %3, align 4, !tbaa !12
  %64 = getelementptr inbounds i8, ptr %9, i64 24
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = call i32 @ippsGetOctString_BN(ptr noundef %65, i32 noundef %42, ptr noundef nonnull %9) #4
  %67 = sext i32 %42 to i64
  %68 = getelementptr i8, ptr %65, i64 %67
  %69 = getelementptr i8, ptr %68, i64 -1
  %70 = load i8, ptr %69, align 1, !tbaa !15
  %71 = icmp eq i8 %70, -68
  br i1 %71, label %72, label %.critedge

72:                                               ; preds = %44
  %73 = load i8, ptr %65, align 1, !tbaa !15
  %74 = zext i8 %73 to i32
  %75 = and i32 %41, -8
  %76 = xor i32 %75, -1
  %.neg = add i32 %37, 8
  %77 = add i32 %.neg, %76
  %78 = lshr i32 %74, %77
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %.critedge

80:                                               ; preds = %72
  %81 = getelementptr inbounds i8, ptr %10, i64 16
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  %83 = xor i32 %36, -1
  %84 = add i32 %42, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %65, i64 %85
  %87 = call i32 @ippsMGF(ptr noundef nonnull %86, i32 noundef %36, ptr noundef %82, i32 noundef %84, i32 noundef %11) #4
  call void @XorBlock(ptr noundef nonnull %65, ptr noundef %82, ptr noundef nonnull %65, i32 noundef %84)
  %reass.sub = sub i32 %75, %37
  %88 = add i32 %reass.sub, 25
  %89 = and i32 %88, 31
  %90 = lshr i32 -1, %89
  %91 = load i8, ptr %65, align 1, !tbaa !15
  %92 = trunc i32 %90 to i8
  %93 = and i8 %91, %92
  store i8 %93, ptr %65, align 1, !tbaa !15
  %94 = icmp sgt i32 %84, 0
  br i1 %94, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %80
  %wide.trip.count = zext nneg i32 %84 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %97
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %97 ]
  %95 = getelementptr inbounds i8, ptr %65, i64 %indvars.iv
  %96 = load i8, ptr %95, align 1, !tbaa !15
  switch i8 %96, label %.critedge [
    i8 0, label %97
    i8 1, label %98
  ]

97:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !17

98:                                               ; preds = %.lr.ph
  %99 = getelementptr inbounds i8, ptr %65, i64 %indvars.iv
  %100 = trunc nuw nsw i64 %indvars.iv to i32
  %101 = xor i32 %100, -1
  %102 = add nsw i32 %84, %101
  call void @PadBlock(i8 noundef zeroext 0, ptr noundef %82, i32 noundef 8)
  %103 = getelementptr inbounds i8, ptr %82, i64 8
  call void @CopyBlock(ptr noundef nonnull %8, ptr noundef nonnull %103, i32 noundef %36)
  %104 = getelementptr inbounds i8, ptr %99, i64 1
  %105 = sext i32 %36 to i64
  %106 = getelementptr inbounds i8, ptr %103, i64 %105
  call void @CopyBlock(ptr noundef nonnull %104, ptr noundef nonnull %106, i32 noundef %102)
  %107 = add nsw i32 %36, 8
  %108 = add nsw i32 %107, %102
  %109 = call i32 @ippsHashMessage(ptr noundef %82, i32 noundef %108, ptr noundef %82, i32 noundef %11) #4
  %110 = call i32 @EquBlock(ptr noundef nonnull %86, ptr noundef %82, i32 noundef %36)
  store i32 %110, ptr %3, align 4, !tbaa !12
  br label %.critedge

.critedge:                                        ; preds = %97, %.lr.ph, %80, %44, %72, %98, %35
  %.0 = phi i32 [ -15, %35 ], [ 0, %98 ], [ 0, %72 ], [ 0, %44 ], [ 0, %80 ], [ 0, %.lr.ph ], [ 0, %97 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  br label %111

111:                                              ; preds = %31, %25, %15, %13, %7, %.critedge
  %.1 = phi i32 [ %.0, %.critedge ], [ -14, %7 ], [ -15, %13 ], [ -8, %15 ], [ -13, %25 ], [ -1013, %31 ]
  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

declare i32 @ippsSetOctString_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

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

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: 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @EquBlock(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

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_public_key", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32}
!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 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"_cpBigNum", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24}
!15 = !{!8, !8, i64 0}
!16 = !{!14, !10, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass