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

; 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.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.CMS_CERTS_AND_KEY = type { ptr, i64, ptr }

@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = 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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @cmssign_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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.SM2_KEY, align 8
  %18 = alloca [1024 x i8], align 16
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca %struct.CMS_CERTS_AND_KEY, align 8
  %26 = alloca i32, align 4
  %27 = alloca %struct.SM2_KEY, align 8
  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) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 0
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  store ptr %30, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %31 = load ptr, ptr @stdout, align 8, !tbaa !9
  store ptr %31, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store ptr null, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %4, align 4, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i32 1
  store ptr %35, ptr %5, align 8, !tbaa !9
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 1
  br i1 %37, label %38, label %43

38:                                               ; preds = %2
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = load ptr, ptr %7, align 8, !tbaa !9
  %41 = load ptr, ptr @options, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str, ptr noundef %40, ptr noundef %41) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %368

43:                                               ; preds = %2
  br label %44

44:                                               ; preds = %191, %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 1
  br i1 %46, label %47, label %196

47:                                               ; preds = %44
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call i32 @strcmp(ptr noundef %49, ptr noundef @.str.1) #8
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %56, label %52

52:                                               ; preds = %47
  %53 = load ptr, ptr %7, align 8, !tbaa !9
  %54 = load ptr, ptr @options, align 8, !tbaa !9
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %53, ptr noundef %54)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %329

56:                                               ; preds = %47
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = call i32 @strcmp(ptr noundef %58, ptr noundef @.str.2) #8
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %82, label %61

61:                                               ; preds = %56
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = add nsw i32 %62, -1
  store i32 %63, ptr %4, align 4, !tbaa !5
  %64 = icmp slt i32 %63, 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %61
  br label %180

66:                                               ; preds = %61
  %67 = load ptr, ptr %5, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i32 1
  store ptr %68, ptr %5, align 8, !tbaa !9
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  store ptr %69, ptr %8, align 8, !tbaa !9
  %70 = load ptr, ptr %8, align 8, !tbaa !9
  %71 = call noalias ptr @fopen(ptr noundef %70, ptr noundef @.str.3)
  store ptr %71, ptr %13, align 8, !tbaa !9
  %72 = icmp ne ptr %71, null
  br i1 %72, label %81, label %73

73:                                               ; preds = %66
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = load ptr, ptr %7, align 8, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = call ptr @__errno_location() #9
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = call ptr @strerror(i32 noundef %78) #7
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.4, ptr noundef %75, ptr noundef %76, ptr noundef %79) #7
  br label %329

81:                                               ; preds = %66
  br label %190

82:                                               ; preds = %56
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = call i32 @strcmp(ptr noundef %84, ptr noundef @.str.5) #8
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %96, label %87

87:                                               ; preds = %82
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %4, align 4, !tbaa !5
  %90 = icmp slt i32 %89, 1
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  br label %180

92:                                               ; preds = %87
  %93 = load ptr, ptr %5, align 8, !tbaa !9
  %94 = getelementptr inbounds ptr, ptr %93, i32 1
  store ptr %94, ptr %5, align 8, !tbaa !9
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  store ptr %95, ptr %9, align 8, !tbaa !9
  br label %189

96:                                               ; preds = %82
  %97 = load ptr, ptr %5, align 8, !tbaa !9
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = call i32 @strcmp(ptr noundef %98, ptr noundef @.str.6) #8
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %122, label %101

101:                                              ; preds = %96
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  store i32 %103, ptr %4, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %101
  br label %180

106:                                              ; preds = %101
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %107, i32 1
  store ptr %108, ptr %5, align 8, !tbaa !9
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  store ptr %109, ptr %10, align 8, !tbaa !9
  %110 = load ptr, ptr %10, align 8, !tbaa !9
  %111 = call noalias ptr @fopen(ptr noundef %110, ptr noundef @.str.3)
  store ptr %111, ptr %14, align 8, !tbaa !9
  %112 = icmp ne ptr %111, null
  br i1 %112, label %121, label %113

113:                                              ; preds = %106
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = load ptr, ptr %7, align 8, !tbaa !9
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = call ptr @__errno_location() #9
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = call ptr @strerror(i32 noundef %118) #7
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.4, ptr noundef %115, ptr noundef %116, ptr noundef %119) #7
  br label %329

121:                                              ; preds = %106
  br label %188

122:                                              ; preds = %96
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  %125 = call i32 @strcmp(ptr noundef %124, ptr noundef @.str.7) #8
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %148, label %127

127:                                              ; preds = %122
  %128 = load i32, ptr %4, align 4, !tbaa !5
  %129 = add nsw i32 %128, -1
  store i32 %129, ptr %4, align 4, !tbaa !5
  %130 = icmp slt i32 %129, 1
  br i1 %130, label %131, label %132

131:                                              ; preds = %127
  br label %180

132:                                              ; preds = %127
  %133 = load ptr, ptr %5, align 8, !tbaa !9
  %134 = getelementptr inbounds ptr, ptr %133, i32 1
  store ptr %134, ptr %5, align 8, !tbaa !9
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  store ptr %135, ptr %11, align 8, !tbaa !9
  %136 = load ptr, ptr %11, align 8, !tbaa !9
  %137 = call noalias ptr @fopen(ptr noundef %136, ptr noundef @.str.3)
  store ptr %137, ptr %15, align 8, !tbaa !9
  %138 = icmp ne ptr %137, null
  br i1 %138, label %147, label %139

139:                                              ; preds = %132
  %140 = load ptr, ptr @stderr, align 8, !tbaa !9
  %141 = load ptr, ptr %7, align 8, !tbaa !9
  %142 = load ptr, ptr %11, align 8, !tbaa !9
  %143 = call ptr @__errno_location() #9
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = call ptr @strerror(i32 noundef %144) #7
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.4, ptr noundef %141, ptr noundef %142, ptr noundef %145) #7
  br label %329

147:                                              ; preds = %132
  br label %187

148:                                              ; preds = %122
  %149 = load ptr, ptr %5, align 8, !tbaa !9
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call i32 @strcmp(ptr noundef %150, ptr noundef @.str.8) #8
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %174, label %153

153:                                              ; preds = %148
  %154 = load i32, ptr %4, align 4, !tbaa !5
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr %4, align 4, !tbaa !5
  %156 = icmp slt i32 %155, 1
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  br label %180

158:                                              ; preds = %153
  %159 = load ptr, ptr %5, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %159, i32 1
  store ptr %160, ptr %5, align 8, !tbaa !9
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  store ptr %161, ptr %12, align 8, !tbaa !9
  %162 = load ptr, ptr %12, align 8, !tbaa !9
  %163 = call noalias ptr @fopen(ptr noundef %162, ptr noundef @.str.9)
  store ptr %163, ptr %16, align 8, !tbaa !9
  %164 = icmp ne ptr %163, null
  br i1 %164, label %173, label %165

165:                                              ; preds = %158
  %166 = load ptr, ptr @stderr, align 8, !tbaa !9
  %167 = load ptr, ptr %7, align 8, !tbaa !9
  %168 = load ptr, ptr %12, align 8, !tbaa !9
  %169 = call ptr @__errno_location() #9
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = call ptr @strerror(i32 noundef %170) #7
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef @.str.4, ptr noundef %167, ptr noundef %168, ptr noundef %171) #7
  br label %329

173:                                              ; preds = %158
  br label %186

174:                                              ; preds = %148
  %175 = load ptr, ptr @stderr, align 8, !tbaa !9
  %176 = load ptr, ptr %7, align 8, !tbaa !9
  %177 = load ptr, ptr %5, align 8, !tbaa !9
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef @.str.10, ptr noundef %176, ptr noundef %178) #7
  br label %329

180:                                              ; preds = %157, %131, %105, %91, %65
  %181 = load ptr, ptr @stderr, align 8, !tbaa !9
  %182 = load ptr, ptr %7, align 8, !tbaa !9
  %183 = load ptr, ptr %5, align 8, !tbaa !9
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.11, ptr noundef %182, ptr noundef %184) #7
  br label %329

186:                                              ; preds = %173
  br label %187

187:                                              ; preds = %186, %147
  br label %188

188:                                              ; preds = %187, %121
  br label %189

189:                                              ; preds = %188, %92
  br label %190

190:                                              ; preds = %189, %81
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %4, align 4, !tbaa !5
  %193 = add nsw i32 %192, -1
  store i32 %193, ptr %4, align 4, !tbaa !5
  %194 = load ptr, ptr %5, align 8, !tbaa !9
  %195 = getelementptr inbounds ptr, ptr %194, i32 1
  store ptr %195, ptr %5, align 8, !tbaa !9
  br label %44, !llvm.loop !11

196:                                              ; preds = %44
  %197 = load ptr, ptr %8, align 8, !tbaa !9
  %198 = icmp ne ptr %197, null
  br i1 %198, label %203, label %199

199:                                              ; preds = %196
  %200 = load ptr, ptr @stderr, align 8, !tbaa !9
  %201 = load ptr, ptr %7, align 8, !tbaa !9
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.12, ptr noundef %201) #7
  br label %329

203:                                              ; preds = %196
  %204 = load ptr, ptr %9, align 8, !tbaa !9
  %205 = icmp ne ptr %204, null
  br i1 %205, label %210, label %206

206:                                              ; preds = %203
  %207 = load ptr, ptr @stderr, align 8, !tbaa !9
  %208 = load ptr, ptr %7, align 8, !tbaa !9
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.13, ptr noundef %208) #7
  br label %329

210:                                              ; preds = %203
  %211 = load ptr, ptr %10, align 8, !tbaa !9
  %212 = icmp ne ptr %211, null
  br i1 %212, label %217, label %213

213:                                              ; preds = %210
  %214 = load ptr, ptr @stderr, align 8, !tbaa !9
  %215 = load ptr, ptr %7, align 8, !tbaa !9
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %214, ptr noundef @.str.14, ptr noundef %215) #7
  br label %329

217:                                              ; preds = %210
  %218 = load ptr, ptr %11, align 8, !tbaa !9
  %219 = icmp ne ptr %218, null
  br i1 %219, label %224, label %220

220:                                              ; preds = %217
  %221 = load ptr, ptr @stderr, align 8, !tbaa !9
  %222 = load ptr, ptr %7, align 8, !tbaa !9
  %223 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef @.str.15, ptr noundef %222) #7
  br label %329

224:                                              ; preds = %217
  %225 = load ptr, ptr %9, align 8, !tbaa !9
  %226 = load ptr, ptr %13, align 8, !tbaa !9
  %227 = call i32 @sm2_private_key_info_decrypt_from_pem(ptr noundef %17, ptr noundef %225, ptr noundef %226)
  %228 = icmp ne i32 %227, 1
  br i1 %228, label %229, label %233

229:                                              ; preds = %224
  %230 = load ptr, ptr @stderr, align 8, !tbaa !9
  %231 = load ptr, ptr %7, align 8, !tbaa !9
  %232 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %230, ptr noundef @.str.16, ptr noundef %231) #7
  br label %329

233:                                              ; preds = %224
  %234 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %235 = load ptr, ptr %14, align 8, !tbaa !9
  %236 = call i32 @x509_cert_from_pem(ptr noundef %234, ptr noundef %19, i64 noundef 1024, ptr noundef %235)
  %237 = icmp ne i32 %236, 1
  br i1 %237, label %238, label %242

238:                                              ; preds = %233
  %239 = load ptr, ptr @stderr, align 8, !tbaa !9
  %240 = load ptr, ptr %7, align 8, !tbaa !9
  %241 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %239, ptr noundef @.str.17, ptr noundef %240) #7
  br label %329

242:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 128, ptr %27) #7
  %243 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %244 = load i64, ptr %19, align 8, !tbaa !13
  %245 = call i32 @x509_cert_get_subject_public_key(ptr noundef %243, i64 noundef %244, ptr noundef %27)
  %246 = icmp ne i32 %245, 1
  br i1 %246, label %247, label %251

247:                                              ; preds = %242
  %248 = load ptr, ptr @stderr, align 8, !tbaa !9
  %249 = load ptr, ptr %7, align 8, !tbaa !9
  %250 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %248, ptr noundef @.str.18, ptr noundef %249) #7
  store i32 4, ptr %26, align 4
  br label %259

251:                                              ; preds = %242
  %252 = call i32 @sm2_public_key_equ(ptr noundef %17, ptr noundef %27)
  %253 = icmp ne i32 %252, 1
  br i1 %253, label %254, label %258

254:                                              ; preds = %251
  %255 = load ptr, ptr @stderr, align 8, !tbaa !9
  %256 = load ptr, ptr %7, align 8, !tbaa !9
  %257 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %255, ptr noundef @.str.19, ptr noundef %256) #7
  store i32 4, ptr %26, align 4
  br label %259

258:                                              ; preds = %251
  store i32 0, ptr %26, align 4
  br label %259

259:                                              ; preds = %258, %254, %247
  call void @llvm.lifetime.end.p0(i64 128, ptr %27) #7
  %260 = load i32, ptr %26, align 4
  switch i32 %260, label %368 [
    i32 0, label %261
    i32 4, label %329
  ]

261:                                              ; preds = %259
  %262 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %263 = getelementptr inbounds %struct.CMS_CERTS_AND_KEY, ptr %25, i32 0, i32 0
  store ptr %262, ptr %263, align 8, !tbaa !15
  %264 = load i64, ptr %19, align 8, !tbaa !13
  %265 = getelementptr inbounds %struct.CMS_CERTS_AND_KEY, ptr %25, i32 0, i32 1
  store i64 %264, ptr %265, align 8, !tbaa !17
  %266 = getelementptr inbounds %struct.CMS_CERTS_AND_KEY, ptr %25, i32 0, i32 2
  store ptr %17, ptr %266, align 8, !tbaa !18
  %267 = load ptr, ptr %15, align 8, !tbaa !9
  %268 = call i32 @file_size(ptr noundef %267, ptr noundef %21)
  %269 = icmp ne i32 %268, 1
  br i1 %269, label %270, label %274

270:                                              ; preds = %261
  %271 = load ptr, ptr @stderr, align 8, !tbaa !9
  %272 = load ptr, ptr %7, align 8, !tbaa !9
  %273 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %271, ptr noundef @.str.20, ptr noundef %272) #7
  br label %329

274:                                              ; preds = %261
  %275 = load i64, ptr %21, align 8, !tbaa !13
  %276 = call noalias ptr @malloc(i64 noundef %275) #10
  store ptr %276, ptr %20, align 8, !tbaa !9
  %277 = icmp ne ptr %276, null
  br i1 %277, label %282, label %278

278:                                              ; preds = %274
  %279 = load ptr, ptr @stderr, align 8, !tbaa !9
  %280 = load ptr, ptr %7, align 8, !tbaa !9
  %281 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %279, ptr noundef @.str.21, ptr noundef %280) #7
  br label %329

282:                                              ; preds = %274
  %283 = load ptr, ptr %20, align 8, !tbaa !9
  %284 = load i64, ptr %21, align 8, !tbaa !13
  %285 = load ptr, ptr %15, align 8, !tbaa !9
  %286 = call i64 @fread(ptr noundef %283, i64 noundef 1, i64 noundef %284, ptr noundef %285)
  %287 = load i64, ptr %21, align 8, !tbaa !13
  %288 = icmp ne i64 %286, %287
  br i1 %288, label %289, label %296

289:                                              ; preds = %282
  %290 = load ptr, ptr @stderr, align 8, !tbaa !9
  %291 = load ptr, ptr %7, align 8, !tbaa !9
  %292 = call ptr @__errno_location() #9
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = call ptr @strerror(i32 noundef %293) #7
  %295 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %290, ptr noundef @.str.22, ptr noundef %291, ptr noundef %294) #7
  br label %329

296:                                              ; preds = %282
  %297 = load i64, ptr %21, align 8, !tbaa !13
  %298 = mul i64 %297, 4
  %299 = udiv i64 %298, 3
  %300 = add i64 %299, 4096
  store i64 %300, ptr %24, align 8, !tbaa !13
  %301 = load i64, ptr %24, align 8, !tbaa !13
  %302 = call noalias ptr @malloc(i64 noundef %301) #10
  store ptr %302, ptr %22, align 8, !tbaa !9
  %303 = icmp ne ptr %302, null
  br i1 %303, label %308, label %304

304:                                              ; preds = %296
  %305 = load ptr, ptr @stderr, align 8, !tbaa !9
  %306 = load ptr, ptr %7, align 8, !tbaa !9
  %307 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %305, ptr noundef @.str.21, ptr noundef %306) #7
  br label %329

308:                                              ; preds = %296
  %309 = load ptr, ptr %22, align 8, !tbaa !9
  %310 = load ptr, ptr %20, align 8, !tbaa !9
  %311 = load i64, ptr %21, align 8, !tbaa !13
  %312 = call i32 @cms_sign(ptr noundef %309, ptr noundef %23, ptr noundef %25, i64 noundef 1, i32 noundef 118, ptr noundef %310, i64 noundef %311, ptr noundef null, i64 noundef 0)
  %313 = icmp ne i32 %312, 1
  br i1 %313, label %314, label %318

314:                                              ; preds = %308
  %315 = load ptr, ptr @stderr, align 8, !tbaa !9
  %316 = load ptr, ptr %7, align 8, !tbaa !9
  %317 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %315, ptr noundef @.str.23, ptr noundef %316) #7
  br label %329

318:                                              ; preds = %308
  %319 = load ptr, ptr %22, align 8, !tbaa !9
  %320 = load i64, ptr %23, align 8, !tbaa !13
  %321 = load ptr, ptr %16, align 8, !tbaa !9
  %322 = call i32 @cms_to_pem(ptr noundef %319, i64 noundef %320, ptr noundef %321)
  %323 = icmp ne i32 %322, 1
  br i1 %323, label %324, label %328

324:                                              ; preds = %318
  %325 = load ptr, ptr @stderr, align 8, !tbaa !9
  %326 = load ptr, ptr %7, align 8, !tbaa !9
  %327 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %325, ptr noundef @.str.24, ptr noundef %326) #7
  br label %329

328:                                              ; preds = %318
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %329

329:                                              ; preds = %328, %324, %314, %304, %289, %278, %270, %259, %238, %229, %220, %213, %206, %199, %180, %174, %165, %139, %113, %73, %52
  %330 = load ptr, ptr %11, align 8, !tbaa !9
  %331 = icmp ne ptr %330, null
  br i1 %331, label %332, label %338

332:                                              ; preds = %329
  %333 = load ptr, ptr %15, align 8, !tbaa !9
  %334 = icmp ne ptr %333, null
  br i1 %334, label %335, label %338

335:                                              ; preds = %332
  %336 = load ptr, ptr %15, align 8, !tbaa !9
  %337 = call i32 @fclose(ptr noundef %336)
  br label %338

338:                                              ; preds = %335, %332, %329
  %339 = load ptr, ptr %12, align 8, !tbaa !9
  %340 = icmp ne ptr %339, null
  br i1 %340, label %341, label %347

341:                                              ; preds = %338
  %342 = load ptr, ptr %16, align 8, !tbaa !9
  %343 = icmp ne ptr %342, null
  br i1 %343, label %344, label %347

344:                                              ; preds = %341
  %345 = load ptr, ptr %16, align 8, !tbaa !9
  %346 = call i32 @fclose(ptr noundef %345)
  br label %347

347:                                              ; preds = %344, %341, %338
  %348 = load ptr, ptr %8, align 8, !tbaa !9
  %349 = icmp ne ptr %348, null
  br i1 %349, label %350, label %356

350:                                              ; preds = %347
  %351 = load ptr, ptr %13, align 8, !tbaa !9
  %352 = icmp ne ptr %351, null
  br i1 %352, label %353, label %356

353:                                              ; preds = %350
  %354 = load ptr, ptr %13, align 8, !tbaa !9
  %355 = call i32 @fclose(ptr noundef %354)
  br label %356

356:                                              ; preds = %353, %350, %347
  %357 = load ptr, ptr %22, align 8, !tbaa !9
  %358 = icmp ne ptr %357, null
  br i1 %358, label %359, label %361

359:                                              ; preds = %356
  %360 = load ptr, ptr %22, align 8, !tbaa !9
  call void @free(ptr noundef %360) #7
  br label %361

361:                                              ; preds = %359, %356
  %362 = load ptr, ptr %20, align 8, !tbaa !9
  %363 = icmp ne ptr %362, null
  br i1 %363, label %364, label %366

364:                                              ; preds = %361
  %365 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %365) #7
  br label %366

366:                                              ; preds = %364, %361
  %367 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %367, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %368

368:                                              ; preds = %366, %259, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %369 = load i32, ptr %3, align 4
  ret i32 %369
}

; 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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

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

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

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

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #6

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

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

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

declare i32 @fclose(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 willreturn memory(none) "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 #6 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { nounwind allocsize(0) }

!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 = !{!16, !10, i64 0}
!16 = !{!"", !10, i64 0, !14, i64 8, !10, i64 16}
!17 = !{!16, !14, i64 8}
!18 = !{!16, !10, i64 16}


; 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.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.CMS_CERTS_AND_KEY = type { ptr, i64, ptr }

@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = 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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @cmssign_main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.SM2_KEY, align 8
  %4 = alloca [1024 x i8], align 16
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.CMS_CERTS_AND_KEY, align 8
  %9 = alloca %struct.SM2_KEY, align 8
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = load ptr, ptr @stdout, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  %12 = icmp slt i32 %0, 2
  br i1 %12, label %14, label %.preheader

.preheader:                                       ; preds = %2
  %.not269 = icmp eq i32 %0, 2
  br i1 %.not269, label %._crit_edge.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  br label %.lr.ph

14:                                               ; preds = %2
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = load ptr, ptr @options, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str, ptr noundef %10, ptr noundef %16) #10
  br label %173

.lr.ph:                                           ; preds = %.lr.ph.preheader, %79
  %.093260 = phi ptr [ %.1, %79 ], [ %11, %.lr.ph.preheader ]
  %.094259 = phi ptr [ %.195, %79 ], [ null, %.lr.ph.preheader ]
  %.097258 = phi ptr [ %.198, %79 ], [ null, %.lr.ph.preheader ]
  %.099257 = phi ptr [ %.1100, %79 ], [ null, %.lr.ph.preheader ]
  %.0102256 = phi ptr [ %.1103, %79 ], [ null, %.lr.ph.preheader ]
  %.0105255 = phi ptr [ %.1106, %79 ], [ null, %.lr.ph.preheader ]
  %.0108254 = phi ptr [ %.1109, %79 ], [ null, %.lr.ph.preheader ]
  %.0110253 = phi ptr [ %.1111, %79 ], [ null, %.lr.ph.preheader ]
  %.0112252 = phi ptr [ %.1113, %79 ], [ null, %.lr.ph.preheader ]
  %.0115.in251 = phi i32 [ %.1116, %79 ], [ %0, %.lr.ph.preheader ]
  %.0118250 = phi ptr [ %80, %79 ], [ %13, %.lr.ph.preheader ]
  %18 = load ptr, ptr %.0118250, align 8, !tbaa !5
  %19 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.1) #11
  %.not151 = icmp eq i32 %19, 0
  br i1 %.not151, label %20, label %23

20:                                               ; preds = %.lr.ph
  %21 = load ptr, ptr @options, align 8, !tbaa !5
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %10, ptr noundef %21)
  br label %155

23:                                               ; preds = %.lr.ph
  %24 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.2) #11
  %.not152 = icmp eq i32 %24, 0
  br i1 %.not152, label %25, label %35

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %.0118250, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call noalias ptr @fopen(ptr noundef %27, ptr noundef nonnull @.str.3)
  %.not153 = icmp eq ptr %28, null
  br i1 %.not153, label %29, label %79

29:                                               ; preds = %25
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call ptr @__errno_location() #12
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = tail call ptr @strerror(i32 noundef %32) #9
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.4, ptr noundef %10, ptr noundef %27, ptr noundef %33) #10
  br label %155

35:                                               ; preds = %23
  %36 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.5) #11
  %.not154 = icmp eq i32 %36, 0
  br i1 %.not154, label %37, label %40

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %.0118250, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  br label %79

40:                                               ; preds = %35
  %41 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.6) #11
  %.not155 = icmp eq i32 %41, 0
  br i1 %.not155, label %42, label %52

42:                                               ; preds = %40
  %43 = getelementptr inbounds i8, ptr %.0118250, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = tail call noalias ptr @fopen(ptr noundef %44, ptr noundef nonnull @.str.3)
  %.not156 = icmp eq ptr %45, null
  br i1 %.not156, label %46, label %79

46:                                               ; preds = %42
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = tail call ptr @__errno_location() #12
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = tail call ptr @strerror(i32 noundef %49) #9
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.4, ptr noundef %10, ptr noundef %44, ptr noundef %50) #10
  br label %155

52:                                               ; preds = %40
  %53 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.7) #11
  %.not157 = icmp eq i32 %53, 0
  br i1 %.not157, label %54, label %64

54:                                               ; preds = %52
  %55 = getelementptr inbounds i8, ptr %.0118250, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = tail call noalias ptr @fopen(ptr noundef %56, ptr noundef nonnull @.str.3)
  %.not158 = icmp eq ptr %57, null
  br i1 %.not158, label %58, label %79

58:                                               ; preds = %54
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = tail call ptr @__errno_location() #12
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = tail call ptr @strerror(i32 noundef %61) #9
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.4, ptr noundef %10, ptr noundef %56, ptr noundef %62) #10
  br label %.thread167

64:                                               ; preds = %52
  %65 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.8) #11
  %.not159 = icmp eq i32 %65, 0
  br i1 %.not159, label %66, label %76

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %.0118250, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = tail call noalias ptr @fopen(ptr noundef %68, ptr noundef nonnull @.str.9)
  %.not160 = icmp eq ptr %69, null
  br i1 %.not160, label %70, label %79

70:                                               ; preds = %66
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = tail call ptr @__errno_location() #12
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = tail call ptr @strerror(i32 noundef %73) #9
  %75 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.4, ptr noundef %10, ptr noundef %68, ptr noundef %74) #10
  br label %155

76:                                               ; preds = %64
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.10, ptr noundef %10, ptr noundef %18) #10
  br label %155

79:                                               ; preds = %25, %42, %66, %54, %37
  %.1113 = phi ptr [ %.0112252, %66 ], [ %.0112252, %54 ], [ %.0112252, %42 ], [ %.0112252, %37 ], [ %27, %25 ]
  %.1111 = phi ptr [ %.0110253, %66 ], [ %.0110253, %54 ], [ %.0110253, %42 ], [ %39, %37 ], [ %.0110253, %25 ]
  %.1109 = phi ptr [ %.0108254, %66 ], [ %.0108254, %54 ], [ %44, %42 ], [ %.0108254, %37 ], [ %.0108254, %25 ]
  %.1106 = phi ptr [ %.0105255, %66 ], [ %56, %54 ], [ %.0105255, %42 ], [ %.0105255, %37 ], [ %.0105255, %25 ]
  %.1103 = phi ptr [ %68, %66 ], [ %.0102256, %54 ], [ %.0102256, %42 ], [ %.0102256, %37 ], [ %.0102256, %25 ]
  %.1100 = phi ptr [ %.099257, %66 ], [ %.099257, %54 ], [ %.099257, %42 ], [ %.099257, %37 ], [ %28, %25 ]
  %.198 = phi ptr [ %.097258, %66 ], [ %.097258, %54 ], [ %45, %42 ], [ %.097258, %37 ], [ %.097258, %25 ]
  %.195 = phi ptr [ %.094259, %66 ], [ %57, %54 ], [ %.094259, %42 ], [ %.094259, %37 ], [ %.094259, %25 ]
  %.1 = phi ptr [ %69, %66 ], [ %.093260, %54 ], [ %.093260, %42 ], [ %.093260, %37 ], [ %.093260, %25 ]
  %.1116 = add nsw i32 %.0115.in251, -2
  %80 = getelementptr inbounds i8, ptr %.0118250, i64 16
  %81 = icmp sgt i32 %.0115.in251, 4
  br i1 %81, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %79
  %.not = icmp eq ptr %.1113, null
  br i1 %.not, label %._crit_edge.thread, label %84

._crit_edge.thread:                               ; preds = %.preheader, %._crit_edge
  %.093.lcssa330 = phi ptr [ %.1, %._crit_edge ], [ %11, %.preheader ]
  %.094.lcssa329 = phi ptr [ %.195, %._crit_edge ], [ null, %.preheader ]
  %.099.lcssa328 = phi ptr [ %.1100, %._crit_edge ], [ null, %.preheader ]
  %.0102.lcssa327 = phi ptr [ %.1103, %._crit_edge ], [ null, %.preheader ]
  %.0105.lcssa326 = phi ptr [ %.1106, %._crit_edge ], [ null, %.preheader ]
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str.12, ptr noundef %10) #10
  br label %155

84:                                               ; preds = %._crit_edge
  %.not138 = icmp eq ptr %.1111, null
  br i1 %.not138, label %85, label %88

85:                                               ; preds = %84
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef nonnull @.str.13, ptr noundef %10) #10
  br label %155

88:                                               ; preds = %84
  %.not139 = icmp eq ptr %.1109, null
  br i1 %.not139, label %89, label %92

89:                                               ; preds = %88
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull @.str.14, ptr noundef %10) #10
  br label %155

92:                                               ; preds = %88
  %.not140 = icmp eq ptr %.1106, null
  br i1 %.not140, label %93, label %96

93:                                               ; preds = %92
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.15, ptr noundef %10) #10
  br label %.thread167

96:                                               ; preds = %92
  %97 = call i32 @sm2_private_key_info_decrypt_from_pem(ptr noundef nonnull %3, ptr noundef nonnull %.1111, ptr noundef %.1100) #9
  %.not141 = icmp eq i32 %97, 1
  br i1 %.not141, label %101, label %98

98:                                               ; preds = %96
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.16, ptr noundef %10) #10
  br label %155

101:                                              ; preds = %96
  %102 = call i32 @x509_cert_from_pem(ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef 1024, ptr noundef %.198) #9
  %.not142 = icmp eq i32 %102, 1
  br i1 %.not142, label %106, label %103

103:                                              ; preds = %101
  %104 = load ptr, ptr @stderr, align 8, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef nonnull @.str.17, ptr noundef %10) #10
  br label %155

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #9
  %107 = load i64, ptr %5, align 8, !tbaa !13
  %108 = call i32 @x509_cert_get_subject_public_key(ptr noundef nonnull %4, i64 noundef %107, ptr noundef nonnull %9) #9
  %.not143 = icmp eq i32 %108, 1
  br i1 %.not143, label %109, label %.thread

109:                                              ; preds = %106
  %110 = call i32 @sm2_public_key_equ(ptr noundef nonnull %3, ptr noundef nonnull %9) #9
  %.not144 = icmp eq i32 %110, 1
  br i1 %.not144, label %113, label %.thread

.thread:                                          ; preds = %109, %106
  %.str.18.sink = phi ptr [ @.str.18, %106 ], [ @.str.19, %109 ]
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull %.str.18.sink, ptr noundef %10) #10
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #9
  br label %155

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #9
  store ptr %4, ptr %8, align 8, !tbaa !15
  %114 = load i64, ptr %5, align 8, !tbaa !13
  %115 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 %114, ptr %115, align 8, !tbaa !17
  %116 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %3, ptr %116, align 8, !tbaa !18
  %117 = call i32 @file_size(ptr noundef %.195, ptr noundef nonnull %6) #9
  %.not145 = icmp eq i32 %117, 1
  br i1 %.not145, label %121, label %118

118:                                              ; preds = %113
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef nonnull @.str.20, ptr noundef %10) #10
  br label %155

121:                                              ; preds = %113
  %122 = load i64, ptr %6, align 8, !tbaa !13
  %123 = call noalias ptr @malloc(i64 noundef %122) #13
  %.not146 = icmp eq ptr %123, null
  br i1 %.not146, label %124, label %127

124:                                              ; preds = %121
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef nonnull @.str.21, ptr noundef %10) #10
  br label %155

127:                                              ; preds = %121
  %128 = call i64 @fread(ptr noundef nonnull %123, i64 noundef 1, i64 noundef %122, ptr noundef %.195)
  %129 = load i64, ptr %6, align 8, !tbaa !13
  %.not147 = icmp eq i64 %128, %129
  br i1 %.not147, label %136, label %130

130:                                              ; preds = %127
  %131 = load ptr, ptr @stderr, align 8, !tbaa !5
  %132 = tail call ptr @__errno_location() #12
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = call ptr @strerror(i32 noundef %133) #9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef nonnull @.str.22, ptr noundef %10, ptr noundef %134) #10
  br label %155

136:                                              ; preds = %127
  %137 = shl i64 %128, 2
  %138 = udiv i64 %137, 3
  %139 = add nuw nsw i64 %138, 4096
  %140 = call noalias ptr @malloc(i64 noundef %139) #13
  %.not148 = icmp eq ptr %140, null
  br i1 %.not148, label %141, label %144

141:                                              ; preds = %136
  %142 = load ptr, ptr @stderr, align 8, !tbaa !5
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.21, ptr noundef %10) #10
  br label %155

144:                                              ; preds = %136
  %145 = call i32 @cms_sign(ptr noundef nonnull %140, ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef 1, i32 noundef 118, ptr noundef nonnull %123, i64 noundef %128, ptr noundef null, i64 noundef 0) #9
  %.not149 = icmp eq i32 %145, 1
  br i1 %.not149, label %149, label %146

146:                                              ; preds = %144
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef nonnull @.str.23, ptr noundef %10) #10
  br label %155

149:                                              ; preds = %144
  %150 = load i64, ptr %7, align 8, !tbaa !13
  %151 = call i32 @cms_to_pem(ptr noundef nonnull %140, i64 noundef %150, ptr noundef %.1) #9
  %.not150 = icmp eq i32 %151, 1
  br i1 %.not150, label %155, label %152

152:                                              ; preds = %149
  %153 = load ptr, ptr @stderr, align 8, !tbaa !5
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef nonnull @.str.24, ptr noundef %10) #10
  br label %155

155:                                              ; preds = %.thread, %149, %152, %146, %141, %130, %124, %118, %103, %98, %89, %85, %._crit_edge.thread, %76, %70, %46, %29, %20
  %.0105224 = phi ptr [ %.0105255, %76 ], [ %.0105255, %70 ], [ %.0105255, %46 ], [ %.0105255, %29 ], [ %.0105255, %20 ], [ %.1106, %98 ], [ %.1106, %103 ], [ %.1106, %118 ], [ %.1106, %130 ], [ %.1106, %146 ], [ %.1106, %152 ], [ %.1106, %141 ], [ %.1106, %124 ], [ %.1106, %89 ], [ %.1106, %85 ], [ %.0105.lcssa326, %._crit_edge.thread ], [ %.1106, %149 ], [ %.1106, %.thread ]
  %.094199 = phi ptr [ %.094259, %76 ], [ %.094259, %70 ], [ %.094259, %46 ], [ %.094259, %29 ], [ %.094259, %20 ], [ %.195, %98 ], [ %.195, %103 ], [ %.195, %118 ], [ %.195, %130 ], [ %.195, %146 ], [ %.195, %152 ], [ %.195, %141 ], [ %.195, %124 ], [ %.195, %89 ], [ %.195, %85 ], [ %.094.lcssa329, %._crit_edge.thread ], [ %.195, %149 ], [ %.195, %.thread ]
  %.0117 = phi i32 [ 1, %76 ], [ 1, %70 ], [ 1, %46 ], [ 1, %29 ], [ 0, %20 ], [ 1, %98 ], [ 1, %103 ], [ 1, %118 ], [ 1, %130 ], [ 1, %146 ], [ 1, %152 ], [ 1, %141 ], [ 1, %124 ], [ 1, %89 ], [ 1, %85 ], [ 1, %._crit_edge.thread ], [ 0, %149 ], [ 1, %.thread ]
  %.2114 = phi ptr [ %.0112252, %76 ], [ %.0112252, %70 ], [ %.0112252, %46 ], [ %27, %29 ], [ %.0112252, %20 ], [ %.1113, %98 ], [ %.1113, %103 ], [ %.1113, %118 ], [ %.1113, %130 ], [ %.1113, %146 ], [ %.1113, %152 ], [ %.1113, %141 ], [ %.1113, %124 ], [ %.1113, %89 ], [ %.1113, %85 ], [ null, %._crit_edge.thread ], [ %.1113, %149 ], [ %.1113, %.thread ]
  %.2104 = phi ptr [ %.0102256, %76 ], [ %68, %70 ], [ %.0102256, %46 ], [ %.0102256, %29 ], [ %.0102256, %20 ], [ %.1103, %98 ], [ %.1103, %103 ], [ %.1103, %118 ], [ %.1103, %130 ], [ %.1103, %146 ], [ %.1103, %152 ], [ %.1103, %141 ], [ %.1103, %124 ], [ %.1103, %89 ], [ %.1103, %85 ], [ %.0102.lcssa327, %._crit_edge.thread ], [ %.1103, %149 ], [ %.1103, %.thread ]
  %.2101 = phi ptr [ %.099257, %76 ], [ %.099257, %70 ], [ %.099257, %46 ], [ null, %29 ], [ %.099257, %20 ], [ %.1100, %98 ], [ %.1100, %103 ], [ %.1100, %118 ], [ %.1100, %130 ], [ %.1100, %146 ], [ %.1100, %152 ], [ %.1100, %141 ], [ %.1100, %124 ], [ %.1100, %89 ], [ %.1100, %85 ], [ %.099.lcssa328, %._crit_edge.thread ], [ %.1100, %149 ], [ %.1100, %.thread ]
  %.2 = phi ptr [ %.093260, %76 ], [ null, %70 ], [ %.093260, %46 ], [ %.093260, %29 ], [ %.093260, %20 ], [ %.1, %98 ], [ %.1, %103 ], [ %.1, %118 ], [ %.1, %130 ], [ %.1, %146 ], [ %.1, %152 ], [ %.1, %141 ], [ %.1, %124 ], [ %.1, %89 ], [ %.1, %85 ], [ %.093.lcssa330, %._crit_edge.thread ], [ %.1, %149 ], [ %.1, %.thread ]
  %.092 = phi ptr [ null, %76 ], [ null, %70 ], [ null, %46 ], [ null, %29 ], [ null, %20 ], [ null, %98 ], [ null, %103 ], [ null, %118 ], [ %123, %130 ], [ %123, %146 ], [ %123, %152 ], [ %123, %141 ], [ null, %124 ], [ null, %89 ], [ null, %85 ], [ null, %._crit_edge.thread ], [ %123, %149 ], [ null, %.thread ]
  %.091 = phi ptr [ null, %76 ], [ null, %70 ], [ null, %46 ], [ null, %29 ], [ null, %20 ], [ null, %98 ], [ null, %103 ], [ null, %118 ], [ null, %130 ], [ %140, %146 ], [ %140, %152 ], [ null, %141 ], [ null, %124 ], [ null, %89 ], [ null, %85 ], [ null, %._crit_edge.thread ], [ %140, %149 ], [ null, %.thread ]
  %156 = icmp ne ptr %.0105224, null
  %157 = icmp ne ptr %.094199, null
  %or.cond = select i1 %156, i1 %157, i1 false
  br i1 %or.cond, label %158, label %.thread167

158:                                              ; preds = %155
  %159 = call i32 @fclose(ptr noundef nonnull %.094199)
  br label %.thread167

.thread167:                                       ; preds = %58, %93, %158, %155
  %.091184 = phi ptr [ %.091, %158 ], [ %.091, %155 ], [ null, %93 ], [ null, %58 ]
  %.092183 = phi ptr [ %.092, %158 ], [ %.092, %155 ], [ null, %93 ], [ null, %58 ]
  %.2182 = phi ptr [ %.2, %158 ], [ %.2, %155 ], [ %.1, %93 ], [ %.093260, %58 ]
  %.2101181 = phi ptr [ %.2101, %158 ], [ %.2101, %155 ], [ %.1100, %93 ], [ %.099257, %58 ]
  %.2104180 = phi ptr [ %.2104, %158 ], [ %.2104, %155 ], [ %.1103, %93 ], [ %.0102256, %58 ]
  %.2114179 = phi ptr [ %.2114, %158 ], [ %.2114, %155 ], [ %.1113, %93 ], [ %.0112252, %58 ]
  %.0117178 = phi i32 [ %.0117, %158 ], [ %.0117, %155 ], [ 1, %93 ], [ 1, %58 ]
  %160 = icmp ne ptr %.2104180, null
  %161 = icmp ne ptr %.2182, null
  %or.cond3 = select i1 %160, i1 %161, i1 false
  br i1 %or.cond3, label %162, label %164

162:                                              ; preds = %.thread167
  %163 = call i32 @fclose(ptr noundef nonnull %.2182)
  br label %164

164:                                              ; preds = %162, %.thread167
  %165 = icmp ne ptr %.2114179, null
  %166 = icmp ne ptr %.2101181, null
  %or.cond5 = select i1 %165, i1 %166, i1 false
  br i1 %or.cond5, label %167, label %169

167:                                              ; preds = %164
  %168 = call i32 @fclose(ptr noundef nonnull %.2101181)
  br label %169

169:                                              ; preds = %167, %164
  %.not161 = icmp eq ptr %.091184, null
  br i1 %.not161, label %171, label %170

170:                                              ; preds = %169
  call void @free(ptr noundef nonnull %.091184) #9
  br label %171

171:                                              ; preds = %170, %169
  %.not162 = icmp eq ptr %.092183, null
  br i1 %.not162, label %173, label %172

172:                                              ; preds = %171
  call void @free(ptr noundef nonnull %.092183) #9
  br label %173

173:                                              ; preds = %171, %172, %14
  %.090 = phi i32 [ 1, %14 ], [ %.0117178, %172 ], [ %.0117178, %171 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #9
  ret i32 %.090
}

; 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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #5

declare i32 @sm2_private_key_info_decrypt_from_pem(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @x509_cert_from_pem(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @x509_cert_get_subject_public_key(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @sm2_public_key_equ(ptr noundef, ptr noundef) local_unnamed_addr #6

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

declare i32 @file_size(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #7

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

declare i32 @cms_sign(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

declare i32 @cms_to_pem(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !14, i64 8, !6, i64 16}
!17 = !{!16, !14, i64 8}
!18 = !{!16, !6, i64 16}


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