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

; 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.SM4_CBC_CTX = type { %struct.SM4_KEY, [16 x i8], [16 x i8], i64 }
%struct.SM4_KEY = type { [32 x i32] }

@stdin = external global ptr, align 8
@stdout = 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 [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [63 x i8], align 1
@__FUNCTION__.sm4_cbc_main = external hidden unnamed_addr constant [13 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [31 x i8], align 1

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

35:                                               ; preds = %2
  %36 = load ptr, ptr @stderr, align 8, !tbaa !9
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = load ptr, ptr @usage, align 8, !tbaa !9
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str, ptr noundef %37, ptr noundef %38) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %23, align 4
  br label %383

40:                                               ; preds = %2
  br label %41

41:                                               ; preds = %217, %40
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %222

44:                                               ; preds = %41
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = call i32 @strcmp(ptr noundef %46, ptr noundef @.str.1) #7
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %55, label %49

49:                                               ; preds = %44
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  %51 = load ptr, ptr @usage, align 8, !tbaa !9
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %50, ptr noundef %51)
  %53 = load ptr, ptr @options, align 8, !tbaa !9
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %53)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %360

55:                                               ; preds = %44
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = call i32 @strcmp(ptr noundef %57, ptr noundef @.str.3) #7
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %68, label %60

60:                                               ; preds = %55
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %60
  %64 = load ptr, ptr @stderr, align 8, !tbaa !9
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.4, ptr noundef %65) #6
  br label %360

67:                                               ; preds = %60
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %216

68:                                               ; preds = %55
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = call i32 @strcmp(ptr noundef %70, ptr noundef @.str.5) #7
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %81, label %73

73:                                               ; preds = %68
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %80

76:                                               ; preds = %73
  %77 = load ptr, ptr @stderr, align 8, !tbaa !9
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.4, ptr noundef %78) #6
  br label %360

80:                                               ; preds = %73
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %215

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

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

90:                                               ; preds = %86
  br label %205

91:                                               ; preds = %86
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %92, i32 1
  store ptr %93, ptr %5, align 8, !tbaa !9
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  store ptr %94, ptr %9, align 8, !tbaa !9
  %95 = load ptr, ptr %9, align 8, !tbaa !9
  %96 = call i64 @strlen(ptr noundef %95) #7
  %97 = icmp ne i64 %96, 32
  br i1 %97, label %98, label %102

98:                                               ; preds = %91
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = load ptr, ptr %7, align 8, !tbaa !9
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.7, ptr noundef %100) #6
  br label %360

102:                                              ; preds = %91
  %103 = load ptr, ptr %9, align 8, !tbaa !9
  %104 = load ptr, ptr %9, align 8, !tbaa !9
  %105 = call i64 @strlen(ptr noundef %104) #7
  %106 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %107 = call i32 @hex_to_bytes(ptr noundef %103, i64 noundef %105, ptr noundef %106, ptr noundef %14)
  %108 = icmp ne i32 %107, 1
  br i1 %108, label %109, label %113

109:                                              ; preds = %102
  %110 = load ptr, ptr @stderr, align 8, !tbaa !9
  %111 = load ptr, ptr %7, align 8, !tbaa !9
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.8, ptr noundef %111) #6
  br label %360

113:                                              ; preds = %102
  br label %214

114:                                              ; preds = %81
  %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) #7
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %147, 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 %205

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 %10, align 8, !tbaa !9
  %128 = load ptr, ptr %10, align 8, !tbaa !9
  %129 = call i64 @strlen(ptr noundef %128) #7
  %130 = icmp ne i64 %129, 32
  br i1 %130, label %131, label %135

131:                                              ; preds = %124
  %132 = load ptr, ptr @stderr, align 8, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.10, ptr noundef %133) #6
  br label %360

135:                                              ; preds = %124
  %136 = load ptr, ptr %10, align 8, !tbaa !9
  %137 = load ptr, ptr %10, align 8, !tbaa !9
  %138 = call i64 @strlen(ptr noundef %137) #7
  %139 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 0
  %140 = call i32 @hex_to_bytes(ptr noundef %136, i64 noundef %138, ptr noundef %139, ptr noundef %16)
  %141 = icmp ne i32 %140, 1
  br i1 %141, label %142, label %146

142:                                              ; preds = %135
  %143 = load ptr, ptr @stderr, align 8, !tbaa !9
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.11, ptr noundef %144) #6
  br label %360

146:                                              ; preds = %135
  br label %213

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

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

156:                                              ; preds = %152
  br label %205

157:                                              ; preds = %152
  %158 = load ptr, ptr %5, align 8, !tbaa !9
  %159 = getelementptr inbounds ptr, ptr %158, i32 1
  store ptr %159, ptr %5, align 8, !tbaa !9
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  store ptr %160, ptr %11, align 8, !tbaa !9
  %161 = load ptr, ptr %11, align 8, !tbaa !9
  %162 = call noalias ptr @fopen(ptr noundef %161, ptr noundef @.str.13)
  store ptr %162, ptr %17, align 8, !tbaa !9
  %163 = icmp ne ptr %162, null
  br i1 %163, label %172, label %164

164:                                              ; preds = %157
  %165 = load ptr, ptr @stderr, align 8, !tbaa !9
  %166 = load ptr, ptr %7, align 8, !tbaa !9
  %167 = load ptr, ptr %11, align 8, !tbaa !9
  %168 = call ptr @__errno_location() #8
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = call ptr @strerror(i32 noundef %169) #6
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.14, ptr noundef %166, ptr noundef %167, ptr noundef %170) #6
  br label %360

172:                                              ; preds = %157
  br label %212

173:                                              ; preds = %147
  %174 = load ptr, ptr %5, align 8, !tbaa !9
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = call i32 @strcmp(ptr noundef %175, ptr noundef @.str.15) #7
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %199, label %178

178:                                              ; preds = %173
  %179 = load i32, ptr %4, align 4, !tbaa !5
  %180 = add nsw i32 %179, -1
  store i32 %180, ptr %4, align 4, !tbaa !5
  %181 = icmp slt i32 %180, 1
  br i1 %181, label %182, label %183

182:                                              ; preds = %178
  br label %205

183:                                              ; preds = %178
  %184 = load ptr, ptr %5, align 8, !tbaa !9
  %185 = getelementptr inbounds ptr, ptr %184, i32 1
  store ptr %185, ptr %5, align 8, !tbaa !9
  %186 = load ptr, ptr %185, align 8, !tbaa !9
  store ptr %186, ptr %12, align 8, !tbaa !9
  %187 = load ptr, ptr %12, align 8, !tbaa !9
  %188 = call noalias ptr @fopen(ptr noundef %187, ptr noundef @.str.16)
  store ptr %188, ptr %18, align 8, !tbaa !9
  %189 = icmp ne ptr %188, null
  br i1 %189, label %198, label %190

190:                                              ; preds = %183
  %191 = load ptr, ptr @stderr, align 8, !tbaa !9
  %192 = load ptr, ptr %7, align 8, !tbaa !9
  %193 = load ptr, ptr %12, align 8, !tbaa !9
  %194 = call ptr @__errno_location() #8
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = call ptr @strerror(i32 noundef %195) #6
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.14, ptr noundef %192, ptr noundef %193, ptr noundef %196) #6
  br label %360

198:                                              ; preds = %183
  br label %211

199:                                              ; preds = %173
  %200 = load ptr, ptr @stderr, align 8, !tbaa !9
  %201 = load ptr, ptr %7, align 8, !tbaa !9
  %202 = load ptr, ptr %5, align 8, !tbaa !9
  %203 = load ptr, ptr %202, align 8, !tbaa !9
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.17, ptr noundef %201, ptr noundef %203) #6
  br label %360

205:                                              ; preds = %182, %156, %123, %90
  %206 = load ptr, ptr @stderr, align 8, !tbaa !9
  %207 = load ptr, ptr %7, align 8, !tbaa !9
  %208 = load ptr, ptr %5, align 8, !tbaa !9
  %209 = load ptr, ptr %208, align 8, !tbaa !9
  %210 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.18, ptr noundef %207, ptr noundef %209) #6
  br label %360

211:                                              ; preds = %198
  br label %212

212:                                              ; preds = %211, %172
  br label %213

213:                                              ; preds = %212, %146
  br label %214

214:                                              ; preds = %213, %113
  br label %215

215:                                              ; preds = %214, %80
  br label %216

216:                                              ; preds = %215, %67
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %4, align 4, !tbaa !5
  %219 = add nsw i32 %218, -1
  store i32 %219, ptr %4, align 4, !tbaa !5
  %220 = load ptr, ptr %5, align 8, !tbaa !9
  %221 = getelementptr inbounds ptr, ptr %220, i32 1
  store ptr %221, ptr %5, align 8, !tbaa !9
  br label %41, !llvm.loop !11

222:                                              ; preds = %41
  %223 = load i32, ptr %8, align 4, !tbaa !5
  %224 = icmp slt i32 %223, 0
  br i1 %224, label %225, label %229

225:                                              ; preds = %222
  %226 = load ptr, ptr @stderr, align 8, !tbaa !9
  %227 = load ptr, ptr %7, align 8, !tbaa !9
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.19, ptr noundef %227) #6
  br label %360

229:                                              ; preds = %222
  %230 = load ptr, ptr %9, align 8, !tbaa !9
  %231 = icmp ne ptr %230, null
  br i1 %231, label %236, label %232

232:                                              ; preds = %229
  %233 = load ptr, ptr @stderr, align 8, !tbaa !9
  %234 = load ptr, ptr %7, align 8, !tbaa !9
  %235 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef @.str.20, ptr noundef %234) #6
  br label %360

236:                                              ; preds = %229
  %237 = load ptr, ptr %10, align 8, !tbaa !9
  %238 = icmp ne ptr %237, null
  br i1 %238, label %243, label %239

239:                                              ; preds = %236
  %240 = load ptr, ptr @stderr, align 8, !tbaa !9
  %241 = load ptr, ptr %7, align 8, !tbaa !9
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %240, ptr noundef @.str.21, ptr noundef %241) #6
  br label %360

243:                                              ; preds = %236
  %244 = load i32, ptr %8, align 4, !tbaa !5
  %245 = icmp ne i32 %244, 0
  br i1 %245, label %246, label %258

246:                                              ; preds = %243
  %247 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %248 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 0
  %249 = call i32 @sm4_cbc_encrypt_init(ptr noundef %19, ptr noundef %247, ptr noundef %248)
  %250 = icmp ne i32 %249, 1
  br i1 %250, label %251, label %257

251:                                              ; preds = %246
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr @stderr, align 8, !tbaa !9
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 152, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %255

255:                                              ; preds = %252
  br label %256

256:                                              ; preds = %255
  br label %360

257:                                              ; preds = %246
  br label %270

258:                                              ; preds = %243
  %259 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %260 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 0
  %261 = call i32 @sm4_cbc_decrypt_init(ptr noundef %19, ptr noundef %259, ptr noundef %260)
  %262 = icmp ne i32 %261, 1
  br i1 %262, label %263, label %269

263:                                              ; preds = %258
  br label %264

264:                                              ; preds = %263
  %265 = load ptr, ptr @stderr, align 8, !tbaa !9
  %266 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 157, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %267

267:                                              ; preds = %264
  br label %268

268:                                              ; preds = %267
  br label %360

269:                                              ; preds = %258
  br label %270

270:                                              ; preds = %269, %257
  br label %271

271:                                              ; preds = %319, %270
  %272 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %273 = load ptr, ptr %17, align 8, !tbaa !9
  %274 = call i64 @fread(ptr noundef %272, i64 noundef 1, i64 noundef 4096, ptr noundef %273)
  store i64 %274, ptr %21, align 8, !tbaa !13
  %275 = icmp ugt i64 %274, 0
  br i1 %275, label %276, label %320

276:                                              ; preds = %271
  %277 = load i32, ptr %8, align 4, !tbaa !5
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %279, label %292

279:                                              ; preds = %276
  %280 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %281 = load i64, ptr %21, align 8, !tbaa !13
  %282 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %283 = call i32 @sm4_cbc_encrypt_update(ptr noundef %19, ptr noundef %280, i64 noundef %281, ptr noundef %282, ptr noundef %22)
  %284 = icmp ne i32 %283, 1
  br i1 %284, label %285, label %291

285:                                              ; preds = %279
  br label %286

286:                                              ; preds = %285
  %287 = load ptr, ptr @stderr, align 8, !tbaa !9
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %287, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 166, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %289

289:                                              ; preds = %286
  br label %290

290:                                              ; preds = %289
  br label %360

291:                                              ; preds = %279
  br label %305

292:                                              ; preds = %276
  %293 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %294 = load i64, ptr %21, align 8, !tbaa !13
  %295 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %296 = call i32 @sm4_cbc_decrypt_update(ptr noundef %19, ptr noundef %293, i64 noundef %294, ptr noundef %295, ptr noundef %22)
  %297 = icmp ne i32 %296, 1
  br i1 %297, label %298, label %304

298:                                              ; preds = %292
  br label %299

299:                                              ; preds = %298
  %300 = load ptr, ptr @stderr, align 8, !tbaa !9
  %301 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %300, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 171, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %302

302:                                              ; preds = %299
  br label %303

303:                                              ; preds = %302
  br label %360

304:                                              ; preds = %292
  br label %305

305:                                              ; preds = %304, %291
  %306 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %307 = load i64, ptr %22, align 8, !tbaa !13
  %308 = load ptr, ptr %18, align 8, !tbaa !9
  %309 = call i64 @fwrite(ptr noundef %306, i64 noundef 1, i64 noundef %307, ptr noundef %308)
  %310 = load i64, ptr %22, align 8, !tbaa !13
  %311 = icmp ne i64 %309, %310
  br i1 %311, label %312, label %319

312:                                              ; preds = %305
  %313 = load ptr, ptr @stderr, align 8, !tbaa !9
  %314 = load ptr, ptr %7, align 8, !tbaa !9
  %315 = call ptr @__errno_location() #8
  %316 = load i32, ptr %315, align 4, !tbaa !5
  %317 = call ptr @strerror(i32 noundef %316) #6
  %318 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %313, ptr noundef @.str.24, ptr noundef %314, ptr noundef %317) #6
  br label %360

319:                                              ; preds = %305
  br label %271, !llvm.loop !15

320:                                              ; preds = %271
  %321 = load i32, ptr %8, align 4, !tbaa !5
  %322 = icmp ne i32 %321, 0
  br i1 %322, label %323, label %334

323:                                              ; preds = %320
  %324 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %325 = call i32 @sm4_cbc_encrypt_finish(ptr noundef %19, ptr noundef %324, ptr noundef %22)
  %326 = icmp ne i32 %325, 1
  br i1 %326, label %327, label %333

327:                                              ; preds = %323
  br label %328

328:                                              ; preds = %327
  %329 = load ptr, ptr @stderr, align 8, !tbaa !9
  %330 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %329, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 184, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %331

331:                                              ; preds = %328
  br label %332

332:                                              ; preds = %331
  br label %360

333:                                              ; preds = %323
  br label %345

334:                                              ; preds = %320
  %335 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %336 = call i32 @sm4_cbc_decrypt_finish(ptr noundef %19, ptr noundef %335, ptr noundef %22)
  %337 = icmp ne i32 %336, 1
  br i1 %337, label %338, label %344

338:                                              ; preds = %334
  br label %339

339:                                              ; preds = %338
  %340 = load ptr, ptr @stderr, align 8, !tbaa !9
  %341 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %340, ptr noundef @.str.22, ptr noundef @.str.23, i32 noundef 189, ptr noundef @__FUNCTION__.sm4_cbc_main) #6
  br label %342

342:                                              ; preds = %339
  br label %343

343:                                              ; preds = %342
  br label %360

344:                                              ; preds = %334
  br label %345

345:                                              ; preds = %344, %333
  %346 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  %347 = load i64, ptr %22, align 8, !tbaa !13
  %348 = load ptr, ptr %18, align 8, !tbaa !9
  %349 = call i64 @fwrite(ptr noundef %346, i64 noundef 1, i64 noundef %347, ptr noundef %348)
  %350 = load i64, ptr %22, align 8, !tbaa !13
  %351 = icmp ne i64 %349, %350
  br i1 %351, label %352, label %359

352:                                              ; preds = %345
  %353 = load ptr, ptr @stderr, align 8, !tbaa !9
  %354 = load ptr, ptr %7, align 8, !tbaa !9
  %355 = call ptr @__errno_location() #8
  %356 = load i32, ptr %355, align 4, !tbaa !5
  %357 = call ptr @strerror(i32 noundef %356) #6
  %358 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %353, ptr noundef @.str.24, ptr noundef %354, ptr noundef %357) #6
  br label %360

359:                                              ; preds = %345
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %360

360:                                              ; preds = %359, %352, %343, %332, %312, %303, %290, %268, %256, %239, %232, %225, %205, %199, %190, %164, %142, %131, %109, %98, %76, %63, %49
  %361 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  call void @gmssl_secure_clear(ptr noundef %361, i64 noundef 16)
  %362 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 0
  call void @gmssl_secure_clear(ptr noundef %362, i64 noundef 16)
  call void @gmssl_secure_clear(ptr noundef %19, i64 noundef 168)
  %363 = getelementptr inbounds [4096 x i8], ptr %20, i64 0, i64 0
  call void @gmssl_secure_clear(ptr noundef %363, i64 noundef 4096)
  %364 = load ptr, ptr %11, align 8, !tbaa !9
  %365 = icmp ne ptr %364, null
  br i1 %365, label %366, label %372

366:                                              ; preds = %360
  %367 = load ptr, ptr %17, align 8, !tbaa !9
  %368 = icmp ne ptr %367, null
  br i1 %368, label %369, label %372

369:                                              ; preds = %366
  %370 = load ptr, ptr %17, align 8, !tbaa !9
  %371 = call i32 @fclose(ptr noundef %370)
  br label %372

372:                                              ; preds = %369, %366, %360
  %373 = load ptr, ptr %12, align 8, !tbaa !9
  %374 = icmp ne ptr %373, null
  br i1 %374, label %375, label %381

375:                                              ; preds = %372
  %376 = load ptr, ptr %18, align 8, !tbaa !9
  %377 = icmp ne ptr %376, null
  br i1 %377, label %378, label %381

378:                                              ; preds = %375
  %379 = load ptr, ptr %18, align 8, !tbaa !9
  %380 = call i32 @fclose(ptr noundef %379)
  br label %381

381:                                              ; preds = %378, %375, %372
  %382 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %382, ptr %3, align 4
  store i32 1, ptr %23, align 4
  br label %383

383:                                              ; preds = %381, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4096, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %384 = load i32, ptr %3, align 4
  ret i32 %384
}

; 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

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

declare i32 @hex_to_bytes(ptr noundef, i64 noundef, ptr noundef, 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 @sm4_cbc_encrypt_init(ptr noundef, ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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

declare void @gmssl_secure_clear(ptr noundef, i64 noundef) #4

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 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 }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind willreturn memory(none) }

!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.SM4_CBC_CTX = type { %struct.SM4_KEY, [16 x i8], [16 x i8], i64 }
%struct.SM4_KEY = type { [32 x i32] }

@stdin = external local_unnamed_addr global ptr, align 8
@stdout = 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 [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [63 x i8], align 1
@__FUNCTION__.sm4_cbc_main = external hidden unnamed_addr constant [13 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [31 x i8], align 1

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

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

.preheader:                                       ; preds = %2, %109
  %.074230 = phi ptr [ %.1, %109 ], [ %12, %2 ]
  %.075229 = phi ptr [ %.176, %109 ], [ %11, %2 ]
  %.078228 = phi ptr [ %.179, %109 ], [ null, %2 ]
  %.081227 = phi ptr [ %.182, %109 ], [ null, %2 ]
  %.084226 = phi ptr [ %.185, %109 ], [ null, %2 ]
  %.086225 = phi ptr [ %.187, %109 ], [ null, %2 ]
  %.088224 = phi i32 [ %.189, %109 ], [ -1, %2 ]
  %.090.in223 = phi i32 [ %.191, %109 ], [ %0, %2 ]
  %.pn222 = phi ptr [ %.194, %109 ], [ %1, %2 ]
  %.093231 = getelementptr inbounds i8, ptr %.pn222, i64 8
  %.090232 = add nsw i32 %.090.in223, -1
  %18 = load ptr, ptr %.093231, align 8, !tbaa !5
  %19 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.1) #9
  %.not118 = icmp eq i32 %19, 0
  br i1 %.not118, label %20, label %25

20:                                               ; preds = %.preheader
  %21 = load ptr, ptr @usage, align 8, !tbaa !5
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %10, ptr noundef %21)
  %23 = load ptr, ptr @options, align 8, !tbaa !5
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %23)
  br label %179

25:                                               ; preds = %.preheader
  %26 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.3) #9
  %.not119 = icmp eq i32 %26, 0
  br i1 %.not119, label %27, label %32

27:                                               ; preds = %25
  %28 = icmp eq i32 %.088224, 0
  br i1 %28, label %29, label %109

29:                                               ; preds = %27
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.4, ptr noundef %10) #8
  br label %179

32:                                               ; preds = %25
  %33 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.5) #9
  %.not120 = icmp eq i32 %33, 0
  br i1 %.not120, label %34, label %39

34:                                               ; preds = %32
  %35 = icmp eq i32 %.088224, 1
  br i1 %35, label %36, label %109

36:                                               ; preds = %34
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.4, ptr noundef %10) #8
  br label %179

39:                                               ; preds = %32
  %40 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.6) #9
  %.not121 = icmp eq i32 %40, 0
  br i1 %.not121, label %41, label %56

41:                                               ; preds = %39
  %42 = add nsw i32 %.090.in223, -2
  %43 = icmp eq i32 %.090.in223, 2
  br i1 %43, label %106, label %44

44:                                               ; preds = %41
  %45 = getelementptr inbounds i8, ptr %.pn222, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %46) #9
  %.not122 = icmp eq i64 %47, 32
  br i1 %.not122, label %51, label %48

48:                                               ; preds = %44
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.7, ptr noundef %10) #8
  br label %179

51:                                               ; preds = %44
  %52 = call i32 @hex_to_bytes(ptr noundef %46, i64 noundef 32, ptr noundef nonnull %3, ptr noundef nonnull %4) #7
  %.not123 = icmp eq i32 %52, 1
  br i1 %.not123, label %109, label %53

53:                                               ; preds = %51
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.8, ptr noundef %10) #8
  br label %179

56:                                               ; preds = %39
  %57 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.9) #9
  %.not124 = icmp eq i32 %57, 0
  br i1 %.not124, label %58, label %73

58:                                               ; preds = %56
  %59 = add nsw i32 %.090.in223, -2
  %60 = icmp eq i32 %.090.in223, 2
  br i1 %60, label %106, label %61

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %.pn222, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %63) #9
  %.not125 = icmp eq i64 %64, 32
  br i1 %.not125, label %68, label %65

65:                                               ; preds = %61
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.10, ptr noundef %10) #8
  br label %179

68:                                               ; preds = %61
  %69 = call i32 @hex_to_bytes(ptr noundef %63, i64 noundef 32, ptr noundef nonnull %5, ptr noundef nonnull %6) #7
  %.not126 = icmp eq i32 %69, 1
  br i1 %.not126, label %109, label %70

70:                                               ; preds = %68
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.11, ptr noundef %10) #8
  br label %179

73:                                               ; preds = %56
  %74 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.12) #9
  %.not127 = icmp eq i32 %74, 0
  br i1 %.not127, label %75, label %88

75:                                               ; preds = %73
  %76 = icmp eq i32 %.090.in223, 2
  br i1 %76, label %106, label %77

77:                                               ; preds = %75
  %78 = add nsw i32 %.090.in223, -2
  %79 = getelementptr inbounds i8, ptr %.pn222, i64 16
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = call noalias ptr @fopen(ptr noundef %80, ptr noundef nonnull @.str.13)
  %.not128 = icmp eq ptr %81, null
  br i1 %.not128, label %82, label %109

82:                                               ; preds = %77
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = tail call ptr @__errno_location() #10
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = call ptr @strerror(i32 noundef %85) #7
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.14, ptr noundef %10, ptr noundef %80, ptr noundef %86) #8
  br label %179

88:                                               ; preds = %73
  %89 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.15) #9
  %.not129 = icmp eq i32 %89, 0
  br i1 %.not129, label %90, label %103

90:                                               ; preds = %88
  %91 = icmp eq i32 %.090.in223, 2
  br i1 %91, label %106, label %92

92:                                               ; preds = %90
  %93 = add nsw i32 %.090.in223, -2
  %94 = getelementptr inbounds i8, ptr %.pn222, i64 16
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = call noalias ptr @fopen(ptr noundef %95, ptr noundef nonnull @.str.16)
  %.not130 = icmp eq ptr %96, null
  br i1 %.not130, label %97, label %109

97:                                               ; preds = %92
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = tail call ptr @__errno_location() #10
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = call ptr @strerror(i32 noundef %100) #7
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.14, ptr noundef %10, ptr noundef %95, ptr noundef %101) #8
  br label %179

103:                                              ; preds = %88
  %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, ptr noundef %18) #8
  br label %179

106:                                              ; preds = %90, %75, %58, %41
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.18, ptr noundef %10, ptr noundef %18) #8
  br label %179

109:                                              ; preds = %34, %27, %51, %77, %92, %68
  %.194 = phi ptr [ %94, %92 ], [ %79, %77 ], [ %62, %68 ], [ %45, %51 ], [ %.093231, %27 ], [ %.093231, %34 ]
  %.191 = phi i32 [ %93, %92 ], [ %78, %77 ], [ %59, %68 ], [ %42, %51 ], [ %.090232, %27 ], [ %.090232, %34 ]
  %.189 = phi i32 [ %.088224, %92 ], [ %.088224, %77 ], [ %.088224, %68 ], [ %.088224, %51 ], [ 1, %27 ], [ 0, %34 ]
  %.187 = phi ptr [ %.086225, %92 ], [ %.086225, %77 ], [ %.086225, %68 ], [ %46, %51 ], [ %.086225, %27 ], [ %.086225, %34 ]
  %.185 = phi ptr [ %.084226, %92 ], [ %.084226, %77 ], [ %63, %68 ], [ %.084226, %51 ], [ %.084226, %27 ], [ %.084226, %34 ]
  %.182 = phi ptr [ %.081227, %92 ], [ %80, %77 ], [ %.081227, %68 ], [ %.081227, %51 ], [ %.081227, %27 ], [ %.081227, %34 ]
  %.179 = phi ptr [ %95, %92 ], [ %.078228, %77 ], [ %.078228, %68 ], [ %.078228, %51 ], [ %.078228, %27 ], [ %.078228, %34 ]
  %.176 = phi ptr [ %.075229, %92 ], [ %81, %77 ], [ %.075229, %68 ], [ %.075229, %51 ], [ %.075229, %27 ], [ %.075229, %34 ]
  %.1 = phi ptr [ %96, %92 ], [ %.074230, %77 ], [ %.074230, %68 ], [ %.074230, %51 ], [ %.074230, %27 ], [ %.074230, %34 ]
  %110 = icmp sgt i32 %.191, 1
  br i1 %110, label %.preheader, label %111, !llvm.loop !11

111:                                              ; preds = %109
  %112 = icmp slt i32 %.189, 0
  br i1 %112, label %113, label %116

113:                                              ; preds = %111
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef nonnull @.str.19, ptr noundef %10) #8
  br label %179

116:                                              ; preds = %111
  %.not = icmp eq ptr %.187, null
  br i1 %.not, label %117, label %120

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

120:                                              ; preds = %116
  %.not107 = icmp eq ptr %.185, null
  br i1 %.not107, label %121, label %124

121:                                              ; preds = %120
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.21, ptr noundef %10) #8
  br label %179

124:                                              ; preds = %120
  %.not108 = icmp eq i32 %.189, 0
  br i1 %.not108, label %130, label %125

125:                                              ; preds = %124
  %126 = call i32 @sm4_cbc_encrypt_init(ptr noundef nonnull %7, ptr noundef nonnull %3, ptr noundef nonnull %5) #7
  %.not110 = icmp eq i32 %126, 1
  br i1 %.not110, label %.split, label %127

127:                                              ; preds = %125
  %128 = load ptr, ptr @stderr, align 8, !tbaa !5
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 152, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

130:                                              ; preds = %124
  %131 = call i32 @sm4_cbc_decrypt_init(ptr noundef nonnull %7, ptr noundef nonnull %3, ptr noundef nonnull %5) #7
  %.not109 = icmp eq i32 %131, 1
  br i1 %.not109, label %.split.us, label %132

132:                                              ; preds = %130
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 157, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

.split.us:                                        ; preds = %130, %138
  %135 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 4096, ptr noundef %.176)
  %.not111.us = icmp eq i64 %135, 0
  br i1 %.not111.us, label %.split234.us, label %136

136:                                              ; preds = %.split.us
  %137 = call i32 @sm4_cbc_decrypt_update(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef %135, ptr noundef nonnull %8, ptr noundef nonnull %9) #7
  %.not115.us = icmp eq i32 %137, 1
  br i1 %.not115.us, label %138, label %.split236.us

138:                                              ; preds = %136
  %139 = load i64, ptr %9, align 8, !tbaa !13
  %140 = call i64 @fwrite(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %139, ptr noundef %.1)
  %141 = load i64, ptr %9, align 8, !tbaa !13
  %.not117.us = icmp eq i64 %140, %141
  br i1 %.not117.us, label %.split.us, label %.split238.us, !llvm.loop !15

.split:                                           ; preds = %125, %150
  %142 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 4096, ptr noundef %.176)
  %.not111 = icmp eq i64 %142, 0
  br i1 %.not111, label %.split234.us, label %143

143:                                              ; preds = %.split
  %144 = call i32 @sm4_cbc_encrypt_update(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef %142, ptr noundef nonnull %8, ptr noundef nonnull %9) #7
  %.not116 = icmp eq i32 %144, 1
  br i1 %.not116, label %150, label %145

145:                                              ; preds = %143
  %146 = load ptr, ptr @stderr, align 8, !tbaa !5
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 166, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

.split236.us:                                     ; preds = %136
  %148 = load ptr, ptr @stderr, align 8, !tbaa !5
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 171, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

150:                                              ; preds = %143
  %151 = load i64, ptr %9, align 8, !tbaa !13
  %152 = call i64 @fwrite(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %151, ptr noundef %.1)
  %153 = load i64, ptr %9, align 8, !tbaa !13
  %.not117 = icmp eq i64 %152, %153
  br i1 %.not117, label %.split, label %.split238.us, !llvm.loop !15

.split238.us:                                     ; preds = %150, %138
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = tail call ptr @__errno_location() #10
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = call ptr @strerror(i32 noundef %156) #7
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef nonnull @.str.24, ptr noundef %10, ptr noundef %157) #8
  br label %179

.split234.us:                                     ; preds = %.split, %.split.us
  br i1 %.not108, label %164, label %159

159:                                              ; preds = %.split234.us
  %160 = call i32 @sm4_cbc_encrypt_finish(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9) #7
  %.not113 = icmp eq i32 %160, 1
  br i1 %.not113, label %169, label %161

161:                                              ; preds = %159
  %162 = load ptr, ptr @stderr, align 8, !tbaa !5
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 184, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

164:                                              ; preds = %.split234.us
  %165 = call i32 @sm4_cbc_decrypt_finish(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9) #7
  %.not112 = icmp eq i32 %165, 1
  br i1 %.not112, label %169, label %166

166:                                              ; preds = %164
  %167 = load ptr, ptr @stderr, align 8, !tbaa !5
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %167, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, i32 noundef 189, ptr noundef nonnull @__FUNCTION__.sm4_cbc_main) #8
  br label %179

169:                                              ; preds = %164, %159
  %170 = load i64, ptr %9, align 8, !tbaa !13
  %171 = call i64 @fwrite(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %170, ptr noundef %.1)
  %172 = load i64, ptr %9, align 8, !tbaa !13
  %.not114 = icmp eq i64 %171, %172
  br i1 %.not114, label %179, label %173

173:                                              ; preds = %169
  %174 = load ptr, ptr @stderr, align 8, !tbaa !5
  %175 = tail call ptr @__errno_location() #10
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = call ptr @strerror(i32 noundef %176) #7
  %178 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %174, ptr noundef nonnull @.str.24, ptr noundef %10, ptr noundef %177) #8
  br label %179

179:                                              ; preds = %169, %173, %166, %161, %.split238.us, %.split236.us, %145, %132, %127, %121, %117, %113, %106, %103, %97, %82, %70, %65, %53, %48, %36, %29, %20
  %.092 = phi i32 [ 1, %103 ], [ 1, %106 ], [ 1, %97 ], [ 1, %82 ], [ 1, %65 ], [ 1, %70 ], [ 1, %48 ], [ 1, %53 ], [ 1, %36 ], [ 1, %29 ], [ 0, %20 ], [ 1, %113 ], [ 1, %127 ], [ 1, %145 ], [ 1, %.split238.us ], [ 1, %.split236.us ], [ 1, %161 ], [ 1, %173 ], [ 1, %166 ], [ 1, %132 ], [ 1, %121 ], [ 1, %117 ], [ 0, %169 ]
  %.283 = phi ptr [ %.081227, %103 ], [ %.081227, %106 ], [ %.081227, %97 ], [ %80, %82 ], [ %.081227, %65 ], [ %.081227, %70 ], [ %.081227, %48 ], [ %.081227, %53 ], [ %.081227, %36 ], [ %.081227, %29 ], [ %.081227, %20 ], [ %.182, %113 ], [ %.182, %127 ], [ %.182, %145 ], [ %.182, %.split238.us ], [ %.182, %.split236.us ], [ %.182, %161 ], [ %.182, %173 ], [ %.182, %166 ], [ %.182, %132 ], [ %.182, %121 ], [ %.182, %117 ], [ %.182, %169 ]
  %.280 = phi ptr [ %.078228, %103 ], [ %.078228, %106 ], [ %95, %97 ], [ %.078228, %82 ], [ %.078228, %65 ], [ %.078228, %70 ], [ %.078228, %48 ], [ %.078228, %53 ], [ %.078228, %36 ], [ %.078228, %29 ], [ %.078228, %20 ], [ %.179, %113 ], [ %.179, %127 ], [ %.179, %145 ], [ %.179, %.split238.us ], [ %.179, %.split236.us ], [ %.179, %161 ], [ %.179, %173 ], [ %.179, %166 ], [ %.179, %132 ], [ %.179, %121 ], [ %.179, %117 ], [ %.179, %169 ]
  %.277 = phi ptr [ %.075229, %103 ], [ %.075229, %106 ], [ %.075229, %97 ], [ null, %82 ], [ %.075229, %65 ], [ %.075229, %70 ], [ %.075229, %48 ], [ %.075229, %53 ], [ %.075229, %36 ], [ %.075229, %29 ], [ %.075229, %20 ], [ %.176, %113 ], [ %.176, %127 ], [ %.176, %145 ], [ %.176, %.split238.us ], [ %.176, %.split236.us ], [ %.176, %161 ], [ %.176, %173 ], [ %.176, %166 ], [ %.176, %132 ], [ %.176, %121 ], [ %.176, %117 ], [ %.176, %169 ]
  %.2 = phi ptr [ %.074230, %103 ], [ %.074230, %106 ], [ null, %97 ], [ %.074230, %82 ], [ %.074230, %65 ], [ %.074230, %70 ], [ %.074230, %48 ], [ %.074230, %53 ], [ %.074230, %36 ], [ %.074230, %29 ], [ %.074230, %20 ], [ %.1, %113 ], [ %.1, %127 ], [ %.1, %145 ], [ %.1, %.split238.us ], [ %.1, %.split236.us ], [ %.1, %161 ], [ %.1, %173 ], [ %.1, %166 ], [ %.1, %132 ], [ %.1, %121 ], [ %.1, %117 ], [ %.1, %169 ]
  call void @gmssl_secure_clear(ptr noundef nonnull %3, i64 noundef 16) #7
  call void @gmssl_secure_clear(ptr noundef nonnull %5, i64 noundef 16) #7
  call void @gmssl_secure_clear(ptr noundef nonnull %7, i64 noundef 168) #7
  call void @gmssl_secure_clear(ptr noundef nonnull %8, i64 noundef 4096) #7
  %180 = icmp ne ptr %.283, null
  %181 = icmp ne ptr %.277, null
  %or.cond = select i1 %180, i1 %181, i1 false
  br i1 %or.cond, label %182, label %184

182:                                              ; preds = %179
  %183 = call i32 @fclose(ptr noundef nonnull %.277)
  br label %184

184:                                              ; preds = %182, %179
  %185 = icmp ne ptr %.280, null
  %186 = icmp ne ptr %.2, null
  %or.cond3 = select i1 %185, i1 %186, i1 false
  br i1 %or.cond3, label %187, label %189

187:                                              ; preds = %184
  %188 = call i32 @fclose(ptr noundef nonnull %.2)
  br label %189

189:                                              ; preds = %184, %187, %14
  %.0 = phi i32 [ 1, %14 ], [ %.092, %187 ], [ %.092, %184 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  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: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

; 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 #5

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

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

declare i32 @sm4_cbc_decrypt_init(ptr noundef, 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 @sm4_cbc_encrypt_update(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

declare void @gmssl_secure_clear(ptr noundef, i64 noundef) local_unnamed_addr #4

; 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 "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 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind willreturn memory(none) }

!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 = distinct !{!15, !12}


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