; LLVM IR from clangen/musikcube :: src/3rdparty/win32_src/pdcurses (config_curses)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__const.main.option_text = external hidden unnamed_addr constant [7 x ptr], align 16
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@stderr = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [99 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [7 x ptr], align 16
  %14 = alloca i32, align 4
  %15 = alloca [300 x i8], align 16
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store i32 0, ptr %3, 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 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.main.option_text, i64 56, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 7, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 300, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr @.str.7, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr @.str.8, ptr %17, align 8, !tbaa !9
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %123, %2
  %22 = load i32, ptr %9, align 4, !tbaa !5
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %25, label %126

25:                                               ; preds = %21
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds ptr, ptr %26, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %30, i64 0
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 45
  br i1 %34, label %35, label %122

35:                                               ; preds = %25
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i64 1
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = sext i8 %42 to i32
  switch i32 %43, label %114 [
    i32 100, label %44
    i32 118, label %86
    i32 68, label %87
  ]

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds ptr, ptr %45, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %49, i64 2
  %51 = load i8, ptr %50, align 1, !tbaa !11
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %65, label %53

53:                                               ; preds = %44
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = sub nsw i32 %55, 1
  %57 = icmp slt i32 %54, %56
  br i1 %57, label %58, label %65

58:                                               ; preds = %53
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %59, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  br label %72

65:                                               ; preds = %53, %44
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 2
  br label %72

72:                                               ; preds = %65, %58
  %73 = phi ptr [ %64, %58 ], [ %71, %65 ]
  store ptr %73, ptr %19, align 8, !tbaa !9
  %74 = load ptr, ptr %19, align 8, !tbaa !9
  %75 = call i32 @chdir(ptr noundef %74) #7
  store i32 %75, ptr %18, align 4, !tbaa !5
  %76 = load i32, ptr %18, align 4, !tbaa !5
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %82

78:                                               ; preds = %72
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = load ptr, ptr %19, align 8, !tbaa !9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.9, ptr noundef %80) #7
  call void @perror(ptr noundef null)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %20, align 4
  br label %83

82:                                               ; preds = %72
  store i32 0, ptr %20, align 4
  br label %83

83:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %84 = load i32, ptr %20, align 4
  switch i32 %84, label %306 [
    i32 0, label %85
  ]

85:                                               ; preds = %83
  br label %121

86:                                               ; preds = %35
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %121

87:                                               ; preds = %35
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %110, %87
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = icmp slt i32 %89, 7
  br i1 %90, label %91, label %113

91:                                               ; preds = %88
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 2
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = call i32 @strcmp(ptr noundef %97, ptr noundef %101) #8
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %109, label %104

104:                                              ; preds = %91
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = shl i32 1, %105
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = or i32 %107, %106
  store i32 %108, ptr %11, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %104, %91
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %10, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %10, align 4, !tbaa !5
  br label %88, !llvm.loop !12

113:                                              ; preds = %88
  br label %121

114:                                              ; preds = %35
  %115 = load ptr, ptr %5, align 8, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !9
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %119)
  br label %121

121:                                              ; preds = %114, %113, %86, %85
  br label %122

122:                                              ; preds = %121, %25
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %9, align 4, !tbaa !5
  br label %21, !llvm.loop !14

126:                                              ; preds = %21
  %127 = load ptr, ptr %16, align 8, !tbaa !9
  %128 = call noalias ptr @fopen(ptr noundef %127, ptr noundef @.str.11)
  store ptr %128, ptr %6, align 8, !tbaa !9
  %129 = load ptr, ptr %6, align 8, !tbaa !9
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %132

131:                                              ; preds = %126
  br label %133

132:                                              ; preds = %126
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.13, i32 noundef 80, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %182, %133
  %135 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %136 = load ptr, ptr %6, align 8, !tbaa !9
  %137 = call ptr @fgets(ptr noundef %135, i32 noundef 300, ptr noundef %136)
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %183

139:                                              ; preds = %134
  %140 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %141 = call i32 @memcmp(ptr noundef %140, ptr noundef @.str.14, i64 noundef 11) #8
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %182, label %143

143:                                              ; preds = %139
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %178, %143
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = icmp slt i32 %145, 7
  br i1 %146, label %147, label %181

147:                                              ; preds = %144
  %148 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %149 = getelementptr inbounds i8, ptr %148, i64 11
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !9
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = call i64 @strlen(ptr noundef %157) #8
  %159 = call i32 @memcmp(ptr noundef %149, ptr noundef %153, i64 noundef %158) #8
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %177, label %161

161:                                              ; preds = %147
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  %166 = call i64 @strlen(ptr noundef %165) #8
  %167 = add i64 11, %166
  %168 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 %167
  %169 = load i8, ptr %168, align 1, !tbaa !11
  %170 = sext i8 %169 to i32
  %171 = icmp sle i32 %170, 32
  br i1 %171, label %172, label %177

172:                                              ; preds = %161
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = shl i32 1, %173
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = or i32 %175, %174
  store i32 %176, ptr %8, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %172, %161, %147
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %10, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %10, align 4, !tbaa !5
  br label %144, !llvm.loop !15

181:                                              ; preds = %144
  br label %182

182:                                              ; preds = %181, %139
  br label %134, !llvm.loop !16

183:                                              ; preds = %134
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %186, label %190

186:                                              ; preds = %183
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %187, i32 noundef %188)
  br label %190

190:                                              ; preds = %186, %183
  %191 = load i32, ptr %8, align 4, !tbaa !5
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = icmp eq i32 %191, %192
  br i1 %193, label %194, label %197

194:                                              ; preds = %190
  %195 = load ptr, ptr %6, align 8, !tbaa !9
  %196 = call i32 @fclose(ptr noundef %195)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %20, align 4
  br label %306

197:                                              ; preds = %190
  %198 = load ptr, ptr %6, align 8, !tbaa !9
  %199 = call i32 @fseek(ptr noundef %198, i64 noundef 0, i32 noundef 0)
  %200 = load ptr, ptr %17, align 8, !tbaa !9
  %201 = call noalias ptr @fopen(ptr noundef %200, ptr noundef @.str.16)
  store ptr %201, ptr %7, align 8, !tbaa !9
  %202 = load ptr, ptr %7, align 8, !tbaa !9
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %205

204:                                              ; preds = %197
  br label %206

205:                                              ; preds = %197
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.13, i32 noundef 97, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

206:                                              ; preds = %204
  br label %207

207:                                              ; preds = %290, %206
  %208 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %209 = load ptr, ptr %6, align 8, !tbaa !9
  %210 = call ptr @fgets(ptr noundef %208, i32 noundef 300, ptr noundef %209)
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %291

212:                                              ; preds = %207
  %213 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %214 = load ptr, ptr %7, align 8, !tbaa !9
  %215 = call i32 @fputs(ptr noundef %213, ptr noundef %214)
  %216 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %217 = call i32 @memcmp(ptr noundef %216, ptr noundef @.str.18, i64 noundef 16) #8
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %290, label %219

219:                                              ; preds = %212
  %220 = load ptr, ptr %7, align 8, !tbaa !9
  %221 = call i32 @fputs(ptr noundef @.str.19, ptr noundef %220)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %258, %219
  %223 = load i32, ptr %9, align 4, !tbaa !5
  %224 = icmp slt i32 %223, 7
  br i1 %224, label %225, label %261

225:                                              ; preds = %222
  %226 = load i32, ptr %11, align 4, !tbaa !5
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = shl i32 1, %227
  %229 = and i32 %226, %228
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %257

231:                                              ; preds = %225
  %232 = load i32, ptr %9, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %233
  %235 = load ptr, ptr %234, align 8, !tbaa !9
  %236 = call i32 @strcmp(ptr noundef %235, ptr noundef @.str.4) #8
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %241, label %238

238:                                              ; preds = %231
  %239 = load ptr, ptr %7, align 8, !tbaa !9
  %240 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %239, ptr noundef @.str.20) #7
  br label %248

241:                                              ; preds = %231
  %242 = load ptr, ptr %7, align 8, !tbaa !9
  %243 = load i32, ptr %9, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %244
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %242, ptr noundef @.str.21, ptr noundef %246) #7
  br label %248

248:                                              ; preds = %241, %238
  %249 = load ptr, ptr %7, align 8, !tbaa !9
  %250 = load i32, ptr %9, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [7 x ptr], ptr %13, i64 0, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !9
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %249, ptr noundef @.str.22, ptr noundef %253) #7
  %255 = load ptr, ptr %7, align 8, !tbaa !9
  %256 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %255, ptr noundef @.str.23) #7
  br label %257

257:                                              ; preds = %248, %225
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %9, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %9, align 4, !tbaa !5
  br label %222, !llvm.loop !17

261:                                              ; preds = %222
  %262 = load ptr, ptr %7, align 8, !tbaa !9
  %263 = call i32 @fputs(ptr noundef @.str.19, ptr noundef %262)
  br label %264

264:                                              ; preds = %275, %261
  %265 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %266 = load ptr, ptr %6, align 8, !tbaa !9
  %267 = call ptr @fgets(ptr noundef %265, i32 noundef 300, ptr noundef %266)
  %268 = icmp ne ptr %267, null
  br i1 %268, label %269, label %273

269:                                              ; preds = %264
  %270 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %271 = call i32 @memcmp(ptr noundef %270, ptr noundef @.str.24, i64 noundef 16) #8
  %272 = icmp ne i32 %271, 0
  br label %273

273:                                              ; preds = %269, %264
  %274 = phi i1 [ false, %264 ], [ %272, %269 ]
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  br label %264, !llvm.loop !18

276:                                              ; preds = %273
  %277 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %278 = load ptr, ptr %7, align 8, !tbaa !9
  %279 = call i32 @fputs(ptr noundef %277, ptr noundef %278)
  br label %280

280:                                              ; preds = %285, %276
  %281 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %282 = load ptr, ptr %6, align 8, !tbaa !9
  %283 = call ptr @fgets(ptr noundef %281, i32 noundef 300, ptr noundef %282)
  %284 = icmp ne ptr %283, null
  br i1 %284, label %285, label %289

285:                                              ; preds = %280
  %286 = getelementptr inbounds [300 x i8], ptr %15, i64 0, i64 0
  %287 = load ptr, ptr %7, align 8, !tbaa !9
  %288 = call i32 @fputs(ptr noundef %286, ptr noundef %287)
  br label %280, !llvm.loop !19

289:                                              ; preds = %280
  br label %290

290:                                              ; preds = %289, %212
  br label %207, !llvm.loop !20

291:                                              ; preds = %207
  %292 = load ptr, ptr %7, align 8, !tbaa !9
  %293 = call i32 @fclose(ptr noundef %292)
  %294 = load ptr, ptr %6, align 8, !tbaa !9
  %295 = call i32 @fclose(ptr noundef %294)
  %296 = load ptr, ptr %16, align 8, !tbaa !9
  %297 = call i32 @unlink(ptr noundef %296) #7
  %298 = load ptr, ptr %17, align 8, !tbaa !9
  %299 = load ptr, ptr %16, align 8, !tbaa !9
  %300 = call i32 @rename(ptr noundef %298, ptr noundef %299) #7
  %301 = load i32, ptr %12, align 4, !tbaa !5
  %302 = icmp ne i32 %301, 0
  br i1 %302, label %303, label %305

303:                                              ; preds = %291
  %304 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  br label %305

305:                                              ; preds = %303, %291
  store i32 0, ptr %3, align 4
  store i32 1, ptr %20, align 4
  br label %306

306:                                              ; preds = %305, %194, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 300, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %307 = load i32, ptr %3, align 4
  ret i32 %307
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind
declare i32 @chdir(ptr noundef) #3

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

declare void @perror(ptr noundef) #4

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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

declare i32 @fclose(ptr noundef) #4

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

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

; Function Attrs: nounwind
declare i32 @unlink(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @rename(ptr noundef, ptr noundef) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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(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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}


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

@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__const.main.option_text = external hidden unnamed_addr constant [7 x ptr], align 16
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [99 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [300 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 300, ptr nonnull %3) #7
  %4 = icmp sgt i32 %0, 1
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %5 = add nsw i32 %0, -1
  %6 = zext nneg i32 %5 to i64
  %wide.trip.count = zext nneg i32 %0 to i64
  %7 = load ptr, ptr @__const.main.option_text, align 16
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 8), align 8
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 16), align 16
  %10 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 24), align 8
  %11 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 32), align 16
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 40), align 8
  %13 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 48), align 16
  br label %14

14:                                               ; preds = %.lr.ph, %.thread
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %.thread ]
  %.081117 = phi i32 [ 0, %.lr.ph ], [ %.384, %.thread ]
  %.085116 = phi i32 [ 0, %.lr.ph ], [ %.186, %.thread ]
  %15 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = icmp eq i8 %17, 45
  br i1 %18, label %19, label %.thread

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %16, i64 1
  %21 = load i8, ptr %20, align 1, !tbaa !9
  switch i8 %21, label %56 [
    i8 100, label %43
    i8 118, label %.thread
    i8 68, label %.preheader111
  ]

.preheader111:                                    ; preds = %19
  %22 = getelementptr inbounds i8, ptr %16, i64 2
  %23 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %7) #8
  %.not103 = icmp eq i32 %23, 0
  %24 = zext i1 %.not103 to i32
  %25 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %8) #8
  %.not103.1 = icmp eq i32 %25, 0
  %26 = select i1 %.not103.1, i32 2, i32 0
  %27 = or disjoint i32 %26, %24
  %28 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %9) #8
  %.not103.2 = icmp eq i32 %28, 0
  %29 = select i1 %.not103.2, i32 4, i32 0
  %30 = or disjoint i32 %27, %29
  %31 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %10) #8
  %.not103.3 = icmp eq i32 %31, 0
  %32 = select i1 %.not103.3, i32 8, i32 0
  %33 = or disjoint i32 %30, %32
  %34 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %11) #8
  %.not103.4 = icmp eq i32 %34, 0
  %35 = select i1 %.not103.4, i32 16, i32 0
  %36 = or disjoint i32 %33, %35
  %37 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %12) #8
  %.not103.5 = icmp eq i32 %37, 0
  %38 = select i1 %.not103.5, i32 32, i32 0
  %39 = or disjoint i32 %36, %38
  %40 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) %13) #8
  %.not103.6 = icmp eq i32 %40, 0
  %41 = select i1 %.not103.6, i32 64, i32 0
  %42 = or i32 %39, %41
  %.283.6 = or i32 %42, %.081117
  br label %.thread

43:                                               ; preds = %19
  %44 = getelementptr inbounds i8, ptr %16, i64 2
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %.not104 = icmp eq i8 %45, 0
  %46 = icmp ult i64 %indvars.iv, %6
  %or.cond = select i1 %.not104, i1 %46, i1 false
  br i1 %or.cond, label %47, label %50

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %15, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %43, %47
  %51 = phi ptr [ %49, %47 ], [ %44, %43 ]
  %52 = tail call i32 @chdir(ptr noundef %51) #7
  %.not105 = icmp eq i32 %52, 0
  br i1 %.not105, label %.thread, label %53

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

56:                                               ; preds = %19
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef nonnull %16)
  br label %.thread

.thread:                                          ; preds = %.preheader111, %50, %19, %14, %56
  %.186 = phi i32 [ %.085116, %56 ], [ %.085116, %14 ], [ 1, %19 ], [ %.085116, %50 ], [ %.085116, %.preheader111 ]
  %.384 = phi i32 [ %.081117, %56 ], [ %.081117, %14 ], [ %.081117, %19 ], [ %.081117, %50 ], [ %.283.6, %.preheader111 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %14, !llvm.loop !10

._crit_edge.loopexit:                             ; preds = %.thread
  %58 = icmp eq i32 %.186, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %2
  %.085.lcssa = phi i1 [ true, %2 ], [ %58, %._crit_edge.loopexit ]
  %.081.lcssa = phi i32 [ 0, %2 ], [ %.384, %._crit_edge.loopexit ]
  %59 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.11)
  %.not = icmp eq ptr %59, null
  br i1 %.not, label %69, label %.preheader110

.preheader110:                                    ; preds = %._crit_edge
  %60 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not88122 = icmp eq ptr %60, null
  br i1 %.not88122, label %._crit_edge125, label %.lr.ph124

.lr.ph124:                                        ; preds = %.preheader110
  %61 = getelementptr inbounds i8, ptr %3, i64 11
  %62 = load ptr, ptr @__const.main.option_text, align 16
  %63 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 8), align 8
  %64 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 16), align 16
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 24), align 8
  %66 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 32), align 16
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 40), align 8
  %68 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 48), align 16
  br label %70

69:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13, i32 noundef 80, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

70:                                               ; preds = %.lr.ph124, %.loopexit109
  %.073123 = phi i32 [ 0, %.lr.ph124 ], [ %.376, %.loopexit109 ]
  %bcmp99 = call i32 @bcmp(ptr noundef nonnull dereferenceable(11) %3, ptr noundef nonnull dereferenceable(11) @.str.14, i64 11)
  %.not100 = icmp eq i32 %bcmp99, 0
  br i1 %.not100, label %.preheader108.preheader, label %.loopexit109

.preheader108.preheader:                          ; preds = %70
  %71 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %62) #8
  %bcmp101 = call i32 @bcmp(ptr nonnull %61, ptr %62, i64 %71)
  %.not102 = icmp eq i32 %bcmp101, 0
  br i1 %.not102, label %72, label %.preheader108.1

72:                                               ; preds = %.preheader108.preheader
  %73 = add i64 %71, 11
  %74 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = icmp slt i8 %75, 33
  %77 = zext i1 %76 to i32
  %spec.select = or i32 %.073123, %77
  br label %.preheader108.1

.preheader108.1:                                  ; preds = %72, %.preheader108.preheader
  %.275 = phi i32 [ %.073123, %.preheader108.preheader ], [ %spec.select, %72 ]
  %78 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %63) #8
  %bcmp101.1 = call i32 @bcmp(ptr nonnull %61, ptr %63, i64 %78)
  %.not102.1 = icmp eq i32 %bcmp101.1, 0
  br i1 %.not102.1, label %79, label %.preheader108.2

79:                                               ; preds = %.preheader108.1
  %80 = add i64 %78, 11
  %81 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %83 = icmp slt i8 %82, 33
  %84 = or i32 %.275, 2
  %spec.select143 = select i1 %83, i32 %84, i32 %.275
  br label %.preheader108.2

.preheader108.2:                                  ; preds = %79, %.preheader108.1
  %.275.1 = phi i32 [ %.275, %.preheader108.1 ], [ %spec.select143, %79 ]
  %85 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %64) #8
  %bcmp101.2 = call i32 @bcmp(ptr nonnull %61, ptr %64, i64 %85)
  %.not102.2 = icmp eq i32 %bcmp101.2, 0
  br i1 %.not102.2, label %86, label %.preheader108.3

86:                                               ; preds = %.preheader108.2
  %87 = add i64 %85, 11
  %88 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = icmp slt i8 %89, 33
  %91 = or i32 %.275.1, 4
  %spec.select144 = select i1 %90, i32 %91, i32 %.275.1
  br label %.preheader108.3

.preheader108.3:                                  ; preds = %86, %.preheader108.2
  %.275.2 = phi i32 [ %.275.1, %.preheader108.2 ], [ %spec.select144, %86 ]
  %92 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %65) #8
  %bcmp101.3 = call i32 @bcmp(ptr nonnull %61, ptr %65, i64 %92)
  %.not102.3 = icmp eq i32 %bcmp101.3, 0
  br i1 %.not102.3, label %93, label %.preheader108.4

93:                                               ; preds = %.preheader108.3
  %94 = add i64 %92, 11
  %95 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !9
  %97 = icmp slt i8 %96, 33
  %98 = or i32 %.275.2, 8
  %spec.select145 = select i1 %97, i32 %98, i32 %.275.2
  br label %.preheader108.4

.preheader108.4:                                  ; preds = %93, %.preheader108.3
  %.275.3 = phi i32 [ %.275.2, %.preheader108.3 ], [ %spec.select145, %93 ]
  %99 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %66) #8
  %bcmp101.4 = call i32 @bcmp(ptr nonnull %61, ptr %66, i64 %99)
  %.not102.4 = icmp eq i32 %bcmp101.4, 0
  br i1 %.not102.4, label %100, label %.preheader108.5

100:                                              ; preds = %.preheader108.4
  %101 = add i64 %99, 11
  %102 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %101
  %103 = load i8, ptr %102, align 1, !tbaa !9
  %104 = icmp slt i8 %103, 33
  %105 = or i32 %.275.3, 16
  %spec.select146 = select i1 %104, i32 %105, i32 %.275.3
  br label %.preheader108.5

.preheader108.5:                                  ; preds = %100, %.preheader108.4
  %.275.4 = phi i32 [ %.275.3, %.preheader108.4 ], [ %spec.select146, %100 ]
  %106 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %67) #8
  %bcmp101.5 = call i32 @bcmp(ptr nonnull %61, ptr %67, i64 %106)
  %.not102.5 = icmp eq i32 %bcmp101.5, 0
  br i1 %.not102.5, label %107, label %.preheader108.6

107:                                              ; preds = %.preheader108.5
  %108 = add i64 %106, 11
  %109 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !9
  %111 = icmp slt i8 %110, 33
  %112 = or i32 %.275.4, 32
  %spec.select147 = select i1 %111, i32 %112, i32 %.275.4
  br label %.preheader108.6

.preheader108.6:                                  ; preds = %107, %.preheader108.5
  %.275.5 = phi i32 [ %.275.4, %.preheader108.5 ], [ %spec.select147, %107 ]
  %113 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %68) #8
  %bcmp101.6 = call i32 @bcmp(ptr nonnull %61, ptr %68, i64 %113)
  %.not102.6 = icmp eq i32 %bcmp101.6, 0
  br i1 %.not102.6, label %114, label %.loopexit109

114:                                              ; preds = %.preheader108.6
  %115 = add i64 %113, 11
  %116 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !9
  %118 = icmp slt i8 %117, 33
  %119 = or i32 %.275.5, 64
  %spec.select148 = select i1 %118, i32 %119, i32 %.275.5
  br label %.loopexit109

.loopexit109:                                     ; preds = %114, %.preheader108.6, %70
  %.376 = phi i32 [ %.073123, %70 ], [ %.275.5, %.preheader108.6 ], [ %spec.select148, %114 ]
  %120 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not88 = icmp eq ptr %120, null
  br i1 %.not88, label %._crit_edge125, label %70, !llvm.loop !12

._crit_edge125:                                   ; preds = %.loopexit109, %.preheader110
  %.073.lcssa = phi i32 [ 0, %.preheader110 ], [ %.376, %.loopexit109 ]
  br i1 %.085.lcssa, label %123, label %121

121:                                              ; preds = %._crit_edge125
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %.073.lcssa, i32 noundef %.081.lcssa)
  br label %123

123:                                              ; preds = %121, %._crit_edge125
  %124 = icmp eq i32 %.073.lcssa, %.081.lcssa
  br i1 %124, label %125, label %127

125:                                              ; preds = %123
  %126 = call i32 @fclose(ptr noundef nonnull %59)
  br label %234

127:                                              ; preds = %123
  %128 = call i32 @fseek(ptr noundef nonnull %59, i64 noundef 0, i32 noundef 0)
  %129 = call noalias ptr @fopen(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.16)
  %.not90 = icmp eq ptr %129, null
  br i1 %.not90, label %145, label %.preheader

.preheader:                                       ; preds = %127
  %130 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not91130 = icmp eq ptr %130, null
  br i1 %.not91130, label %._crit_edge132, label %.lr.ph131.preheader

.lr.ph131.preheader:                              ; preds = %.preheader
  %131 = and i32 %.081.lcssa, 1
  %.not97 = icmp eq i32 %131, 0
  %132 = load ptr, ptr @__const.main.option_text, align 16
  %133 = and i32 %.081.lcssa, 2
  %.not97.1 = icmp eq i32 %133, 0
  %134 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 8), align 8
  %135 = and i32 %.081.lcssa, 4
  %.not97.2 = icmp eq i32 %135, 0
  %136 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 16), align 16
  %137 = and i32 %.081.lcssa, 8
  %.not97.3 = icmp eq i32 %137, 0
  %138 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 24), align 8
  %139 = and i32 %.081.lcssa, 16
  %.not97.4 = icmp eq i32 %139, 0
  %140 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 32), align 16
  %141 = and i32 %.081.lcssa, 32
  %.not97.5 = icmp eq i32 %141, 0
  %142 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 40), align 8
  %143 = and i32 %.081.lcssa, 64
  %.not97.6 = icmp eq i32 %143, 0
  %144 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.option_text, i64 48), align 16
  br label %.lr.ph131

145:                                              ; preds = %127
  call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.13, i32 noundef 97, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

.lr.ph131:                                        ; preds = %.lr.ph131.preheader, %.loopexit
  %146 = call i32 @fputs(ptr noundef nonnull %3, ptr noundef nonnull %129)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) @.str.18, i64 16)
  %.not92 = icmp eq i32 %bcmp, 0
  br i1 %.not92, label %147, label %.loopexit

147:                                              ; preds = %.lr.ph131
  %148 = call i32 @fputs(ptr noundef nonnull @.str.19, ptr noundef nonnull %129)
  br i1 %.not97, label %158, label %149

149:                                              ; preds = %147
  %150 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %132, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98 = icmp eq i32 %150, 0
  br i1 %.not98, label %151, label %153

151:                                              ; preds = %149
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %155

153:                                              ; preds = %149
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %132) #7
  br label %155

155:                                              ; preds = %153, %151
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %132) #7
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %158

158:                                              ; preds = %147, %155
  br i1 %.not97.1, label %168, label %159

159:                                              ; preds = %158
  %160 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %134, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.1 = icmp eq i32 %160, 0
  br i1 %.not98.1, label %163, label %161

161:                                              ; preds = %159
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %134) #7
  br label %165

163:                                              ; preds = %159
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %165

165:                                              ; preds = %163, %161
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %134) #7
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %168

168:                                              ; preds = %165, %158
  br i1 %.not97.2, label %178, label %169

169:                                              ; preds = %168
  %170 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %136, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.2 = icmp eq i32 %170, 0
  br i1 %.not98.2, label %173, label %171

171:                                              ; preds = %169
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %136) #7
  br label %175

173:                                              ; preds = %169
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %175

175:                                              ; preds = %173, %171
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %136) #7
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %178

178:                                              ; preds = %175, %168
  br i1 %.not97.3, label %188, label %179

179:                                              ; preds = %178
  %180 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %138, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.3 = icmp eq i32 %180, 0
  br i1 %.not98.3, label %183, label %181

181:                                              ; preds = %179
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %138) #7
  br label %185

183:                                              ; preds = %179
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %185

185:                                              ; preds = %183, %181
  %186 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %138) #7
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %188

188:                                              ; preds = %185, %178
  br i1 %.not97.4, label %198, label %189

189:                                              ; preds = %188
  %190 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %140, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.4 = icmp eq i32 %190, 0
  br i1 %.not98.4, label %193, label %191

191:                                              ; preds = %189
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %140) #7
  br label %195

193:                                              ; preds = %189
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %195

195:                                              ; preds = %193, %191
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %140) #7
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %198

198:                                              ; preds = %195, %188
  br i1 %.not97.5, label %208, label %199

199:                                              ; preds = %198
  %200 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %142, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.5 = icmp eq i32 %200, 0
  br i1 %.not98.5, label %203, label %201

201:                                              ; preds = %199
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %142) #7
  br label %205

203:                                              ; preds = %199
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %205

205:                                              ; preds = %203, %201
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %142) #7
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %208

208:                                              ; preds = %205, %198
  br i1 %.not97.6, label %218, label %209

209:                                              ; preds = %208
  %210 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %144, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %.not98.6 = icmp eq i32 %210, 0
  br i1 %.not98.6, label %213, label %211

211:                                              ; preds = %209
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.21, ptr noundef %144) #7
  br label %215

213:                                              ; preds = %209
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.20) #7
  br label %215

215:                                              ; preds = %213, %211
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.22, ptr noundef %144) #7
  %217 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %129, ptr noundef nonnull @.str.23) #7
  br label %218

218:                                              ; preds = %215, %208
  %219 = call i32 @fputs(ptr noundef nonnull @.str.19, ptr noundef nonnull %129)
  br label %220

220:                                              ; preds = %222, %218
  %221 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not93 = icmp eq ptr %221, null
  br i1 %.not93, label %.critedge, label %222

222:                                              ; preds = %220
  %bcmp94 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) @.str.24, i64 16)
  %.not95 = icmp eq i32 %bcmp94, 0
  br i1 %.not95, label %.critedge, label %220, !llvm.loop !13

.critedge:                                        ; preds = %220, %222
  %223 = call i32 @fputs(ptr noundef nonnull %3, ptr noundef nonnull %129)
  %224 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not96128 = icmp eq ptr %224, null
  br i1 %.not96128, label %.loopexit, label %.lr.ph129

.lr.ph129:                                        ; preds = %.critedge, %.lr.ph129
  %225 = call i32 @fputs(ptr noundef nonnull %3, ptr noundef nonnull %129)
  %226 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not96 = icmp eq ptr %226, null
  br i1 %.not96, label %.loopexit, label %.lr.ph129, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph129, %.critedge, %.lr.ph131
  %227 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 300, ptr noundef nonnull %59)
  %.not91 = icmp eq ptr %227, null
  br i1 %.not91, label %._crit_edge132, label %.lr.ph131, !llvm.loop !15

._crit_edge132:                                   ; preds = %.loopexit, %.preheader
  %228 = call i32 @fclose(ptr noundef nonnull %129)
  %229 = call i32 @fclose(ptr noundef nonnull %59)
  %230 = call i32 @unlink(ptr noundef nonnull @.str.7) #7
  %231 = call i32 @rename(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7) #7
  br i1 %.085.lcssa, label %234, label %232

232:                                              ; preds = %._crit_edge132
  %233 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  br label %234

234:                                              ; preds = %53, %._crit_edge132, %232, %125
  %.3 = phi i32 [ -1, %53 ], [ 0, %125 ], [ 0, %232 ], [ 0, %._crit_edge132 ]
  call void @llvm.lifetime.end.p0(i64 300, ptr nonnull %3) #7
  ret i32 %.3
}

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

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

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #3

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @unlink(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @rename(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

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 = { 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 = { 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 #4 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind willreturn memory(argmem: read) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { cold nounwind }
attributes #10 = { cold }
attributes #11 = { noreturn nounwind }

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

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


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