; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application (ValidateCryptRsa)

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

@RsaN = external dso_local constant [128 x i8], align 16
@RsaE = external dso_local constant [1 x i8], align 1
@RsaD = external dso_local constant [128 x i8], align 16
@RsaSignData = external dso_local constant [38 x i8], align 16
@RsaPkcs1Signature = external dso_local constant [128 x i8], align 16
@DefaultPublicKey = external dso_local constant [3 x i8], align 1
@.str = external hidden unnamed_addr constant [35 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [29 x i32], align 4
@.str.2 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.3 = external hidden unnamed_addr constant [32 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [34 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [33 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [38 x i32], align 4
@.str.7 = external hidden unnamed_addr constant [27 x i32], align 4
@.str.8 = external hidden unnamed_addr constant [22 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [35 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [31 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [2 x i32], align 4

; Function Attrs: nounwind uwtable
define dso_local i64 @ValidateCryptRsa() #0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca [20 x i8], align 16
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 20, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %13 = call i64 (ptr, ...) @Print(ptr noundef @.str)
  %14 = call ptr @RsaNew()
  store ptr %14, ptr %2, align 8, !tbaa !5
  %15 = call i64 (ptr, ...) @Print(ptr noundef @.str.1)
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %0
  %19 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

20:                                               ; preds = %0
  %21 = call i64 (ptr, ...) @Print(ptr noundef @.str.3)
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = call zeroext i8 @RsaSetKey(ptr noundef %22, i32 noundef 0, ptr noundef @RsaN, i64 noundef 128)
  store i8 %23, ptr %9, align 1, !tbaa !9
  %24 = load i8, ptr %9, align 1, !tbaa !9
  %25 = icmp ne i8 %24, 0
  br i1 %25, label %28, label %26

26:                                               ; preds = %20
  %27 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

28:                                               ; preds = %20
  store i64 0, ptr %10, align 8, !tbaa !10
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = call zeroext i8 @RsaGetKey(ptr noundef %29, i32 noundef 0, ptr noundef null, ptr noundef %10)
  store i8 %30, ptr %9, align 1, !tbaa !9
  %31 = load i8, ptr %9, align 1, !tbaa !9
  %32 = zext i8 %31 to i32
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %37, label %34

34:                                               ; preds = %28
  %35 = load i64, ptr %10, align 8, !tbaa !10
  %36 = icmp ne i64 %35, 128
  br i1 %36, label %37, label %39

37:                                               ; preds = %34, %28
  %38 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

39:                                               ; preds = %34
  %40 = load i64, ptr %10, align 8, !tbaa !10
  %41 = call ptr @AllocatePool(i64 noundef %40)
  store ptr %41, ptr %11, align 8, !tbaa !5
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = call zeroext i8 @RsaGetKey(ptr noundef %42, i32 noundef 0, ptr noundef %43, ptr noundef %10)
  store i8 %44, ptr %9, align 1, !tbaa !9
  %45 = load i8, ptr %9, align 1, !tbaa !9
  %46 = icmp ne i8 %45, 0
  br i1 %46, label %47, label %50

47:                                               ; preds = %39
  %48 = load i64, ptr %10, align 8, !tbaa !10
  %49 = icmp ne i64 %48, 128
  br i1 %49, label %50, label %52

50:                                               ; preds = %47, %39
  %51 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

52:                                               ; preds = %47
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = load i64, ptr %10, align 8, !tbaa !10
  %55 = call i64 @CompareMem(ptr noundef %53, ptr noundef @RsaN, i64 noundef %54)
  %56 = icmp ne i64 %55, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %52
  %58 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

59:                                               ; preds = %52
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %60)
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = call zeroext i8 @RsaSetKey(ptr noundef %61, i32 noundef 1, ptr noundef @RsaE, i64 noundef 1)
  store i8 %62, ptr %9, align 1, !tbaa !9
  %63 = load i8, ptr %9, align 1, !tbaa !9
  %64 = icmp ne i8 %63, 0
  br i1 %64, label %67, label %65

65:                                               ; preds = %59
  %66 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

67:                                               ; preds = %59
  store i64 0, ptr %10, align 8, !tbaa !10
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = call zeroext i8 @RsaGetKey(ptr noundef %68, i32 noundef 1, ptr noundef null, ptr noundef %10)
  store i8 %69, ptr %9, align 1, !tbaa !9
  %70 = load i8, ptr %9, align 1, !tbaa !9
  %71 = zext i8 %70 to i32
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %76, label %73

73:                                               ; preds = %67
  %74 = load i64, ptr %10, align 8, !tbaa !10
  %75 = icmp ne i64 %74, 1
  br i1 %75, label %76, label %78

76:                                               ; preds = %73, %67
  %77 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

78:                                               ; preds = %73
  %79 = load i64, ptr %10, align 8, !tbaa !10
  %80 = call ptr @AllocatePool(i64 noundef %79)
  store ptr %80, ptr %11, align 8, !tbaa !5
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = call zeroext i8 @RsaGetKey(ptr noundef %81, i32 noundef 1, ptr noundef %82, ptr noundef %10)
  store i8 %83, ptr %9, align 1, !tbaa !9
  %84 = load i8, ptr %9, align 1, !tbaa !9
  %85 = icmp ne i8 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %78
  %87 = load i64, ptr %10, align 8, !tbaa !10
  %88 = icmp ne i64 %87, 1
  br i1 %88, label %89, label %91

89:                                               ; preds = %86, %78
  %90 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

91:                                               ; preds = %86
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i64, ptr %10, align 8, !tbaa !10
  %94 = call i64 @CompareMem(ptr noundef %92, ptr noundef @RsaE, i64 noundef %93)
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %91
  %97 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

98:                                               ; preds = %91
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %99)
  %100 = call i64 (ptr, ...) @Print(ptr noundef @.str.4)
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = call zeroext i8 @RsaSetKey(ptr noundef %101, i32 noundef 0, ptr noundef null, i64 noundef 0)
  store i8 %102, ptr %9, align 1, !tbaa !9
  %103 = load i8, ptr %9, align 1, !tbaa !9
  %104 = icmp ne i8 %103, 0
  br i1 %104, label %107, label %105

105:                                              ; preds = %98
  %106 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

107:                                              ; preds = %98
  store i64 1, ptr %10, align 8, !tbaa !10
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = call zeroext i8 @RsaGetKey(ptr noundef %108, i32 noundef 0, ptr noundef null, ptr noundef %10)
  store i8 %109, ptr %9, align 1, !tbaa !9
  %110 = load i8, ptr %9, align 1, !tbaa !9
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %112, label %115

112:                                              ; preds = %107
  %113 = load i64, ptr %10, align 8, !tbaa !10
  %114 = icmp ne i64 %113, 0
  br i1 %114, label %115, label %117

115:                                              ; preds = %112, %107
  %116 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

117:                                              ; preds = %112
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = call zeroext i8 @RsaSetKey(ptr noundef %118, i32 noundef 1, ptr noundef null, i64 noundef 0)
  store i8 %119, ptr %9, align 1, !tbaa !9
  %120 = load i8, ptr %9, align 1, !tbaa !9
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %124, label %122

122:                                              ; preds = %117
  %123 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

124:                                              ; preds = %117
  store i64 1, ptr %10, align 8, !tbaa !10
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = call zeroext i8 @RsaGetKey(ptr noundef %125, i32 noundef 1, ptr noundef null, ptr noundef %10)
  store i8 %126, ptr %9, align 1, !tbaa !9
  %127 = load i8, ptr %9, align 1, !tbaa !9
  %128 = icmp ne i8 %127, 0
  br i1 %128, label %129, label %132

129:                                              ; preds = %124
  %130 = load i64, ptr %10, align 8, !tbaa !10
  %131 = icmp ne i64 %130, 0
  br i1 %131, label %132, label %134

132:                                              ; preds = %129, %124
  %133 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

134:                                              ; preds = %129
  %135 = call i64 (ptr, ...) @Print(ptr noundef @.str.5)
  %136 = load ptr, ptr %2, align 8, !tbaa !5
  %137 = call zeroext i8 @RsaGenerateKey(ptr noundef %136, i64 noundef 512, ptr noundef null, i64 noundef 0)
  store i8 %137, ptr %9, align 1, !tbaa !9
  %138 = load i8, ptr %9, align 1, !tbaa !9
  %139 = icmp ne i8 %138, 0
  br i1 %139, label %142, label %140

140:                                              ; preds = %134
  %141 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

142:                                              ; preds = %134
  store i64 64, ptr %10, align 8, !tbaa !10
  %143 = load i64, ptr %10, align 8, !tbaa !10
  %144 = call ptr @AllocatePool(i64 noundef %143)
  store ptr %144, ptr %11, align 8, !tbaa !5
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = call zeroext i8 @RsaGetKey(ptr noundef %145, i32 noundef 1, ptr noundef %146, ptr noundef %10)
  store i8 %147, ptr %9, align 1, !tbaa !9
  %148 = load i8, ptr %9, align 1, !tbaa !9
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %152, label %150

150:                                              ; preds = %142
  %151 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

152:                                              ; preds = %142
  %153 = load i64, ptr %10, align 8, !tbaa !10
  %154 = icmp ne i64 %153, 3
  br i1 %154, label %159, label %155

155:                                              ; preds = %152
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = call i64 @CompareMem(ptr noundef %156, ptr noundef @DefaultPublicKey, i64 noundef 3)
  %158 = icmp ne i64 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %155, %152
  %160 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

161:                                              ; preds = %155
  store i64 64, ptr %10, align 8, !tbaa !10
  %162 = load ptr, ptr %2, align 8, !tbaa !5
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = call zeroext i8 @RsaGetKey(ptr noundef %162, i32 noundef 0, ptr noundef %163, ptr noundef %10)
  store i8 %164, ptr %9, align 1, !tbaa !9
  %165 = load i8, ptr %9, align 1, !tbaa !9
  %166 = icmp ne i8 %165, 0
  br i1 %166, label %169, label %167

167:                                              ; preds = %161
  %168 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

169:                                              ; preds = %161
  %170 = load i64, ptr %10, align 8, !tbaa !10
  %171 = icmp ne i64 %170, 64
  br i1 %171, label %172, label %174

172:                                              ; preds = %169
  %173 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

174:                                              ; preds = %169
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = call zeroext i8 @RsaCheckKey(ptr noundef %175)
  %177 = icmp ne i8 %176, 0
  br i1 %177, label %180, label %178

178:                                              ; preds = %174
  %179 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

180:                                              ; preds = %174
  %181 = call i64 (ptr, ...) @Print(ptr noundef @.str.6)
  %182 = load ptr, ptr %2, align 8, !tbaa !5
  %183 = call zeroext i8 @RsaSetKey(ptr noundef %182, i32 noundef 0, ptr noundef @RsaN, i64 noundef 128)
  store i8 %183, ptr %9, align 1, !tbaa !9
  %184 = load i8, ptr %9, align 1, !tbaa !9
  %185 = icmp ne i8 %184, 0
  br i1 %185, label %188, label %186

186:                                              ; preds = %180
  %187 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

188:                                              ; preds = %180
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = call zeroext i8 @RsaCheckKey(ptr noundef %189)
  %191 = icmp ne i8 %190, 0
  br i1 %191, label %192, label %194

192:                                              ; preds = %188
  %193 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

194:                                              ; preds = %188
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = load i64, ptr %10, align 8, !tbaa !10
  %198 = call zeroext i8 @RsaSetKey(ptr noundef %195, i32 noundef 0, ptr noundef %196, i64 noundef %197)
  store i8 %198, ptr %9, align 1, !tbaa !9
  %199 = load i8, ptr %9, align 1, !tbaa !9
  %200 = icmp ne i8 %199, 0
  br i1 %200, label %203, label %201

201:                                              ; preds = %194
  %202 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

203:                                              ; preds = %194
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = call zeroext i8 @RsaCheckKey(ptr noundef %204)
  %206 = icmp ne i8 %205, 0
  br i1 %206, label %209, label %207

207:                                              ; preds = %203
  %208 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

209:                                              ; preds = %203
  %210 = load ptr, ptr %2, align 8, !tbaa !5
  %211 = call zeroext i8 @RsaSetKey(ptr noundef %210, i32 noundef 1, ptr noundef @RsaE, i64 noundef 1)
  store i8 %211, ptr %9, align 1, !tbaa !9
  %212 = load i8, ptr %9, align 1, !tbaa !9
  %213 = icmp ne i8 %212, 0
  br i1 %213, label %216, label %214

214:                                              ; preds = %209
  %215 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

216:                                              ; preds = %209
  %217 = load ptr, ptr %2, align 8, !tbaa !5
  %218 = call zeroext i8 @RsaCheckKey(ptr noundef %217)
  %219 = icmp ne i8 %218, 0
  br i1 %219, label %220, label %222

220:                                              ; preds = %216
  %221 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

222:                                              ; preds = %216
  %223 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %223)
  %224 = call i64 (ptr, ...) @Print(ptr noundef @.str.7)
  store i64 20, ptr %4, align 8, !tbaa !10
  %225 = getelementptr inbounds [20 x i8], ptr %3, i64 0, i64 0
  %226 = load i64, ptr %4, align 8, !tbaa !10
  %227 = call ptr @ZeroMem(ptr noundef %225, i64 noundef %226)
  %228 = call i64 @Sha1GetContextSize()
  store i64 %228, ptr %5, align 8, !tbaa !10
  %229 = load i64, ptr %5, align 8, !tbaa !10
  %230 = call ptr @AllocatePool(i64 noundef %229)
  store ptr %230, ptr %6, align 8, !tbaa !5
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = call zeroext i8 @Sha1Init(ptr noundef %231)
  store i8 %232, ptr %9, align 1, !tbaa !9
  %233 = load i8, ptr %9, align 1, !tbaa !9
  %234 = icmp ne i8 %233, 0
  br i1 %234, label %237, label %235

235:                                              ; preds = %222
  %236 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

237:                                              ; preds = %222
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = call i64 @AsciiStrLen(ptr noundef @RsaSignData)
  %240 = call zeroext i8 @Sha1Update(ptr noundef %238, ptr noundef @RsaSignData, i64 noundef %239)
  store i8 %240, ptr %9, align 1, !tbaa !9
  %241 = load i8, ptr %9, align 1, !tbaa !9
  %242 = icmp ne i8 %241, 0
  br i1 %242, label %245, label %243

243:                                              ; preds = %237
  %244 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

245:                                              ; preds = %237
  %246 = load ptr, ptr %6, align 8, !tbaa !5
  %247 = getelementptr inbounds [20 x i8], ptr %3, i64 0, i64 0
  %248 = call zeroext i8 @Sha1Final(ptr noundef %246, ptr noundef %247)
  store i8 %248, ptr %9, align 1, !tbaa !9
  %249 = load i8, ptr %9, align 1, !tbaa !9
  %250 = icmp ne i8 %249, 0
  br i1 %250, label %253, label %251

251:                                              ; preds = %245
  %252 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

253:                                              ; preds = %245
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %254)
  %255 = call i64 (ptr, ...) @Print(ptr noundef @.str.8)
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  call void @RsaFree(ptr noundef %256)
  %257 = call ptr @RsaNew()
  store ptr %257, ptr %2, align 8, !tbaa !5
  %258 = load ptr, ptr %2, align 8, !tbaa !5
  %259 = icmp eq ptr %258, null
  br i1 %259, label %260, label %262

260:                                              ; preds = %253
  %261 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

262:                                              ; preds = %253
  %263 = load ptr, ptr %2, align 8, !tbaa !5
  %264 = call zeroext i8 @RsaSetKey(ptr noundef %263, i32 noundef 0, ptr noundef @RsaN, i64 noundef 128)
  store i8 %264, ptr %9, align 1, !tbaa !9
  %265 = load i8, ptr %9, align 1, !tbaa !9
  %266 = icmp ne i8 %265, 0
  br i1 %266, label %269, label %267

267:                                              ; preds = %262
  %268 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

269:                                              ; preds = %262
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  %271 = call zeroext i8 @RsaSetKey(ptr noundef %270, i32 noundef 1, ptr noundef @RsaE, i64 noundef 1)
  store i8 %271, ptr %9, align 1, !tbaa !9
  %272 = load i8, ptr %9, align 1, !tbaa !9
  %273 = icmp ne i8 %272, 0
  br i1 %273, label %276, label %274

274:                                              ; preds = %269
  %275 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

276:                                              ; preds = %269
  %277 = load ptr, ptr %2, align 8, !tbaa !5
  %278 = call zeroext i8 @RsaSetKey(ptr noundef %277, i32 noundef 2, ptr noundef @RsaD, i64 noundef 128)
  store i8 %278, ptr %9, align 1, !tbaa !9
  %279 = load i8, ptr %9, align 1, !tbaa !9
  %280 = icmp ne i8 %279, 0
  br i1 %280, label %283, label %281

281:                                              ; preds = %276
  %282 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

283:                                              ; preds = %276
  store i64 0, ptr %8, align 8, !tbaa !10
  %284 = load ptr, ptr %2, align 8, !tbaa !5
  %285 = getelementptr inbounds [20 x i8], ptr %3, i64 0, i64 0
  %286 = load i64, ptr %4, align 8, !tbaa !10
  %287 = call zeroext i8 @RsaPkcs1Sign(ptr noundef %284, ptr noundef %285, i64 noundef %286, ptr noundef null, ptr noundef %8)
  store i8 %287, ptr %9, align 1, !tbaa !9
  %288 = load i8, ptr %9, align 1, !tbaa !9
  %289 = zext i8 %288 to i32
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %294, label %291

291:                                              ; preds = %283
  %292 = load i64, ptr %8, align 8, !tbaa !10
  %293 = icmp eq i64 %292, 0
  br i1 %293, label %294, label %296

294:                                              ; preds = %291, %283
  %295 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

296:                                              ; preds = %291
  %297 = load i64, ptr %8, align 8, !tbaa !10
  %298 = call ptr @AllocatePool(i64 noundef %297)
  store ptr %298, ptr %7, align 8, !tbaa !5
  %299 = load ptr, ptr %2, align 8, !tbaa !5
  %300 = getelementptr inbounds [20 x i8], ptr %3, i64 0, i64 0
  %301 = load i64, ptr %4, align 8, !tbaa !10
  %302 = load ptr, ptr %7, align 8, !tbaa !5
  %303 = call zeroext i8 @RsaPkcs1Sign(ptr noundef %299, ptr noundef %300, i64 noundef %301, ptr noundef %302, ptr noundef %8)
  store i8 %303, ptr %9, align 1, !tbaa !9
  %304 = load i8, ptr %9, align 1, !tbaa !9
  %305 = icmp ne i8 %304, 0
  br i1 %305, label %308, label %306

306:                                              ; preds = %296
  %307 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

308:                                              ; preds = %296
  %309 = load i64, ptr %8, align 8, !tbaa !10
  %310 = icmp ne i64 %309, 128
  br i1 %310, label %311, label %313

311:                                              ; preds = %308
  %312 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

313:                                              ; preds = %308
  %314 = load ptr, ptr %7, align 8, !tbaa !5
  %315 = load i64, ptr %8, align 8, !tbaa !10
  %316 = call i64 @CompareMem(ptr noundef %314, ptr noundef @RsaPkcs1Signature, i64 noundef %315)
  %317 = icmp ne i64 %316, 0
  br i1 %317, label %318, label %320

318:                                              ; preds = %313
  %319 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

320:                                              ; preds = %313
  %321 = call i64 (ptr, ...) @Print(ptr noundef @.str.9)
  %322 = load ptr, ptr %2, align 8, !tbaa !5
  %323 = getelementptr inbounds [20 x i8], ptr %3, i64 0, i64 0
  %324 = load i64, ptr %4, align 8, !tbaa !10
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = load i64, ptr %8, align 8, !tbaa !10
  %327 = call zeroext i8 @RsaPkcs1Verify(ptr noundef %322, ptr noundef %323, i64 noundef %324, ptr noundef %325, i64 noundef %326)
  store i8 %327, ptr %9, align 1, !tbaa !9
  %328 = load i8, ptr %9, align 1, !tbaa !9
  %329 = icmp ne i8 %328, 0
  br i1 %329, label %332, label %330

330:                                              ; preds = %320
  %331 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  store i64 -9223372036854775787, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

332:                                              ; preds = %320
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  call void @RsaFree(ptr noundef %333)
  %334 = call i64 (ptr, ...) @Print(ptr noundef @.str.10)
  %335 = call i64 (ptr, ...) @Print(ptr noundef @.str.11)
  store i64 0, ptr %1, align 8
  store i32 1, ptr %12, align 4
  br label %336

336:                                              ; preds = %332, %330, %318, %311, %306, %294, %281, %274, %267, %260, %251, %243, %235, %220, %214, %207, %201, %192, %186, %178, %172, %167, %159, %150, %140, %132, %122, %115, %105, %96, %89, %76, %65, %57, %50, %37, %26, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 20, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  %337 = load i64, ptr %1, align 8
  ret i64 %337
}

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

declare i64 @Print(ptr noundef, ...) #2

declare ptr @RsaNew() #2

declare zeroext i8 @RsaSetKey(ptr noundef, i32 noundef, ptr noundef, i64 noundef) #2

declare zeroext i8 @RsaGetKey(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare ptr @AllocatePool(i64 noundef) #2

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) #2

declare void @FreePool(ptr noundef) #2

declare zeroext i8 @RsaGenerateKey(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #2

declare zeroext i8 @RsaCheckKey(ptr noundef) #2

declare ptr @ZeroMem(ptr noundef, i64 noundef) #2

declare i64 @Sha1GetContextSize() #2

declare zeroext i8 @Sha1Init(ptr noundef) #2

declare zeroext i8 @Sha1Update(ptr noundef, ptr noundef, i64 noundef) #2

declare i64 @AsciiStrLen(ptr noundef) #2

declare zeroext i8 @Sha1Final(ptr noundef, ptr noundef) #2

declare void @RsaFree(ptr noundef) #2

declare zeroext i8 @RsaPkcs1Sign(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare zeroext i8 @RsaPkcs1Verify(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !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"

@RsaN = external dso_local constant [128 x i8], align 16
@RsaE = external dso_local constant [1 x i8], align 1
@RsaD = external dso_local constant [128 x i8], align 16
@RsaSignData = external dso_local constant [38 x i8], align 16
@RsaPkcs1Signature = external dso_local constant [128 x i8], align 16
@DefaultPublicKey = external dso_local constant [3 x i8], align 1
@.str = external hidden unnamed_addr constant [35 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [29 x i32], align 4
@.str.2 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.3 = external hidden unnamed_addr constant [32 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [34 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [33 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [38 x i32], align 4
@.str.7 = external hidden unnamed_addr constant [27 x i32], align 4
@.str.8 = external hidden unnamed_addr constant [22 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [35 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [31 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [2 x i32], align 4

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775787, 1) i64 @ValidateCryptRsa() local_unnamed_addr #0 {
  %1 = alloca [20 x i8], align 16
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str) #3
  %5 = tail call ptr @RsaNew() #3
  %6 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.1) #3
  %7 = icmp eq ptr %5, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %0
  %9 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

10:                                               ; preds = %0
  %11 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.3) #3
  %12 = tail call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef nonnull @RsaN, i64 noundef 128) #3
  %.not = icmp eq i8 %12, 0
  br i1 %.not, label %13, label %15

13:                                               ; preds = %10
  %14 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

15:                                               ; preds = %10
  store i64 0, ptr %3, align 8, !tbaa !5
  %16 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef null, ptr noundef nonnull %3) #3
  %17 = icmp ne i8 %16, 0
  %18 = load i64, ptr %3, align 8
  %19 = icmp ne i64 %18, 128
  %or.cond = select i1 %17, i1 true, i1 %19
  br i1 %or.cond, label %20, label %22

20:                                               ; preds = %15
  %21 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

22:                                               ; preds = %15
  %23 = call ptr @AllocatePool(i64 noundef 128) #3
  %24 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef %23, ptr noundef nonnull %3) #3
  %25 = icmp eq i8 %24, 0
  %26 = load i64, ptr %3, align 8
  %27 = icmp ne i64 %26, 128
  %or.cond3 = select i1 %25, i1 true, i1 %27
  br i1 %or.cond3, label %28, label %30

28:                                               ; preds = %22
  %29 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

30:                                               ; preds = %22
  %31 = call i64 @CompareMem(ptr noundef %23, ptr noundef nonnull @RsaN, i64 noundef 128) #3
  %.not99 = icmp eq i64 %31, 0
  br i1 %.not99, label %34, label %32

32:                                               ; preds = %30
  %33 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

34:                                               ; preds = %30
  call void @FreePool(ptr noundef %23) #3
  %35 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef nonnull @RsaE, i64 noundef 1) #3
  %.not100 = icmp eq i8 %35, 0
  br i1 %.not100, label %36, label %38

36:                                               ; preds = %34
  %37 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

38:                                               ; preds = %34
  store i64 0, ptr %3, align 8, !tbaa !5
  %39 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef null, ptr noundef nonnull %3) #3
  %40 = icmp ne i8 %39, 0
  %41 = load i64, ptr %3, align 8
  %42 = icmp ne i64 %41, 1
  %or.cond5 = select i1 %40, i1 true, i1 %42
  br i1 %or.cond5, label %43, label %45

43:                                               ; preds = %38
  %44 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

45:                                               ; preds = %38
  %46 = call ptr @AllocatePool(i64 noundef 1) #3
  %47 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef %46, ptr noundef nonnull %3) #3
  %48 = icmp eq i8 %47, 0
  %49 = load i64, ptr %3, align 8
  %50 = icmp ne i64 %49, 1
  %or.cond7 = select i1 %48, i1 true, i1 %50
  br i1 %or.cond7, label %51, label %53

51:                                               ; preds = %45
  %52 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

53:                                               ; preds = %45
  %54 = call i64 @CompareMem(ptr noundef %46, ptr noundef nonnull @RsaE, i64 noundef 1) #3
  %.not101 = icmp eq i64 %54, 0
  br i1 %.not101, label %57, label %55

55:                                               ; preds = %53
  %56 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

57:                                               ; preds = %53
  call void @FreePool(ptr noundef %46) #3
  %58 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.4) #3
  %59 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef null, i64 noundef 0) #3
  %.not102 = icmp eq i8 %59, 0
  br i1 %.not102, label %60, label %62

60:                                               ; preds = %57
  %61 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

62:                                               ; preds = %57
  store i64 1, ptr %3, align 8, !tbaa !5
  %63 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef null, ptr noundef nonnull %3) #3
  %64 = icmp eq i8 %63, 0
  %65 = load i64, ptr %3, align 8
  %66 = icmp ne i64 %65, 0
  %or.cond9 = select i1 %64, i1 true, i1 %66
  br i1 %or.cond9, label %67, label %69

67:                                               ; preds = %62
  %68 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

69:                                               ; preds = %62
  %70 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef null, i64 noundef 0) #3
  %.not103 = icmp eq i8 %70, 0
  br i1 %.not103, label %71, label %73

71:                                               ; preds = %69
  %72 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

73:                                               ; preds = %69
  store i64 1, ptr %3, align 8, !tbaa !5
  %74 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef null, ptr noundef nonnull %3) #3
  %75 = icmp eq i8 %74, 0
  %76 = load i64, ptr %3, align 8
  %77 = icmp ne i64 %76, 0
  %or.cond11 = select i1 %75, i1 true, i1 %77
  br i1 %or.cond11, label %78, label %80

78:                                               ; preds = %73
  %79 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

80:                                               ; preds = %73
  %81 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.5) #3
  %82 = call zeroext i8 @RsaGenerateKey(ptr noundef nonnull %5, i64 noundef 512, ptr noundef null, i64 noundef 0) #3
  %.not104 = icmp eq i8 %82, 0
  br i1 %.not104, label %83, label %85

83:                                               ; preds = %80
  %84 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

85:                                               ; preds = %80
  store i64 64, ptr %3, align 8, !tbaa !5
  %86 = call ptr @AllocatePool(i64 noundef 64) #3
  %87 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef %86, ptr noundef nonnull %3) #3
  %.not105 = icmp eq i8 %87, 0
  br i1 %.not105, label %88, label %90

88:                                               ; preds = %85
  %89 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

90:                                               ; preds = %85
  %91 = load i64, ptr %3, align 8, !tbaa !5
  %.not106 = icmp eq i64 %91, 3
  br i1 %.not106, label %92, label %94

92:                                               ; preds = %90
  %93 = call i64 @CompareMem(ptr noundef %86, ptr noundef nonnull @DefaultPublicKey, i64 noundef 3) #3
  %.not107 = icmp eq i64 %93, 0
  br i1 %.not107, label %96, label %94

94:                                               ; preds = %92, %90
  %95 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

96:                                               ; preds = %92
  store i64 64, ptr %3, align 8, !tbaa !5
  %97 = call zeroext i8 @RsaGetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef %86, ptr noundef nonnull %3) #3
  %.not108 = icmp eq i8 %97, 0
  br i1 %.not108, label %98, label %100

98:                                               ; preds = %96
  %99 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

100:                                              ; preds = %96
  %101 = load i64, ptr %3, align 8, !tbaa !5
  %.not109 = icmp eq i64 %101, 64
  br i1 %.not109, label %104, label %102

102:                                              ; preds = %100
  %103 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

104:                                              ; preds = %100
  %105 = call zeroext i8 @RsaCheckKey(ptr noundef nonnull %5) #3
  %.not110 = icmp eq i8 %105, 0
  br i1 %.not110, label %106, label %108

106:                                              ; preds = %104
  %107 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

108:                                              ; preds = %104
  %109 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.6) #3
  %110 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef nonnull @RsaN, i64 noundef 128) #3
  %.not111 = icmp eq i8 %110, 0
  br i1 %.not111, label %111, label %113

111:                                              ; preds = %108
  %112 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

113:                                              ; preds = %108
  %114 = call zeroext i8 @RsaCheckKey(ptr noundef nonnull %5) #3
  %.not112 = icmp eq i8 %114, 0
  br i1 %.not112, label %117, label %115

115:                                              ; preds = %113
  %116 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

117:                                              ; preds = %113
  %118 = load i64, ptr %3, align 8, !tbaa !5
  %119 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 0, ptr noundef %86, i64 noundef %118) #3
  %.not113 = icmp eq i8 %119, 0
  br i1 %.not113, label %120, label %122

120:                                              ; preds = %117
  %121 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

122:                                              ; preds = %117
  %123 = call zeroext i8 @RsaCheckKey(ptr noundef nonnull %5) #3
  %.not114 = icmp eq i8 %123, 0
  br i1 %.not114, label %124, label %126

124:                                              ; preds = %122
  %125 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

126:                                              ; preds = %122
  %127 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %5, i32 noundef 1, ptr noundef nonnull @RsaE, i64 noundef 1) #3
  %.not115 = icmp eq i8 %127, 0
  br i1 %.not115, label %128, label %130

128:                                              ; preds = %126
  %129 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

130:                                              ; preds = %126
  %131 = call zeroext i8 @RsaCheckKey(ptr noundef nonnull %5) #3
  %.not116 = icmp eq i8 %131, 0
  br i1 %.not116, label %134, label %132

132:                                              ; preds = %130
  %133 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

134:                                              ; preds = %130
  call void @FreePool(ptr noundef %86) #3
  %135 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.7) #3
  %136 = call ptr @ZeroMem(ptr noundef nonnull %1, i64 noundef 20) #3
  %137 = call i64 @Sha1GetContextSize() #3
  %138 = call ptr @AllocatePool(i64 noundef %137) #3
  %139 = call zeroext i8 @Sha1Init(ptr noundef %138) #3
  %.not117 = icmp eq i8 %139, 0
  br i1 %.not117, label %140, label %142

140:                                              ; preds = %134
  %141 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

142:                                              ; preds = %134
  %143 = call i64 @AsciiStrLen(ptr noundef nonnull @RsaSignData) #3
  %144 = call zeroext i8 @Sha1Update(ptr noundef %138, ptr noundef nonnull @RsaSignData, i64 noundef %143) #3
  %.not118 = icmp eq i8 %144, 0
  br i1 %.not118, label %145, label %147

145:                                              ; preds = %142
  %146 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

147:                                              ; preds = %142
  %148 = call zeroext i8 @Sha1Final(ptr noundef %138, ptr noundef nonnull %1) #3
  %.not119 = icmp eq i8 %148, 0
  br i1 %.not119, label %149, label %151

149:                                              ; preds = %147
  %150 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

151:                                              ; preds = %147
  call void @FreePool(ptr noundef %138) #3
  %152 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.8) #3
  call void @RsaFree(ptr noundef nonnull %5) #3
  %153 = call ptr @RsaNew() #3
  %154 = icmp eq ptr %153, null
  br i1 %154, label %155, label %157

155:                                              ; preds = %151
  %156 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

157:                                              ; preds = %151
  %158 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %153, i32 noundef 0, ptr noundef nonnull @RsaN, i64 noundef 128) #3
  %.not120 = icmp eq i8 %158, 0
  br i1 %.not120, label %159, label %161

159:                                              ; preds = %157
  %160 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

161:                                              ; preds = %157
  %162 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %153, i32 noundef 1, ptr noundef nonnull @RsaE, i64 noundef 1) #3
  %.not121 = icmp eq i8 %162, 0
  br i1 %.not121, label %163, label %165

163:                                              ; preds = %161
  %164 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

165:                                              ; preds = %161
  %166 = call zeroext i8 @RsaSetKey(ptr noundef nonnull %153, i32 noundef 2, ptr noundef nonnull @RsaD, i64 noundef 128) #3
  %.not122 = icmp eq i8 %166, 0
  br i1 %.not122, label %167, label %169

167:                                              ; preds = %165
  %168 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

169:                                              ; preds = %165
  store i64 0, ptr %2, align 8, !tbaa !5
  %170 = call zeroext i8 @RsaPkcs1Sign(ptr noundef nonnull %153, ptr noundef nonnull %1, i64 noundef 20, ptr noundef null, ptr noundef nonnull %2) #3
  %171 = icmp ne i8 %170, 0
  %172 = load i64, ptr %2, align 8
  %173 = icmp eq i64 %172, 0
  %or.cond13 = select i1 %171, i1 true, i1 %173
  br i1 %or.cond13, label %174, label %176

174:                                              ; preds = %169
  %175 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

176:                                              ; preds = %169
  %177 = call ptr @AllocatePool(i64 noundef %172) #3
  %178 = call zeroext i8 @RsaPkcs1Sign(ptr noundef nonnull %153, ptr noundef nonnull %1, i64 noundef 20, ptr noundef %177, ptr noundef nonnull %2) #3
  %.not123 = icmp eq i8 %178, 0
  br i1 %.not123, label %179, label %181

179:                                              ; preds = %176
  %180 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

181:                                              ; preds = %176
  %182 = load i64, ptr %2, align 8, !tbaa !5
  %.not124 = icmp eq i64 %182, 128
  br i1 %.not124, label %185, label %183

183:                                              ; preds = %181
  %184 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

185:                                              ; preds = %181
  %186 = call i64 @CompareMem(ptr noundef %177, ptr noundef nonnull @RsaPkcs1Signature, i64 noundef 128) #3
  %.not125 = icmp eq i64 %186, 0
  br i1 %.not125, label %189, label %187

187:                                              ; preds = %185
  %188 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

189:                                              ; preds = %185
  %190 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.9) #3
  %191 = load i64, ptr %2, align 8, !tbaa !5
  %192 = call zeroext i8 @RsaPkcs1Verify(ptr noundef nonnull %153, ptr noundef nonnull %1, i64 noundef 20, ptr noundef %177, i64 noundef %191) #3
  %.not126 = icmp eq i8 %192, 0
  br i1 %.not126, label %193, label %195

193:                                              ; preds = %189
  %194 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  br label %198

195:                                              ; preds = %189
  call void @RsaFree(ptr noundef nonnull %153) #3
  %196 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.10) #3
  %197 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11) #3
  br label %198

198:                                              ; preds = %195, %193, %187, %183, %179, %174, %167, %163, %159, %155, %149, %145, %140, %132, %128, %124, %120, %115, %111, %106, %102, %98, %94, %88, %83, %78, %71, %67, %60, %55, %51, %43, %36, %32, %28, %20, %13, %8
  %.0 = phi i64 [ -9223372036854775787, %8 ], [ -9223372036854775787, %20 ], [ -9223372036854775787, %28 ], [ -9223372036854775787, %32 ], [ -9223372036854775787, %43 ], [ -9223372036854775787, %51 ], [ -9223372036854775787, %55 ], [ -9223372036854775787, %67 ], [ -9223372036854775787, %78 ], [ -9223372036854775787, %94 ], [ -9223372036854775787, %102 ], [ -9223372036854775787, %115 ], [ -9223372036854775787, %132 ], [ -9223372036854775787, %155 ], [ -9223372036854775787, %174 ], [ -9223372036854775787, %183 ], [ -9223372036854775787, %187 ], [ 0, %195 ], [ -9223372036854775787, %193 ], [ -9223372036854775787, %179 ], [ -9223372036854775787, %167 ], [ -9223372036854775787, %163 ], [ -9223372036854775787, %159 ], [ -9223372036854775787, %149 ], [ -9223372036854775787, %145 ], [ -9223372036854775787, %140 ], [ -9223372036854775787, %128 ], [ -9223372036854775787, %124 ], [ -9223372036854775787, %120 ], [ -9223372036854775787, %111 ], [ -9223372036854775787, %106 ], [ -9223372036854775787, %98 ], [ -9223372036854775787, %88 ], [ -9223372036854775787, %83 ], [ -9223372036854775787, %71 ], [ -9223372036854775787, %60 ], [ -9223372036854775787, %36 ], [ -9223372036854775787, %13 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %1) #3
  ret i64 %.0
}

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

declare i64 @Print(ptr noundef, ...) local_unnamed_addr #2

declare ptr @RsaNew() local_unnamed_addr #2

declare zeroext i8 @RsaSetKey(ptr noundef, i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare zeroext i8 @RsaGetKey(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #2

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @RsaGenerateKey(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare zeroext i8 @RsaCheckKey(ptr noundef) local_unnamed_addr #2

declare ptr @ZeroMem(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @Sha1GetContextSize() local_unnamed_addr #2

declare zeroext i8 @Sha1Init(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @Sha1Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @AsciiStrLen(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @Sha1Final(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @RsaFree(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @RsaPkcs1Sign(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @RsaPkcs1Verify(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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