; LLVM IR from guanzhi/GmSSL :: tools (sm9verify)

; 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.SM9_SIGN_MASTER_KEY = type { %struct.SM9_Z256_TWIST_POINT, [4 x i64] }
%struct.SM9_Z256_TWIST_POINT = type { [2 x [4 x i64]], [2 x [4 x i64]], [2 x [4 x i64]] }
%struct.SM9_SIGN_CTX = type { %struct.SM3_CTX }
%struct.SM3_CTX = type { [8 x i32], i64, [64 x i8], i64 }

@stdin = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@usage = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@options = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [65 x i8], align 1
@__FUNCTION__.sm9verify_main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @sm9verify_main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.SM9_SIGN_MASTER_KEY, align 8
  %16 = alloca %struct.SM9_SIGN_CTX, align 8
  %17 = alloca [4096 x i8], align 16
  %18 = alloca i64, align 8
  %19 = alloca [104 x i8], align 16
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  store ptr %24, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %25 = load ptr, ptr @stdin, align 8, !tbaa !9
  store ptr %25, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 224, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 112, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4096, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %4, align 4, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i32 1
  store ptr %29, ptr %5, align 8, !tbaa !9
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp slt i32 %30, 1
  br i1 %31, label %32, label %37

32:                                               ; preds = %2
  %33 = load ptr, ptr @stderr, align 8, !tbaa !9
  %34 = load ptr, ptr %7, align 8, !tbaa !9
  %35 = load ptr, ptr @usage, align 8, !tbaa !9
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str, ptr noundef %34, ptr noundef %35) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %267

37:                                               ; preds = %2
  br label %38

38:                                               ; preds = %149, %37
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %154

41:                                               ; preds = %38
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = call i32 @strcmp(ptr noundef %43, ptr noundef @.str.1) #6
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %52, label %46

46:                                               ; preds = %41
  %47 = load ptr, ptr %7, align 8, !tbaa !9
  %48 = load ptr, ptr @usage, align 8, !tbaa !9
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %47, ptr noundef %48)
  %50 = load ptr, ptr @options, align 8, !tbaa !9
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %50)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %267

52:                                               ; preds = %41
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i32 @strcmp(ptr noundef %54, ptr noundef @.str.3) #6
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %76, label %57

57:                                               ; preds = %52
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %4, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 1
  br i1 %60, label %61, label %62

61:                                               ; preds = %57
  br label %139

62:                                               ; preds = %57
  %63 = load ptr, ptr %5, align 8, !tbaa !9
  %64 = getelementptr inbounds ptr, ptr %63, i32 1
  store ptr %64, ptr %5, align 8, !tbaa !9
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  store ptr %65, ptr %8, align 8, !tbaa !9
  %66 = load ptr, ptr %8, align 8, !tbaa !9
  %67 = call noalias ptr @fopen(ptr noundef %66, ptr noundef @.str.4)
  store ptr %67, ptr %12, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %75, label %69

69:                                               ; preds = %62
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr @stderr, align 8, !tbaa !9
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 72, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %73

73:                                               ; preds = %70
  br label %74

74:                                               ; preds = %73
  br label %238

75:                                               ; preds = %62
  br label %148

76:                                               ; preds = %52
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call i32 @strcmp(ptr noundef %78, ptr noundef @.str.7) #6
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %100, label %81

81:                                               ; preds = %76
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %4, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 1
  br i1 %84, label %85, label %86

85:                                               ; preds = %81
  br label %139

86:                                               ; preds = %81
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = getelementptr inbounds ptr, ptr %87, i32 1
  store ptr %88, ptr %5, align 8, !tbaa !9
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  store ptr %89, ptr %9, align 8, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !9
  %91 = call noalias ptr @fopen(ptr noundef %90, ptr noundef @.str.4)
  store ptr %91, ptr %13, align 8, !tbaa !9
  %92 = icmp ne ptr %91, null
  br i1 %92, label %99, label %93

93:                                               ; preds = %86
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr @stderr, align 8, !tbaa !9
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 79, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %97

97:                                               ; preds = %94
  br label %98

98:                                               ; preds = %97
  br label %238

99:                                               ; preds = %86
  br label %147

100:                                              ; preds = %76
  %101 = load ptr, ptr %5, align 8, !tbaa !9
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = call i32 @strcmp(ptr noundef %102, ptr noundef @.str.8) #6
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %114, label %105

105:                                              ; preds = %100
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = add nsw i32 %106, -1
  store i32 %107, ptr %4, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 1
  br i1 %108, label %109, label %110

109:                                              ; preds = %105
  br label %139

110:                                              ; preds = %105
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = getelementptr inbounds ptr, ptr %111, i32 1
  store ptr %112, ptr %5, align 8, !tbaa !9
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  store ptr %113, ptr %10, align 8, !tbaa !9
  br label %146

114:                                              ; preds = %100
  %115 = load ptr, ptr %5, align 8, !tbaa !9
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = call i32 @strcmp(ptr noundef %116, ptr noundef @.str.9) #6
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %138, label %119

119:                                              ; preds = %114
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %4, align 4, !tbaa !5
  %122 = icmp slt i32 %121, 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %119
  br label %139

124:                                              ; preds = %119
  %125 = load ptr, ptr %5, align 8, !tbaa !9
  %126 = getelementptr inbounds ptr, ptr %125, i32 1
  store ptr %126, ptr %5, align 8, !tbaa !9
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  store ptr %127, ptr %11, align 8, !tbaa !9
  %128 = load ptr, ptr %11, align 8, !tbaa !9
  %129 = call noalias ptr @fopen(ptr noundef %128, ptr noundef @.str.4)
  store ptr %129, ptr %14, align 8, !tbaa !9
  %130 = icmp ne ptr %129, null
  br i1 %130, label %137, label %131

131:                                              ; preds = %124
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr @stderr, align 8, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 89, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %135

135:                                              ; preds = %132
  br label %136

136:                                              ; preds = %135
  br label %238

137:                                              ; preds = %124
  br label %145

138:                                              ; preds = %114
  br label %139

139:                                              ; preds = %138, %123, %109, %85, %61
  %140 = load ptr, ptr @stderr, align 8, !tbaa !9
  %141 = load ptr, ptr %7, align 8, !tbaa !9
  %142 = load ptr, ptr %5, align 8, !tbaa !9
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.10, ptr noundef %141, ptr noundef %143) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %267

145:                                              ; preds = %137
  br label %146

146:                                              ; preds = %145, %110
  br label %147

147:                                              ; preds = %146, %99
  br label %148

148:                                              ; preds = %147, %75
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %4, align 4, !tbaa !5
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %4, align 4, !tbaa !5
  %152 = load ptr, ptr %5, align 8, !tbaa !9
  %153 = getelementptr inbounds ptr, ptr %152, i32 1
  store ptr %153, ptr %5, align 8, !tbaa !9
  br label %38, !llvm.loop !11

154:                                              ; preds = %38
  %155 = load ptr, ptr %9, align 8, !tbaa !9
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %163

157:                                              ; preds = %154
  %158 = load ptr, ptr %10, align 8, !tbaa !9
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %163

160:                                              ; preds = %157
  %161 = load ptr, ptr %11, align 8, !tbaa !9
  %162 = icmp ne ptr %161, null
  br i1 %162, label %169, label %163

163:                                              ; preds = %160, %157, %154
  br label %164

164:                                              ; preds = %163
  %165 = load ptr, ptr @stderr, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 103, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %167

167:                                              ; preds = %164
  br label %168

168:                                              ; preds = %167
  br label %238

169:                                              ; preds = %160
  %170 = load ptr, ptr %13, align 8, !tbaa !9
  %171 = call i32 @sm9_sign_master_public_key_from_pem(ptr noundef %15, ptr noundef %170)
  %172 = icmp ne i32 %171, 1
  br i1 %172, label %173, label %179

173:                                              ; preds = %169
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr @stderr, align 8, !tbaa !9
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 108, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %177

177:                                              ; preds = %174
  br label %178

178:                                              ; preds = %177
  br label %238

179:                                              ; preds = %169
  %180 = getelementptr inbounds [104 x i8], ptr %19, i64 0, i64 0
  %181 = load ptr, ptr %14, align 8, !tbaa !9
  %182 = call i64 @fread(ptr noundef %180, i64 noundef 1, i64 noundef 104, ptr noundef %181)
  store i64 %182, ptr %20, align 8, !tbaa !13
  %183 = icmp ule i64 %182, 0
  br i1 %183, label %184, label %190

184:                                              ; preds = %179
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr @stderr, align 8, !tbaa !9
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 113, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %188

188:                                              ; preds = %185
  br label %189

189:                                              ; preds = %188
  br label %238

190:                                              ; preds = %179
  %191 = call i32 @sm9_verify_init(ptr noundef %16)
  %192 = icmp ne i32 %191, 1
  br i1 %192, label %193, label %199

193:                                              ; preds = %190
  br label %194

194:                                              ; preds = %193
  %195 = load ptr, ptr @stderr, align 8, !tbaa !9
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 118, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %197

197:                                              ; preds = %194
  br label %198

198:                                              ; preds = %197
  br label %238

199:                                              ; preds = %190
  br label %200

200:                                              ; preds = %216, %199
  %201 = getelementptr inbounds [4096 x i8], ptr %17, i64 0, i64 0
  %202 = load ptr, ptr %12, align 8, !tbaa !9
  %203 = call i64 @fread(ptr noundef %201, i64 noundef 1, i64 noundef 4096, ptr noundef %202)
  store i64 %203, ptr %18, align 8, !tbaa !13
  %204 = icmp ugt i64 %203, 0
  br i1 %204, label %205, label %217

205:                                              ; preds = %200
  %206 = getelementptr inbounds [4096 x i8], ptr %17, i64 0, i64 0
  %207 = load i64, ptr %18, align 8, !tbaa !13
  %208 = call i32 @sm9_verify_update(ptr noundef %16, ptr noundef %206, i64 noundef %207)
  %209 = icmp ne i32 %208, 1
  br i1 %209, label %210, label %216

210:                                              ; preds = %205
  br label %211

211:                                              ; preds = %210
  %212 = load ptr, ptr @stderr, align 8, !tbaa !9
  %213 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 123, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %214

214:                                              ; preds = %211
  br label %215

215:                                              ; preds = %214
  br label %238

216:                                              ; preds = %205
  br label %200, !llvm.loop !15

217:                                              ; preds = %200
  %218 = getelementptr inbounds [104 x i8], ptr %19, i64 0, i64 0
  %219 = load i64, ptr %20, align 8, !tbaa !13
  %220 = load ptr, ptr %10, align 8, !tbaa !9
  %221 = load ptr, ptr %10, align 8, !tbaa !9
  %222 = call i64 @strlen(ptr noundef %221) #6
  %223 = call i32 @sm9_verify_finish(ptr noundef %16, ptr noundef %218, i64 noundef %219, ptr noundef %15, ptr noundef %220, i64 noundef %222)
  store i32 %223, ptr %6, align 4, !tbaa !5
  %224 = icmp ne i32 %223, 1
  br i1 %224, label %225, label %231

225:                                              ; preds = %217
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr @stderr, align 8, !tbaa !9
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 128, ptr noundef @__FUNCTION__.sm9verify_main) #5
  br label %229

229:                                              ; preds = %226
  br label %230

230:                                              ; preds = %229
  br label %238

231:                                              ; preds = %217
  %232 = load ptr, ptr %7, align 8, !tbaa !9
  %233 = load i32, ptr %6, align 4, !tbaa !5
  %234 = icmp ne i32 %233, 0
  %235 = zext i1 %234 to i64
  %236 = select i1 %234, ptr @.str.12, ptr @.str.13
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %232, ptr noundef %236)
  br label %238

238:                                              ; preds = %231, %230, %215, %198, %189, %178, %168, %136, %98, %74
  %239 = load ptr, ptr %8, align 8, !tbaa !9
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %247

241:                                              ; preds = %238
  %242 = load ptr, ptr %12, align 8, !tbaa !9
  %243 = icmp ne ptr %242, null
  br i1 %243, label %244, label %247

244:                                              ; preds = %241
  %245 = load ptr, ptr %12, align 8, !tbaa !9
  %246 = call i32 @fclose(ptr noundef %245)
  br label %247

247:                                              ; preds = %244, %241, %238
  %248 = load ptr, ptr %9, align 8, !tbaa !9
  %249 = icmp ne ptr %248, null
  br i1 %249, label %250, label %256

250:                                              ; preds = %247
  %251 = load ptr, ptr %13, align 8, !tbaa !9
  %252 = icmp ne ptr %251, null
  br i1 %252, label %253, label %256

253:                                              ; preds = %250
  %254 = load ptr, ptr %13, align 8, !tbaa !9
  %255 = call i32 @fclose(ptr noundef %254)
  br label %256

256:                                              ; preds = %253, %250, %247
  %257 = load ptr, ptr %11, align 8, !tbaa !9
  %258 = icmp ne ptr %257, null
  br i1 %258, label %259, label %265

259:                                              ; preds = %256
  %260 = load ptr, ptr %14, align 8, !tbaa !9
  %261 = icmp ne ptr %260, null
  br i1 %261, label %262, label %265

262:                                              ; preds = %259
  %263 = load ptr, ptr %14, align 8, !tbaa !9
  %264 = call i32 @fclose(ptr noundef %263)
  br label %265

265:                                              ; preds = %262, %259, %256
  %266 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %266, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %267

267:                                              ; preds = %265, %139, %46, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %268 = load i32, ptr %3, align 4
  ret i32 %268
}

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #4

declare i32 @sm9_sign_master_public_key_from_pem(ptr noundef, ptr noundef) #4

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

declare i32 @sm9_verify_init(ptr noundef) #4

declare i32 @sm9_verify_update(ptr noundef, ptr noundef, i64 noundef) #4

declare i32 @sm9_verify_finish(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

declare i32 @fclose(ptr noundef) #4

; 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 = { 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 #3 = { nounwind willreturn memory(read) "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 = { "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 }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !12}


; 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.SM9_SIGN_MASTER_KEY = type { %struct.SM9_Z256_TWIST_POINT, [4 x i64] }
%struct.SM9_Z256_TWIST_POINT = type { [2 x [4 x i64]], [2 x [4 x i64]], [2 x [4 x i64]] }
%struct.SM9_SIGN_CTX = type { %struct.SM3_CTX }
%struct.SM3_CTX = type { [8 x i32], i64, [64 x i8], i64 }

@stdin = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@usage = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@options = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [65 x i8], align 1
@__FUNCTION__.sm9verify_main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @sm9verify_main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.SM9_SIGN_MASTER_KEY, align 8
  %4 = alloca %struct.SM9_SIGN_CTX, align 8
  %5 = alloca [4096 x i8], align 16
  %6 = alloca [104 x i8], align 16
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = load ptr, ptr @stdin, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %6) #5
  %9 = icmp slt i32 %0, 2
  br i1 %9, label %11, label %.preheader122.preheader

.preheader122.preheader:                          ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  br label %.preheader122

11:                                               ; preds = %2
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = load ptr, ptr @usage, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str, ptr noundef %7, ptr noundef %13) #6
  br label %118

.preheader122:                                    ; preds = %.preheader122.preheader, %63
  %.058.in174 = phi i32 [ %.1, %63 ], [ %0, %.preheader122.preheader ]
  %.059173 = phi ptr [ %.160, %63 ], [ null, %.preheader122.preheader ]
  %.061172 = phi ptr [ %.162, %63 ], [ null, %.preheader122.preheader ]
  %.064171 = phi ptr [ %.165, %63 ], [ %8, %.preheader122.preheader ]
  %.067170 = phi ptr [ %.168, %63 ], [ null, %.preheader122.preheader ]
  %.070169 = phi ptr [ %.171, %63 ], [ null, %.preheader122.preheader ]
  %.072168 = phi ptr [ %.173, %63 ], [ null, %.preheader122.preheader ]
  %.075167 = phi ptr [ %.176, %63 ], [ null, %.preheader122.preheader ]
  %.078166 = phi ptr [ %64, %63 ], [ %10, %.preheader122.preheader ]
  %15 = load ptr, ptr %.078166, align 8, !tbaa !5
  %16 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.1) #7
  %.not100 = icmp eq i32 %16, 0
  br i1 %.not100, label %17, label %22

17:                                               ; preds = %.preheader122
  %18 = load ptr, ptr @usage, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %7, ptr noundef %18)
  %20 = load ptr, ptr @options, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %20)
  br label %118

22:                                               ; preds = %.preheader122
  %23 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.3) #7
  %.not101 = icmp eq i32 %23, 0
  br i1 %.not101, label %24, label %32

24:                                               ; preds = %22
  %25 = icmp eq i32 %.058.in174, 2
  br i1 %25, label %60, label %26

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %.078166, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = tail call noalias ptr @fopen(ptr noundef %28, ptr noundef nonnull @.str.4)
  %.not102 = icmp eq ptr %29, null
  br i1 %.not102, label %.thread, label %63

.thread:                                          ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 72, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %108

32:                                               ; preds = %22
  %33 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.7) #7
  %.not103 = icmp eq i32 %33, 0
  br i1 %.not103, label %34, label %43

34:                                               ; preds = %32
  %35 = icmp eq i32 %.058.in174, 2
  br i1 %35, label %60, label %36

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %.078166, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = tail call noalias ptr @fopen(ptr noundef %38, ptr noundef nonnull @.str.4)
  %.not104 = icmp eq ptr %39, null
  br i1 %.not104, label %40, label %63

40:                                               ; preds = %36
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 79, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

43:                                               ; preds = %32
  %44 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.8) #7
  %.not105 = icmp eq i32 %44, 0
  br i1 %.not105, label %45, label %50

45:                                               ; preds = %43
  %46 = icmp eq i32 %.058.in174, 2
  br i1 %46, label %60, label %47

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %.078166, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  br label %63

50:                                               ; preds = %43
  %51 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.9) #7
  %.not106 = icmp ne i32 %51, 0
  %52 = icmp eq i32 %.058.in174, 2
  %or.cond108 = or i1 %52, %.not106
  br i1 %or.cond108, label %60, label %53

53:                                               ; preds = %50
  %54 = getelementptr inbounds i8, ptr %.078166, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = tail call noalias ptr @fopen(ptr noundef %55, ptr noundef nonnull @.str.4)
  %.not107 = icmp eq ptr %56, null
  br i1 %.not107, label %57, label %63

57:                                               ; preds = %53
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 89, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

60:                                               ; preds = %50, %45, %34, %24
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.10, ptr noundef %7, ptr noundef %15) #6
  br label %118

63:                                               ; preds = %26, %47, %53, %36
  %.176 = phi ptr [ %.075167, %53 ], [ %.075167, %47 ], [ %.075167, %36 ], [ %28, %26 ]
  %.173 = phi ptr [ %.072168, %53 ], [ %.072168, %47 ], [ %38, %36 ], [ %.072168, %26 ]
  %.171 = phi ptr [ %.070169, %53 ], [ %49, %47 ], [ %.070169, %36 ], [ %.070169, %26 ]
  %.168 = phi ptr [ %55, %53 ], [ %.067170, %47 ], [ %.067170, %36 ], [ %.067170, %26 ]
  %.165 = phi ptr [ %.064171, %53 ], [ %.064171, %47 ], [ %.064171, %36 ], [ %29, %26 ]
  %.162 = phi ptr [ %.061172, %53 ], [ %.061172, %47 ], [ %39, %36 ], [ %.061172, %26 ]
  %.160 = phi ptr [ %56, %53 ], [ %.059173, %47 ], [ %.059173, %36 ], [ %.059173, %26 ]
  %.1 = add nsw i32 %.058.in174, -2
  %64 = getelementptr inbounds i8, ptr %.078166, i64 16
  %65 = icmp sgt i32 %.058.in174, 3
  br i1 %65, label %.preheader122, label %66, !llvm.loop !9

66:                                               ; preds = %63
  %67 = icmp ne ptr %.173, null
  %68 = icmp ne ptr %.171, null
  %or.cond = select i1 %67, i1 %68, i1 false
  %69 = icmp ne ptr %.168, null
  %or.cond3 = select i1 %or.cond, i1 %69, i1 false
  br i1 %or.cond3, label %73, label %70

70:                                               ; preds = %66
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 103, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

73:                                               ; preds = %66
  %74 = call i32 @sm9_sign_master_public_key_from_pem(ptr noundef nonnull %3, ptr noundef %.162) #5
  %.not = icmp eq i32 %74, 1
  br i1 %.not, label %78, label %75

75:                                               ; preds = %73
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 108, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

78:                                               ; preds = %73
  %79 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 104, ptr noundef %.160)
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %84

81:                                               ; preds = %78
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 113, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

84:                                               ; preds = %78
  %85 = call i32 @sm9_verify_init(ptr noundef nonnull %4) #5
  %.not96 = icmp eq i32 %85, 1
  br i1 %.not96, label %.preheader, label %86

86:                                               ; preds = %84
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 118, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

.preheader:                                       ; preds = %84, %90
  %89 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 1, i64 noundef 4096, ptr noundef %.165)
  %.not97 = icmp eq i64 %89, 0
  br i1 %.not97, label %95, label %90

90:                                               ; preds = %.preheader
  %91 = call i32 @sm9_verify_update(ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef %89) #5
  %.not99 = icmp eq i32 %91, 1
  br i1 %.not99, label %.preheader, label %92, !llvm.loop !11

92:                                               ; preds = %90
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 123, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

95:                                               ; preds = %.preheader
  %96 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.171) #7
  %97 = call i32 @sm9_verify_finish(ptr noundef nonnull %4, ptr noundef nonnull %6, i64 noundef %79, ptr noundef nonnull %3, ptr noundef nonnull %.171, i64 noundef %96) #5
  %.not98 = icmp eq i32 %97, 1
  br i1 %.not98, label %101, label %98

98:                                               ; preds = %95
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 128, ptr noundef nonnull @__FUNCTION__.sm9verify_main) #6
  br label %103

101:                                              ; preds = %95
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef %7, ptr noundef nonnull @.str.12)
  br label %103

103:                                              ; preds = %101, %98, %92, %86, %81, %75, %70, %57, %40
  %.075160 = phi ptr [ %.075167, %57 ], [ %.075167, %40 ], [ %.176, %75 ], [ %.176, %81 ], [ %.176, %86 ], [ %.176, %92 ], [ %.176, %98 ], [ %.176, %101 ], [ %.176, %70 ]
  %.064139 = phi ptr [ %.064171, %57 ], [ %.064171, %40 ], [ %.165, %75 ], [ %.165, %81 ], [ %.165, %86 ], [ %.165, %92 ], [ %.165, %98 ], [ %.165, %101 ], [ %.165, %70 ]
  %.080 = phi i32 [ 1, %57 ], [ 1, %40 ], [ 1, %75 ], [ 1, %81 ], [ 1, %86 ], [ 1, %92 ], [ %97, %98 ], [ 1, %101 ], [ 1, %70 ]
  %.274 = phi ptr [ %.072168, %57 ], [ %38, %40 ], [ %.173, %75 ], [ %.173, %81 ], [ %.173, %86 ], [ %.173, %92 ], [ %.173, %98 ], [ %.173, %101 ], [ %.173, %70 ]
  %.269 = phi ptr [ %55, %57 ], [ %.067170, %40 ], [ %.168, %75 ], [ %.168, %81 ], [ %.168, %86 ], [ %.168, %92 ], [ %.168, %98 ], [ %.168, %101 ], [ %.168, %70 ]
  %.263 = phi ptr [ %.061172, %57 ], [ null, %40 ], [ %.162, %75 ], [ %.162, %81 ], [ %.162, %86 ], [ %.162, %92 ], [ %.162, %98 ], [ %.162, %101 ], [ %.162, %70 ]
  %.2 = phi ptr [ null, %57 ], [ %.059173, %40 ], [ %.160, %75 ], [ %.160, %81 ], [ %.160, %86 ], [ %.160, %92 ], [ %.160, %98 ], [ %.160, %101 ], [ %.160, %70 ]
  %104 = icmp ne ptr %.075160, null
  %105 = icmp ne ptr %.064139, null
  %or.cond5 = select i1 %104, i1 %105, i1 false
  br i1 %or.cond5, label %106, label %108

106:                                              ; preds = %103
  %107 = call i32 @fclose(ptr noundef nonnull %.064139)
  br label %108

108:                                              ; preds = %.thread, %106, %103
  %.2121 = phi ptr [ %.059173, %.thread ], [ %.2, %106 ], [ %.2, %103 ]
  %.263120 = phi ptr [ %.061172, %.thread ], [ %.263, %106 ], [ %.263, %103 ]
  %.269119 = phi ptr [ %.067170, %.thread ], [ %.269, %106 ], [ %.269, %103 ]
  %.274118 = phi ptr [ %.072168, %.thread ], [ %.274, %106 ], [ %.274, %103 ]
  %.080117 = phi i32 [ 1, %.thread ], [ %.080, %106 ], [ %.080, %103 ]
  %109 = icmp ne ptr %.274118, null
  %110 = icmp ne ptr %.263120, null
  %or.cond7 = select i1 %109, i1 %110, i1 false
  br i1 %or.cond7, label %111, label %113

111:                                              ; preds = %108
  %112 = call i32 @fclose(ptr noundef nonnull %.263120)
  br label %113

113:                                              ; preds = %111, %108
  %114 = icmp ne ptr %.269119, null
  %115 = icmp ne ptr %.2121, null
  %or.cond9 = select i1 %114, i1 %115, i1 false
  br i1 %or.cond9, label %116, label %118

116:                                              ; preds = %113
  %117 = call i32 @fclose(ptr noundef nonnull %.2121)
  br label %118

118:                                              ; preds = %113, %116, %60, %17, %11
  %.0 = phi i32 [ 1, %11 ], [ 1, %60 ], [ 0, %17 ], [ %.080117, %116 ], [ %.080117, %113 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #5
  ret i32 %.0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

declare i32 @sm9_sign_master_public_key_from_pem(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

declare i32 @sm9_verify_init(ptr noundef) local_unnamed_addr #4

declare i32 @sm9_verify_update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

declare i32 @sm9_verify_finish(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture 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 = { nofree 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "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 }
attributes #6 = { cold nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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