; LLVM IR from cryspen/libcrux :: sys/hacl/c/src/msvc (Hacl_RSAPSS)

; 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"

@.str = external hidden unnamed_addr constant [70 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Hacl_RSAPSS_rsapss_sign(i8 noundef zeroext %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9) #0 {
  %11 = alloca i1, align 1
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, 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 i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca i64, align 8
  %49 = alloca i64, align 8
  %50 = alloca i8, align 1
  %51 = alloca i8, align 1
  %52 = alloca i32, align 4
  store i8 %0, ptr %12, align 1, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !8
  store i32 %2, ptr %14, align 4, !tbaa !8
  store i32 %3, ptr %15, align 4, !tbaa !8
  store ptr %4, ptr %16, align 8, !tbaa !10
  store i32 %5, ptr %17, align 4, !tbaa !8
  store ptr %6, ptr %18, align 8, !tbaa !10
  store i32 %7, ptr %19, align 4, !tbaa !8
  store ptr %8, ptr %20, align 8, !tbaa !10
  store ptr %9, ptr %21, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %53 = load i8, ptr %12, align 1, !tbaa !5
  %54 = call i32 @hash_len(i8 noundef zeroext %53)
  store i32 %54, ptr %22, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  %55 = load i32, ptr %17, align 4, !tbaa !8
  %56 = load i32, ptr %22, align 4, !tbaa !8
  %57 = sub i32 -1, %56
  %58 = sub i32 %57, 8
  %59 = icmp ule i32 %55, %58
  br i1 %59, label %60, label %71

60:                                               ; preds = %10
  %61 = load i32, ptr %17, align 4, !tbaa !8
  %62 = load i32, ptr %22, align 4, !tbaa !8
  %63 = add i32 %61, %62
  %64 = add i32 %63, 2
  %65 = load i32, ptr %13, align 4, !tbaa !8
  %66 = sub i32 %65, 1
  %67 = sub i32 %66, 1
  %68 = udiv i32 %67, 8
  %69 = add i32 %68, 1
  %70 = icmp ule i32 %64, %69
  br label %71

71:                                               ; preds = %60, %10
  %72 = phi i1 [ false, %10 ], [ %70, %60 ]
  %73 = zext i1 %72 to i8
  store i8 %73, ptr %23, align 1, !tbaa !12
  %74 = load i8, ptr %23, align 1, !tbaa !12, !range !14, !noundef !15
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %294

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %77 = load i32, ptr %13, align 4, !tbaa !8
  %78 = sub i32 %77, 1
  %79 = udiv i32 %78, 64
  %80 = add i32 %79, 1
  store i32 %80, ptr %24, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %76
  %82 = load i32, ptr %24, align 4, !tbaa !8
  %83 = zext i32 %82 to i64
  %84 = icmp ugt i64 %83, 2305843009213693951
  br i1 %84, label %85, label %87

85:                                               ; preds = %81
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 437)
  call void @exit(i32 noundef 253) #8
  unreachable

87:                                               ; preds = %81
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %90 = load i32, ptr %24, align 4, !tbaa !8
  %91 = zext i32 %90 to i64
  %92 = mul i64 %91, 8
  %93 = alloca i8, i64 %92, align 16
  store ptr %93, ptr %25, align 8, !tbaa !10
  %94 = load ptr, ptr %25, align 8, !tbaa !10
  %95 = load i32, ptr %24, align 4, !tbaa !8
  %96 = zext i32 %95 to i64
  %97 = mul i64 %96, 8
  call void @llvm.memset.p0.i64(ptr align 8 %94, i8 0, i64 %97, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %98 = load i32, ptr %13, align 4, !tbaa !8
  %99 = sub i32 %98, 1
  store i32 %99, ptr %26, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %100 = load i32, ptr %26, align 4, !tbaa !8
  %101 = sub i32 %100, 1
  %102 = udiv i32 %101, 8
  %103 = add i32 %102, 1
  store i32 %103, ptr %27, align 4, !tbaa !8
  br label %104

104:                                              ; preds = %89
  %105 = load i32, ptr %27, align 4, !tbaa !8
  %106 = zext i32 %105 to i64
  %107 = icmp ugt i64 %106, -1
  br i1 %107, label %108, label %110

108:                                              ; preds = %104
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 442)
  call void @exit(i32 noundef 253) #8
  unreachable

110:                                              ; preds = %104
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %113 = load i32, ptr %27, align 4, !tbaa !8
  %114 = zext i32 %113 to i64
  %115 = mul i64 %114, 1
  %116 = alloca i8, i64 %115, align 16
  store ptr %116, ptr %28, align 8, !tbaa !10
  %117 = load ptr, ptr %28, align 8, !tbaa !10
  %118 = load i32, ptr %27, align 4, !tbaa !8
  %119 = zext i32 %118 to i64
  %120 = mul i64 %119, 1
  call void @llvm.memset.p0.i64(ptr align 1 %117, i8 0, i64 %120, i1 false)
  %121 = load i8, ptr %12, align 1, !tbaa !5
  %122 = load i32, ptr %17, align 4, !tbaa !8
  %123 = load ptr, ptr %18, align 8, !tbaa !10
  %124 = load i32, ptr %19, align 4, !tbaa !8
  %125 = load ptr, ptr %20, align 8, !tbaa !10
  %126 = load i32, ptr %26, align 4, !tbaa !8
  %127 = load ptr, ptr %28, align 8, !tbaa !10
  call void @pss_encode(i8 noundef zeroext %121, i32 noundef %122, ptr noundef %123, i32 noundef %124, ptr noundef %125, i32 noundef %126, ptr noundef %127)
  %128 = load i32, ptr %27, align 4, !tbaa !8
  %129 = load ptr, ptr %28, align 8, !tbaa !10
  %130 = load ptr, ptr %25, align 8, !tbaa !10
  call void @Hacl_Bignum_Convert_bn_from_bytes_be_uint64(i32 noundef %128, ptr noundef %129, ptr noundef %130)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %131 = load i32, ptr %13, align 4, !tbaa !8
  %132 = sub i32 %131, 1
  %133 = udiv i32 %132, 64
  %134 = add i32 %133, 1
  store i32 %134, ptr %29, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %135 = load i32, ptr %13, align 4, !tbaa !8
  %136 = sub i32 %135, 1
  %137 = udiv i32 %136, 8
  %138 = add i32 %137, 1
  store i32 %138, ptr %30, align 4, !tbaa !8
  br label %139

139:                                              ; preds = %112
  %140 = load i32, ptr %29, align 4, !tbaa !8
  %141 = zext i32 %140 to i64
  %142 = icmp ugt i64 %141, 2305843009213693951
  br i1 %142, label %143, label %145

143:                                              ; preds = %139
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 449)
  call void @exit(i32 noundef 253) #8
  unreachable

145:                                              ; preds = %139
  br label %146

146:                                              ; preds = %145
  br label %147

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %148 = load i32, ptr %29, align 4, !tbaa !8
  %149 = zext i32 %148 to i64
  %150 = mul i64 %149, 8
  %151 = alloca i8, i64 %150, align 16
  store ptr %151, ptr %31, align 8, !tbaa !10
  %152 = load ptr, ptr %31, align 8, !tbaa !10
  %153 = load i32, ptr %29, align 4, !tbaa !8
  %154 = zext i32 %153 to i64
  %155 = mul i64 %154, 8
  call void @llvm.memset.p0.i64(ptr align 8 %152, i8 0, i64 %155, i1 false)
  br label %156

156:                                              ; preds = %147
  %157 = load i32, ptr %29, align 4, !tbaa !8
  %158 = zext i32 %157 to i64
  %159 = icmp ugt i64 %158, 2305843009213693951
  br i1 %159, label %160, label %162

160:                                              ; preds = %156
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 452)
  call void @exit(i32 noundef 253) #8
  unreachable

162:                                              ; preds = %156
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %165 = load i32, ptr %29, align 4, !tbaa !8
  %166 = zext i32 %165 to i64
  %167 = mul i64 %166, 8
  %168 = alloca i8, i64 %167, align 16
  store ptr %168, ptr %32, align 8, !tbaa !10
  %169 = load ptr, ptr %32, align 8, !tbaa !10
  %170 = load i32, ptr %29, align 4, !tbaa !8
  %171 = zext i32 %170 to i64
  %172 = mul i64 %171, 8
  call void @llvm.memset.p0.i64(ptr align 8 %169, i8 0, i64 %172, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %173 = load i32, ptr %13, align 4, !tbaa !8
  %174 = sub i32 %173, 1
  %175 = udiv i32 %174, 64
  %176 = add i32 %175, 1
  store i32 %176, ptr %33, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %177 = load i32, ptr %14, align 4, !tbaa !8
  %178 = sub i32 %177, 1
  %179 = udiv i32 %178, 64
  %180 = add i32 %179, 1
  store i32 %180, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %181 = load ptr, ptr %16, align 8, !tbaa !10
  store ptr %181, ptr %35, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %182 = load ptr, ptr %16, align 8, !tbaa !10
  %183 = load i32, ptr %33, align 4, !tbaa !8
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds i64, ptr %182, i64 %184
  store ptr %185, ptr %36, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %186 = load ptr, ptr %16, align 8, !tbaa !10
  %187 = load i32, ptr %33, align 4, !tbaa !8
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds i64, ptr %186, i64 %188
  %190 = load i32, ptr %33, align 4, !tbaa !8
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds i64, ptr %189, i64 %191
  store ptr %192, ptr %37, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %193 = load ptr, ptr %16, align 8, !tbaa !10
  %194 = load i32, ptr %33, align 4, !tbaa !8
  %195 = zext i32 %194 to i64
  %196 = getelementptr inbounds i64, ptr %193, i64 %195
  %197 = load i32, ptr %33, align 4, !tbaa !8
  %198 = zext i32 %197 to i64
  %199 = getelementptr inbounds i64, ptr %196, i64 %198
  %200 = load i32, ptr %34, align 4, !tbaa !8
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds i64, ptr %199, i64 %201
  store ptr %202, ptr %38, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %203 = load ptr, ptr %35, align 8, !tbaa !10
  %204 = getelementptr inbounds i64, ptr %203, i64 0
  %205 = load i64, ptr %204, align 8, !tbaa !16
  %206 = call i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef %205)
  store i64 %206, ptr %39, align 8, !tbaa !16
  %207 = load i32, ptr %13, align 4, !tbaa !8
  %208 = sub i32 %207, 1
  %209 = udiv i32 %208, 64
  %210 = add i32 %209, 1
  %211 = load ptr, ptr %35, align 8, !tbaa !10
  %212 = load i64, ptr %39, align 8, !tbaa !16
  %213 = load ptr, ptr %36, align 8, !tbaa !10
  %214 = load ptr, ptr %25, align 8, !tbaa !10
  %215 = load i32, ptr %15, align 4, !tbaa !8
  %216 = load ptr, ptr %38, align 8, !tbaa !10
  %217 = load ptr, ptr %31, align 8, !tbaa !10
  call void @Hacl_Bignum_Exponentiation_bn_mod_exp_consttime_precomp_u64(i32 noundef %210, ptr noundef %211, i64 noundef %212, ptr noundef %213, ptr noundef %214, i32 noundef %215, ptr noundef %216, ptr noundef %217)
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %218 = load ptr, ptr %35, align 8, !tbaa !10
  %219 = getelementptr inbounds i64, ptr %218, i64 0
  %220 = load i64, ptr %219, align 8, !tbaa !16
  %221 = call i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef %220)
  store i64 %221, ptr %40, align 8, !tbaa !16
  %222 = load i32, ptr %13, align 4, !tbaa !8
  %223 = sub i32 %222, 1
  %224 = udiv i32 %223, 64
  %225 = add i32 %224, 1
  %226 = load ptr, ptr %35, align 8, !tbaa !10
  %227 = load i64, ptr %40, align 8, !tbaa !16
  %228 = load ptr, ptr %36, align 8, !tbaa !10
  %229 = load ptr, ptr %31, align 8, !tbaa !10
  %230 = load i32, ptr %14, align 4, !tbaa !8
  %231 = load ptr, ptr %37, align 8, !tbaa !10
  %232 = load ptr, ptr %32, align 8, !tbaa !10
  call void @Hacl_Bignum_Exponentiation_bn_mod_exp_vartime_precomp_u64(i32 noundef %225, ptr noundef %226, i64 noundef %227, ptr noundef %228, ptr noundef %229, i32 noundef %230, ptr noundef %231, ptr noundef %232)
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  store i64 -1, ptr %41, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !8
  br label %233

233:                                              ; preds = %253, %164
  %234 = load i32, ptr %42, align 4, !tbaa !8
  %235 = load i32, ptr %33, align 4, !tbaa !8
  %236 = icmp ult i32 %234, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %256

238:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %239 = load ptr, ptr %25, align 8, !tbaa !10
  %240 = load i32, ptr %42, align 4, !tbaa !8
  %241 = zext i32 %240 to i64
  %242 = getelementptr inbounds i64, ptr %239, i64 %241
  %243 = load i64, ptr %242, align 8, !tbaa !16
  %244 = load ptr, ptr %32, align 8, !tbaa !10
  %245 = load i32, ptr %42, align 4, !tbaa !8
  %246 = zext i32 %245 to i64
  %247 = getelementptr inbounds i64, ptr %244, i64 %246
  %248 = load i64, ptr %247, align 8, !tbaa !16
  %249 = call i64 @FStar_UInt64_eq_mask(i64 noundef %243, i64 noundef %248)
  store i64 %249, ptr %43, align 8, !tbaa !16
  %250 = load i64, ptr %43, align 8, !tbaa !16
  %251 = load i64, ptr %41, align 8, !tbaa !16
  %252 = and i64 %250, %251
  store i64 %252, ptr %41, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %253

253:                                              ; preds = %238
  %254 = load i32, ptr %42, align 4, !tbaa !8
  %255 = add i32 %254, 1
  store i32 %255, ptr %42, align 4, !tbaa !8
  br label %233, !llvm.loop !18

256:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %257 = load i64, ptr %41, align 8, !tbaa !16
  store i64 %257, ptr %44, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %258 = load i64, ptr %44, align 8, !tbaa !16
  store i64 %258, ptr %45, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  store i32 0, ptr %46, align 4, !tbaa !8
  br label %259

259:                                              ; preds = %279, %256
  %260 = load i32, ptr %46, align 4, !tbaa !8
  %261 = load i32, ptr %33, align 4, !tbaa !8
  %262 = icmp ult i32 %260, %261
  br i1 %262, label %264, label %263

263:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  br label %282

264:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %265 = load ptr, ptr %31, align 8, !tbaa !10
  store ptr %265, ptr %47, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  %266 = load ptr, ptr %31, align 8, !tbaa !10
  %267 = load i32, ptr %46, align 4, !tbaa !8
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds i64, ptr %266, i64 %268
  %270 = load i64, ptr %269, align 8, !tbaa !16
  store i64 %270, ptr %48, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %271 = load i64, ptr %45, align 8, !tbaa !16
  %272 = load i64, ptr %48, align 8, !tbaa !16
  %273 = and i64 %271, %272
  store i64 %273, ptr %49, align 8, !tbaa !16
  %274 = load i64, ptr %49, align 8, !tbaa !16
  %275 = load ptr, ptr %47, align 8, !tbaa !10
  %276 = load i32, ptr %46, align 4, !tbaa !8
  %277 = zext i32 %276 to i64
  %278 = getelementptr inbounds i64, ptr %275, i64 %277
  store i64 %274, ptr %278, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br label %279

279:                                              ; preds = %264
  %280 = load i32, ptr %46, align 4, !tbaa !8
  %281 = add i32 %280, 1
  store i32 %281, ptr %46, align 4, !tbaa !8
  br label %259, !llvm.loop !20

282:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #7
  %283 = load i64, ptr %45, align 8, !tbaa !16
  %284 = icmp eq i64 %283, -1
  %285 = zext i1 %284 to i8
  store i8 %285, ptr %50, align 1, !tbaa !12
  %286 = load i32, ptr %30, align 4, !tbaa !8
  %287 = load ptr, ptr %31, align 8, !tbaa !10
  %288 = load ptr, ptr %21, align 8, !tbaa !10
  call void @Hacl_Bignum_Convert_bn_to_bytes_be_uint64(i32 noundef %286, ptr noundef %287, ptr noundef %288)
  call void @llvm.lifetime.start.p0(i64 1, ptr %51) #7
  %289 = load i8, ptr %50, align 1, !tbaa !12, !range !14, !noundef !15
  %290 = trunc i8 %289 to i1
  %291 = zext i1 %290 to i8
  store i8 %291, ptr %51, align 1, !tbaa !12
  %292 = load i8, ptr %51, align 1, !tbaa !12, !range !14, !noundef !15
  %293 = trunc i8 %292 to i1
  store i1 %293, ptr %11, align 1
  store i32 1, ptr %52, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %295

294:                                              ; preds = %71
  store i1 false, ptr %11, align 1
  store i32 1, ptr %52, align 4
  br label %295

295:                                              ; preds = %294, %282
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  %296 = load i1, ptr %11, align 1
  ret i1 %296
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @hash_len(i8 noundef zeroext) #2

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

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

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

declare i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef) #3

declare void @Hacl_Bignum_Exponentiation_bn_mod_exp_consttime_precomp_u64(i32 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

declare void @Hacl_Bignum_Exponentiation_bn_mod_exp_vartime_precomp_u64(i32 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: noinline nounwind uwtable
declare hidden i64 @FStar_UInt64_eq_mask(i64 noundef, i64 noundef) #6

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

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

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


; 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"

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Hacl_RSAPSS_rsapss_sign(i8 noundef zeroext %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 {
  %11 = tail call i32 @hash_len(i8 noundef zeroext %0)
  %12 = sub i32 -9, %11
  %.not = icmp ult i32 %12, %5
  br i1 %.not, label %.critedge, label %13

13:                                               ; preds = %10
  %14 = add i32 %5, 2
  %15 = add i32 %14, %11
  %16 = add i32 %1, -2
  %17 = lshr i32 %16, 3
  %18 = add nuw nsw i32 %17, 1
  %.not103 = icmp ugt i32 %15, %18
  br i1 %.not103, label %.critedge, label %19

19:                                               ; preds = %13
  %20 = add i32 %1, -1
  %21 = lshr i32 %20, 6
  %22 = add nuw nsw i32 %21, 1
  %23 = zext nneg i32 %22 to i64
  %24 = shl nuw nsw i64 %23, 3
  %25 = alloca i8, i64 %24, align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %25, i8 0, i64 %24, i1 false)
  %26 = zext nneg i32 %18 to i64
  %27 = alloca i8, i64 %26, align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %27, i8 0, i64 %26, i1 false)
  call void @pss_encode(i8 noundef zeroext %0, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %20, ptr noundef nonnull %27)
  call void @Hacl_Bignum_Convert_bn_from_bytes_be_uint64(i32 noundef %18, ptr noundef nonnull %27, ptr noundef nonnull %25)
  %28 = lshr i32 %20, 3
  %29 = alloca i8, i64 %24, align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %29, i8 0, i64 %24, i1 false)
  %30 = alloca i8, i64 %24, align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %30, i8 0, i64 %24, i1 false)
  %31 = add i32 %2, -1
  %32 = lshr i32 %31, 6
  %33 = getelementptr inbounds i64, ptr %4, i64 %23
  %34 = getelementptr inbounds i64, ptr %33, i64 %23
  %35 = zext nneg i32 %32 to i64
  %36 = getelementptr inbounds i64, ptr %34, i64 %35
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load i64, ptr %4, align 8, !tbaa !5
  %39 = call i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef %38) #5
  call void @Hacl_Bignum_Exponentiation_bn_mod_exp_consttime_precomp_u64(i32 noundef %22, ptr noundef nonnull %4, i64 noundef %39, ptr noundef nonnull %33, ptr noundef nonnull %25, i32 noundef %3, ptr noundef nonnull %37, ptr noundef nonnull %29) #5
  %40 = load i64, ptr %4, align 8, !tbaa !5
  %41 = call i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef %40) #5
  call void @Hacl_Bignum_Exponentiation_bn_mod_exp_vartime_precomp_u64(i32 noundef %22, ptr noundef nonnull %4, i64 noundef %41, ptr noundef nonnull %33, ptr noundef nonnull %29, i32 noundef %2, ptr noundef nonnull %34, ptr noundef nonnull %30) #5
  br label %47

.preheader:                                       ; preds = %47
  %min.iters.check = icmp ult i32 %20, 192
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader
  %indvars.iv108.ph = phi i64 [ 0, %.preheader ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.preheader
  %n.vec = and i64 %23, 134217724
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %53, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %42 = getelementptr inbounds i64, ptr %29, i64 %index
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load = load <2 x i64>, ptr %42, align 16, !tbaa !5
  %wide.load113 = load <2 x i64>, ptr %43, align 16, !tbaa !5
  %44 = and <2 x i64> %wide.load, %broadcast.splat
  %45 = and <2 x i64> %wide.load113, %broadcast.splat
  store <2 x i64> %44, ptr %42, align 16, !tbaa !5
  store <2 x i64> %45, ptr %43, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %23
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

47:                                               ; preds = %19, %47
  %indvars.iv = phi i64 [ 0, %19 ], [ %indvars.iv.next, %47 ]
  %.096105 = phi i64 [ -1, %19 ], [ %53, %47 ]
  %48 = getelementptr inbounds i64, ptr %25, i64 %indvars.iv
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds i64, ptr %30, i64 %indvars.iv
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = call i64 @FStar_UInt64_eq_mask(i64 noundef %49, i64 noundef %51)
  %53 = and i64 %52, %.096105
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %23
  br i1 %exitcond.not, label %.preheader, label %47, !llvm.loop !13

.loopexit:                                        ; preds = %scalar.ph, %middle.block
  %54 = add nuw nsw i32 %28, 1
  %55 = icmp eq i64 %53, -1
  call void @Hacl_Bignum_Convert_bn_to_bytes_be_uint64(i32 noundef %54, ptr noundef nonnull %29, ptr noundef %9)
  br label %.critedge

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %scalar.ph ], [ %indvars.iv108.ph, %scalar.ph.preheader ]
  %56 = getelementptr inbounds i64, ptr %29, i64 %indvars.iv108
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = and i64 %57, %53
  store i64 %58, ptr %56, align 8, !tbaa !5
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %23
  br i1 %exitcond112.not, label %.loopexit, label %scalar.ph, !llvm.loop !14

.critedge:                                        ; preds = %13, %10, %.loopexit
  %.0 = phi i1 [ %55, %.loopexit ], [ false, %10 ], [ false, %13 ]
  ret i1 %.0
}

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

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

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

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

declare i64 @Hacl_Bignum_ModInvLimb_mod_inv_uint64(i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: noinline nounwind uwtable
declare hidden i64 @FStar_UInt64_eq_mask(i64 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Bignum_Convert_bn_to_bytes_be_uint64(i32 noundef, 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 nounwind willreturn memory(argmem: write) }
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 = { noinline 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 #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass