; LLVM IR from softmin/ReHLine-SVM :: liblinear (train2)

; 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.problem = type { i32, i32, ptr, ptr, double }
%struct.feature_node = type { i32, double }

@stderr = external global ptr, align 8
@prob = external dso_local global %struct.problem, align 8
@x_space = external dso_local global ptr, align 8
@line = external hidden global ptr, align 8
@bias = external dso_local global double, align 8
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@max_line_len = external hidden global i32, align 4
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @exit_input_error(i32 noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @read_problem(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  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 8, ptr %8) #7
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call noalias ptr @fopen(ptr noundef %14, ptr noundef @.str.18)
  store ptr %15, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %22

18:                                               ; preds = %1
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.19, ptr noundef %20) #7
  call void @exit(i32 noundef 1) #8
  unreachable

22:                                               ; preds = %1
  store i32 0, ptr @prob, align 8, !tbaa !9
  store i64 0, ptr %6, align 8, !tbaa !13
  store i32 1024, ptr @max_line_len, align 4, !tbaa !15
  %23 = load i32, ptr @max_line_len, align 4, !tbaa !15
  %24 = sext i32 %23 to i64
  %25 = mul i64 %24, 1
  %26 = call noalias ptr @malloc(i64 noundef %25) #9
  store ptr %26, ptr @line, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %48, %22
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call ptr @readline(ptr noundef %28)
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %53

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %32 = load ptr, ptr @line, align 8, !tbaa !5
  %33 = call ptr @strtok(ptr noundef %32, ptr noundef @.str.20) #7
  store ptr %33, ptr %13, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %45, %31
  br label %35

35:                                               ; preds = %34
  %36 = call ptr @strtok(ptr noundef null, ptr noundef @.str.20) #7
  store ptr %36, ptr %13, align 8, !tbaa !5
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %44, label %39

39:                                               ; preds = %35
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !16
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 10
  br i1 %43, label %44, label %45

44:                                               ; preds = %39, %35
  br label %48

45:                                               ; preds = %39
  %46 = load i64, ptr %6, align 8, !tbaa !13
  %47 = add i64 %46, 1
  store i64 %47, ptr %6, align 8, !tbaa !13
  br label %34

48:                                               ; preds = %44
  %49 = load i64, ptr %6, align 8, !tbaa !13
  %50 = add i64 %49, 1
  store i64 %50, ptr %6, align 8, !tbaa !13
  %51 = load i32, ptr @prob, align 8, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr @prob, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %27, !llvm.loop !17

53:                                               ; preds = %27
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  call void @rewind(ptr noundef %54)
  %55 = load double, ptr @bias, align 8, !tbaa !19
  store double %55, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 4), align 8, !tbaa !20
  %56 = load i32, ptr @prob, align 8, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = mul i64 %57, 8
  %59 = call noalias ptr @malloc(i64 noundef %58) #9
  store ptr %59, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 2), align 8, !tbaa !21
  %60 = load i32, ptr @prob, align 8, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = mul i64 %61, 8
  %63 = call noalias ptr @malloc(i64 noundef %62) #9
  store ptr %63, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 3), align 8, !tbaa !22
  %64 = load i64, ptr %6, align 8, !tbaa !13
  %65 = load i32, ptr @prob, align 8, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = add i64 %64, %66
  %68 = mul i64 %67, 16
  %69 = call noalias ptr @malloc(i64 noundef %68) #9
  store ptr %69, ptr @x_space, align 8, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !15
  store i64 0, ptr %7, align 8, !tbaa !13
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %70

70:                                               ; preds = %218, %53
  %71 = load i32, ptr %5, align 4, !tbaa !15
  %72 = load i32, ptr @prob, align 8, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %221

74:                                               ; preds = %70
  store i32 0, ptr %4, align 4, !tbaa !15
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = call ptr @readline(ptr noundef %75)
  %77 = load ptr, ptr @x_space, align 8, !tbaa !5
  %78 = load i64, ptr %7, align 8, !tbaa !13
  %79 = getelementptr inbounds %struct.feature_node, ptr %77, i64 %78
  %80 = load ptr, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 3), align 8, !tbaa !22
  %81 = load i32, ptr %5, align 4, !tbaa !15
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  store ptr %79, ptr %83, align 8, !tbaa !5
  %84 = load ptr, ptr @line, align 8, !tbaa !5
  %85 = call ptr @strtok(ptr noundef %84, ptr noundef @.str.21) #7
  store ptr %85, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %91

88:                                               ; preds = %74
  %89 = load i32, ptr %5, align 4, !tbaa !15
  %90 = add nsw i32 %89, 1
  call void @exit_input_error(i32 noundef %90)
  br label %91

91:                                               ; preds = %88, %74
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = call double @strtod(ptr noundef %92, ptr noundef %9) #7
  %94 = fcmp olt double %93, 5.000000e-01
  %95 = zext i1 %94 to i64
  %96 = select i1 %94, double -1.000000e+00, double 1.000000e+00
  %97 = load ptr, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 2), align 8, !tbaa !21
  %98 = load i32, ptr %5, align 4, !tbaa !15
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds double, ptr %97, i64 %99
  store double %96, ptr %100, align 8, !tbaa !19
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = icmp eq ptr %101, %102
  br i1 %103, label %109, label %104

104:                                              ; preds = %91
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i8, ptr %105, align 1, !tbaa !16
  %107 = sext i8 %106 to i32
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %112

109:                                              ; preds = %104, %91
  %110 = load i32, ptr %5, align 4, !tbaa !15
  %111 = add nsw i32 %110, 1
  call void @exit_input_error(i32 noundef %111)
  br label %112

112:                                              ; preds = %109, %104
  br label %113

113:                                              ; preds = %193, %112
  br label %114

114:                                              ; preds = %113
  %115 = call ptr @strtok(ptr noundef null, ptr noundef @.str.22) #7
  store ptr %115, ptr %10, align 8, !tbaa !5
  %116 = call ptr @strtok(ptr noundef null, ptr noundef @.str.20) #7
  store ptr %116, ptr %11, align 8, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %120

119:                                              ; preds = %114
  br label %196

120:                                              ; preds = %114
  %121 = call ptr @__errno_location() #10
  store i32 0, ptr %121, align 4, !tbaa !15
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = call i64 @strtol(ptr noundef %122, ptr noundef %9, i32 noundef 10) #7
  %124 = trunc i64 %123 to i32
  %125 = load ptr, ptr @x_space, align 8, !tbaa !5
  %126 = load i64, ptr %7, align 8, !tbaa !13
  %127 = getelementptr inbounds %struct.feature_node, ptr %125, i64 %126
  %128 = getelementptr inbounds %struct.feature_node, ptr %127, i32 0, i32 0
  store i32 %124, ptr %128, align 8, !tbaa !23
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = icmp eq ptr %129, %130
  br i1 %131, label %149, label %132

132:                                              ; preds = %120
  %133 = call ptr @__errno_location() #10
  %134 = load i32, ptr %133, align 4, !tbaa !15
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %149, label %136

136:                                              ; preds = %132
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = load i8, ptr %137, align 1, !tbaa !16
  %139 = sext i8 %138 to i32
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %149, label %141

141:                                              ; preds = %136
  %142 = load ptr, ptr @x_space, align 8, !tbaa !5
  %143 = load i64, ptr %7, align 8, !tbaa !13
  %144 = getelementptr inbounds %struct.feature_node, ptr %142, i64 %143
  %145 = getelementptr inbounds %struct.feature_node, ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 8, !tbaa !23
  %147 = load i32, ptr %4, align 4, !tbaa !15
  %148 = icmp sle i32 %146, %147
  br i1 %148, label %149, label %152

149:                                              ; preds = %141, %136, %132, %120
  %150 = load i32, ptr %5, align 4, !tbaa !15
  %151 = add nsw i32 %150, 1
  call void @exit_input_error(i32 noundef %151)
  br label %158

152:                                              ; preds = %141
  %153 = load ptr, ptr @x_space, align 8, !tbaa !5
  %154 = load i64, ptr %7, align 8, !tbaa !13
  %155 = getelementptr inbounds %struct.feature_node, ptr %153, i64 %154
  %156 = getelementptr inbounds %struct.feature_node, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 8, !tbaa !23
  store i32 %157, ptr %4, align 4, !tbaa !15
  br label %158

158:                                              ; preds = %152, %149
  %159 = call ptr @__errno_location() #10
  store i32 0, ptr %159, align 4, !tbaa !15
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = call double @strtod(ptr noundef %160, ptr noundef %9) #7
  %162 = load ptr, ptr @x_space, align 8, !tbaa !5
  %163 = load i64, ptr %7, align 8, !tbaa !13
  %164 = getelementptr inbounds %struct.feature_node, ptr %162, i64 %163
  %165 = getelementptr inbounds %struct.feature_node, ptr %164, i32 0, i32 1
  store double %161, ptr %165, align 8, !tbaa !25
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = icmp eq ptr %166, %167
  br i1 %168, label %190, label %169

169:                                              ; preds = %158
  %170 = call ptr @__errno_location() #10
  %171 = load i32, ptr %170, align 4, !tbaa !15
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %190, label %173

173:                                              ; preds = %169
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = load i8, ptr %174, align 1, !tbaa !16
  %176 = sext i8 %175 to i32
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %193

178:                                              ; preds = %173
  %179 = call ptr @__ctype_b_loc() #10
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = load i8, ptr %181, align 1, !tbaa !16
  %183 = sext i8 %182 to i32
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i16, ptr %180, i64 %184
  %186 = load i16, ptr %185, align 2, !tbaa !26
  %187 = zext i16 %186 to i32
  %188 = and i32 %187, 8192
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %193, label %190

190:                                              ; preds = %178, %169, %158
  %191 = load i32, ptr %5, align 4, !tbaa !15
  %192 = add nsw i32 %191, 1
  call void @exit_input_error(i32 noundef %192)
  br label %193

193:                                              ; preds = %190, %178, %173
  %194 = load i64, ptr %7, align 8, !tbaa !13
  %195 = add i64 %194, 1
  store i64 %195, ptr %7, align 8, !tbaa !13
  br label %113

196:                                              ; preds = %119
  %197 = load i32, ptr %4, align 4, !tbaa !15
  %198 = load i32, ptr %3, align 4, !tbaa !15
  %199 = icmp sgt i32 %197, %198
  br i1 %199, label %200, label %202

200:                                              ; preds = %196
  %201 = load i32, ptr %4, align 4, !tbaa !15
  store i32 %201, ptr %3, align 4, !tbaa !15
  br label %202

202:                                              ; preds = %200, %196
  %203 = load double, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 4), align 8, !tbaa !20
  %204 = fcmp oge double %203, 0.000000e+00
  br i1 %204, label %205, label %212

205:                                              ; preds = %202
  %206 = load double, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 4), align 8, !tbaa !20
  %207 = load ptr, ptr @x_space, align 8, !tbaa !5
  %208 = load i64, ptr %7, align 8, !tbaa !13
  %209 = add i64 %208, 1
  store i64 %209, ptr %7, align 8, !tbaa !13
  %210 = getelementptr inbounds %struct.feature_node, ptr %207, i64 %208
  %211 = getelementptr inbounds %struct.feature_node, ptr %210, i32 0, i32 1
  store double %206, ptr %211, align 8, !tbaa !25
  br label %212

212:                                              ; preds = %205, %202
  %213 = load ptr, ptr @x_space, align 8, !tbaa !5
  %214 = load i64, ptr %7, align 8, !tbaa !13
  %215 = add i64 %214, 1
  store i64 %215, ptr %7, align 8, !tbaa !13
  %216 = getelementptr inbounds %struct.feature_node, ptr %213, i64 %214
  %217 = getelementptr inbounds %struct.feature_node, ptr %216, i32 0, i32 0
  store i32 -1, ptr %217, align 8, !tbaa !23
  br label %218

218:                                              ; preds = %212
  %219 = load i32, ptr %5, align 4, !tbaa !15
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %5, align 4, !tbaa !15
  br label %70, !llvm.loop !28

221:                                              ; preds = %70
  %222 = load double, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 4), align 8, !tbaa !20
  %223 = fcmp oge double %222, 0.000000e+00
  br i1 %223, label %224, label %250

224:                                              ; preds = %221
  %225 = load i32, ptr %3, align 4, !tbaa !15
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 1), align 4, !tbaa !29
  store i32 1, ptr %5, align 4, !tbaa !15
  br label %227

227:                                              ; preds = %240, %224
  %228 = load i32, ptr %5, align 4, !tbaa !15
  %229 = load i32, ptr @prob, align 8, !tbaa !9
  %230 = icmp slt i32 %228, %229
  br i1 %230, label %231, label %243

231:                                              ; preds = %227
  %232 = load i32, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 1), align 4, !tbaa !29
  %233 = load ptr, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 3), align 8, !tbaa !22
  %234 = load i32, ptr %5, align 4, !tbaa !15
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds ptr, ptr %233, i64 %235
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.feature_node, ptr %237, i64 -2
  %239 = getelementptr inbounds %struct.feature_node, ptr %238, i32 0, i32 0
  store i32 %232, ptr %239, align 8, !tbaa !23
  br label %240

240:                                              ; preds = %231
  %241 = load i32, ptr %5, align 4, !tbaa !15
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %5, align 4, !tbaa !15
  br label %227, !llvm.loop !30

243:                                              ; preds = %227
  %244 = load i32, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 1), align 4, !tbaa !29
  %245 = load ptr, ptr @x_space, align 8, !tbaa !5
  %246 = load i64, ptr %7, align 8, !tbaa !13
  %247 = sub i64 %246, 2
  %248 = getelementptr inbounds %struct.feature_node, ptr %245, i64 %247
  %249 = getelementptr inbounds %struct.feature_node, ptr %248, i32 0, i32 0
  store i32 %244, ptr %249, align 8, !tbaa !23
  br label %252

250:                                              ; preds = %221
  %251 = load i32, ptr %3, align 4, !tbaa !15
  store i32 %251, ptr getelementptr inbounds (%struct.problem, ptr @prob, i32 0, i32 1), align 4, !tbaa !29
  br label %252

252:                                              ; preds = %250, %243
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = call i32 @fclose(ptr noundef %253)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void
}

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

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @readline(ptr noundef) #1

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #2

declare void @rewind(ptr noundef) #5

; Function Attrs: nounwind
declare double @strtod(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #6

declare i32 @fclose(ptr noundef) #5

attributes #0 = { 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 #1 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 = { noreturn nounwind }
attributes #9 = { nounwind allocsize(0) }
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, !11, i64 0}
!10 = !{!"problem", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !12, i64 0}
!20 = !{!10, !12, i64 24}
!21 = !{!10, !6, i64 8}
!22 = !{!10, !6, i64 16}
!23 = !{!24, !11, i64 0}
!24 = !{!"feature_node", !11, i64 0, !12, i64 8}
!25 = !{!24, !12, i64 8}
!26 = !{!27, !27, i64 0}
!27 = !{!"short", !7, i64 0}
!28 = distinct !{!28, !18}
!29 = !{!10, !11, i64 4}
!30 = distinct !{!30, !18}


; 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.problem = type { i32, i32, ptr, ptr, double }
%struct.feature_node = type { i32, double }

@stderr = external local_unnamed_addr global ptr, align 8
@prob = external dso_local local_unnamed_addr global %struct.problem, align 8
@x_space = external dso_local local_unnamed_addr global ptr, align 8
@line = external hidden local_unnamed_addr global ptr, align 8
@bias = external dso_local local_unnamed_addr global double, align 8
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@max_line_len = external hidden local_unnamed_addr global i32, align 4
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @exit_input_error(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @read_problem(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  %3 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.18)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %8

5:                                                ; preds = %1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.19, ptr noundef %0) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

8:                                                ; preds = %1
  store i32 0, ptr @prob, align 8, !tbaa !9
  store i32 1024, ptr @max_line_len, align 4, !tbaa !13
  %9 = tail call noalias dereferenceable_or_null(1024) ptr @malloc(i64 noundef 1024) #11
  store ptr %9, ptr @line, align 8, !tbaa !5
  %10 = tail call ptr @readline(ptr noundef nonnull %3)
  %.not72 = icmp eq ptr %10, null
  br i1 %.not72, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %8, %._crit_edge
  %.04973 = phi i64 [ %22, %._crit_edge ], [ 0, %8 ]
  %11 = load ptr, ptr @line, align 8, !tbaa !5
  %12 = tail call ptr @strtok(ptr noundef %11, ptr noundef nonnull @.str.20) #8
  %13 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.20) #8
  %14 = icmp eq ptr %13, null
  br i1 %14, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph75, %18
  %15 = phi ptr [ %20, %18 ], [ %13, %.lr.ph75 ]
  %.15069 = phi i64 [ %19, %18 ], [ %.04973, %.lr.ph75 ]
  %16 = load i8, ptr %15, align 1, !tbaa !14
  %17 = icmp eq i8 %16, 10
  br i1 %17, label %._crit_edge, label %18

18:                                               ; preds = %.lr.ph
  %19 = add i64 %.15069, 1
  %20 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.20) #8
  %21 = icmp eq ptr %20, null
  br i1 %21, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %18, %.lr.ph75
  %.150.lcssa = phi i64 [ %.04973, %.lr.ph75 ], [ %19, %18 ], [ %.15069, %.lr.ph ]
  %22 = add i64 %.150.lcssa, 1
  %23 = load i32, ptr @prob, align 8, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr @prob, align 8, !tbaa !9
  %25 = tail call ptr @readline(ptr noundef nonnull %3)
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %._crit_edge76, label %.lr.ph75, !llvm.loop !15

._crit_edge76:                                    ; preds = %._crit_edge, %8
  %.049.lcssa = phi i64 [ 0, %8 ], [ %22, %._crit_edge ]
  tail call void @rewind(ptr noundef nonnull %3)
  %26 = load double, ptr @bias, align 8, !tbaa !17
  store double %26, ptr getelementptr inbounds (i8, ptr @prob, i64 24), align 8, !tbaa !18
  %27 = load i32, ptr @prob, align 8, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = shl nsw i64 %28, 3
  %30 = tail call noalias ptr @malloc(i64 noundef %29) #11
  store ptr %30, ptr getelementptr inbounds (i8, ptr @prob, i64 8), align 8, !tbaa !19
  %31 = tail call noalias ptr @malloc(i64 noundef %29) #11
  store ptr %31, ptr getelementptr inbounds (i8, ptr @prob, i64 16), align 8, !tbaa !20
  %32 = add i64 %.049.lcssa, %28
  %33 = shl i64 %32, 4
  %34 = tail call noalias ptr @malloc(i64 noundef %33) #11
  store ptr %34, ptr @x_space, align 8, !tbaa !5
  %35 = icmp sgt i32 %27, 0
  br i1 %35, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %._crit_edge76, %110
  %indvars.iv = phi i64 [ %indvars.iv.next, %110 ], [ 0, %._crit_edge76 ]
  %.087 = phi i32 [ %spec.select, %110 ], [ 0, %._crit_edge76 ]
  %.05185 = phi i64 [ %111, %110 ], [ 0, %._crit_edge76 ]
  %36 = tail call ptr @readline(ptr noundef nonnull %3)
  %37 = load ptr, ptr @x_space, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.feature_node, ptr %37, i64 %.05185
  %39 = load ptr, ptr getelementptr inbounds (i8, ptr @prob, i64 16), align 8, !tbaa !20
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv
  store ptr %38, ptr %40, align 8, !tbaa !5
  %41 = load ptr, ptr @line, align 8, !tbaa !5
  %42 = tail call ptr @strtok(ptr noundef %41, ptr noundef nonnull @.str.21) #8
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %47

44:                                               ; preds = %.lr.ph89
  %45 = trunc i64 %indvars.iv to i32
  %46 = add i32 %45, 1
  tail call void @exit_input_error(i32 noundef %46)
  br label %47

47:                                               ; preds = %44, %.lr.ph89
  %48 = call double @strtod(ptr noundef %42, ptr noundef nonnull %2) #8
  %49 = fcmp olt double %48, 5.000000e-01
  %50 = select i1 %49, double -1.000000e+00, double 1.000000e+00
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @prob, i64 8), align 8, !tbaa !19
  %52 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  store double %50, ptr %52, align 8, !tbaa !17
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = icmp eq ptr %53, %42
  br i1 %54, label %57, label %55

55:                                               ; preds = %47
  %56 = load i8, ptr %53, align 1, !tbaa !14
  %.not62 = icmp eq i8 %56, 0
  br i1 %.not62, label %60, label %57

57:                                               ; preds = %55, %47
  %58 = trunc i64 %indvars.iv to i32
  %59 = add i32 %58, 1
  tail call void @exit_input_error(i32 noundef %59)
  br label %60

60:                                               ; preds = %57, %55
  %61 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.22) #8
  %62 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.20) #8
  %63 = icmp eq ptr %62, null
  br i1 %63, label %._crit_edge82, label %.lr.ph81

.lr.ph81:                                         ; preds = %60
  %64 = tail call ptr @__errno_location() #12
  %65 = add nuw nsw i64 %indvars.iv, 1
  %66 = trunc nuw nsw i64 %65 to i32
  %67 = trunc nuw nsw i64 %65 to i32
  br label %68

68:                                               ; preds = %.lr.ph81, %100
  %69 = phi ptr [ %62, %.lr.ph81 ], [ %103, %100 ]
  %70 = phi ptr [ %61, %.lr.ph81 ], [ %102, %100 ]
  %.04579 = phi i32 [ 0, %.lr.ph81 ], [ %.146, %100 ]
  %.15278 = phi i64 [ %.05185, %.lr.ph81 ], [ %101, %100 ]
  store i32 0, ptr %64, align 4, !tbaa !13
  %71 = call i64 @strtol(ptr noundef %70, ptr noundef nonnull %2, i32 noundef 10) #8
  %72 = trunc i64 %71 to i32
  %73 = load ptr, ptr @x_space, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.feature_node, ptr %73, i64 %.15278
  store i32 %72, ptr %74, align 8, !tbaa !21
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = icmp eq ptr %75, %70
  br i1 %76, label %81, label %77

77:                                               ; preds = %68
  %78 = load i32, ptr %64, align 4, !tbaa !13
  %.not63 = icmp eq i32 %78, 0
  br i1 %.not63, label %79, label %81

79:                                               ; preds = %77
  %80 = load i8, ptr %75, align 1, !tbaa !14
  %.not64 = icmp eq i8 %80, 0
  %.not65 = icmp slt i32 %.04579, %72
  %or.cond = select i1 %.not64, i1 %.not65, i1 false
  br i1 %or.cond, label %82, label %81

81:                                               ; preds = %79, %77, %68
  tail call void @exit_input_error(i32 noundef %66)
  br label %82

82:                                               ; preds = %79, %81
  %.146 = phi i32 [ %.04579, %81 ], [ %72, %79 ]
  store i32 0, ptr %64, align 4, !tbaa !13
  %83 = call double @strtod(ptr noundef nonnull %69, ptr noundef nonnull %2) #8
  %84 = load ptr, ptr @x_space, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.feature_node, ptr %84, i64 %.15278, i32 1
  store double %83, ptr %85, align 8, !tbaa !23
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = icmp eq ptr %86, %69
  br i1 %87, label %99, label %88

88:                                               ; preds = %82
  %89 = load i32, ptr %64, align 4, !tbaa !13
  %.not66 = icmp eq i32 %89, 0
  br i1 %.not66, label %90, label %99

90:                                               ; preds = %88
  %91 = load i8, ptr %86, align 1, !tbaa !14
  %.not67 = icmp eq i8 %91, 0
  br i1 %.not67, label %100, label %92

92:                                               ; preds = %90
  %93 = tail call ptr @__ctype_b_loc() #12
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = sext i8 %91 to i64
  %96 = getelementptr inbounds i16, ptr %94, i64 %95
  %97 = load i16, ptr %96, align 2, !tbaa !24
  %98 = and i16 %97, 8192
  %.not68 = icmp eq i16 %98, 0
  br i1 %.not68, label %99, label %100

99:                                               ; preds = %92, %88, %82
  tail call void @exit_input_error(i32 noundef %67)
  br label %100

100:                                              ; preds = %99, %92, %90
  %101 = add i64 %.15278, 1
  %102 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.22) #8
  %103 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.20) #8
  %104 = icmp eq ptr %103, null
  br i1 %104, label %._crit_edge82, label %68

._crit_edge82:                                    ; preds = %100, %60
  %.152.lcssa = phi i64 [ %.05185, %60 ], [ %101, %100 ]
  %.045.lcssa = phi i32 [ 0, %60 ], [ %.146, %100 ]
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.045.lcssa, i32 %.087)
  %105 = load double, ptr getelementptr inbounds (i8, ptr @prob, i64 24), align 8, !tbaa !18
  %106 = fcmp ult double %105, 0.000000e+00
  %.pre = load ptr, ptr @x_space, align 8, !tbaa !5
  br i1 %106, label %110, label %107

107:                                              ; preds = %._crit_edge82
  %108 = add i64 %.152.lcssa, 1
  %109 = getelementptr inbounds %struct.feature_node, ptr %.pre, i64 %.152.lcssa, i32 1
  store double %105, ptr %109, align 8, !tbaa !23
  br label %110

110:                                              ; preds = %107, %._crit_edge82
  %.2 = phi i64 [ %108, %107 ], [ %.152.lcssa, %._crit_edge82 ]
  %111 = add i64 %.2, 1
  %112 = getelementptr inbounds %struct.feature_node, ptr %.pre, i64 %.2
  store i32 -1, ptr %112, align 8, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %113 = load i32, ptr @prob, align 8, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next, %114
  br i1 %115, label %.lr.ph89, label %._crit_edge90, !llvm.loop !26

._crit_edge90:                                    ; preds = %110, %._crit_edge76
  %116 = phi ptr [ %34, %._crit_edge76 ], [ %.pre, %110 ]
  %117 = phi double [ %26, %._crit_edge76 ], [ %105, %110 ]
  %.051.lcssa = phi i64 [ 0, %._crit_edge76 ], [ %111, %110 ]
  %.0.lcssa = phi i32 [ 0, %._crit_edge76 ], [ %spec.select, %110 ]
  %.lcssa = phi i32 [ %27, %._crit_edge76 ], [ %113, %110 ]
  %118 = fcmp ult double %117, 0.000000e+00
  br i1 %118, label %149, label %119

119:                                              ; preds = %._crit_edge90
  %120 = add nuw nsw i32 %.0.lcssa, 1
  store i32 %120, ptr getelementptr inbounds (i8, ptr @prob, i64 4), align 4, !tbaa !27
  %121 = icmp sgt i32 %.lcssa, 1
  br i1 %121, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %119
  %122 = load ptr, ptr getelementptr inbounds (i8, ptr @prob, i64 16), align 8, !tbaa !20
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  %123 = add nsw i64 %wide.trip.count, -1
  %124 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %123, 7
  %125 = icmp ult i64 %124, 7
  br i1 %125, label %._crit_edge97.loopexit.unr-lcssa, label %.lr.ph96.new

.lr.ph96.new:                                     ; preds = %.lr.ph96
  %unroll_iter = and i64 %123, -8
  %invariant.gep = getelementptr inbounds i8, ptr %122, i64 8
  %invariant.gep126 = getelementptr inbounds i8, ptr %122, i64 16
  %invariant.gep128 = getelementptr inbounds i8, ptr %122, i64 24
  %invariant.gep130 = getelementptr inbounds i8, ptr %122, i64 32
  %invariant.gep132 = getelementptr inbounds i8, ptr %122, i64 40
  %invariant.gep134 = getelementptr inbounds i8, ptr %122, i64 48
  %invariant.gep136 = getelementptr inbounds i8, ptr %122, i64 56
  br label %126

126:                                              ; preds = %126, %.lr.ph96.new
  %indvars.iv103 = phi i64 [ 1, %.lr.ph96.new ], [ %indvars.iv.next104.7, %126 ]
  %niter = phi i64 [ 0, %.lr.ph96.new ], [ %niter.next.7, %126 ]
  %127 = getelementptr inbounds ptr, ptr %122, i64 %indvars.iv103
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %128, i64 -32
  store i32 %120, ptr %129, align 8, !tbaa !21
  %gep = getelementptr inbounds ptr, ptr %invariant.gep, i64 %indvars.iv103
  %130 = load ptr, ptr %gep, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 -32
  store i32 %120, ptr %131, align 8, !tbaa !21
  %gep127 = getelementptr inbounds ptr, ptr %invariant.gep126, i64 %indvars.iv103
  %132 = load ptr, ptr %gep127, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 -32
  store i32 %120, ptr %133, align 8, !tbaa !21
  %gep129 = getelementptr inbounds ptr, ptr %invariant.gep128, i64 %indvars.iv103
  %134 = load ptr, ptr %gep129, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 -32
  store i32 %120, ptr %135, align 8, !tbaa !21
  %gep131 = getelementptr inbounds ptr, ptr %invariant.gep130, i64 %indvars.iv103
  %136 = load ptr, ptr %gep131, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 -32
  store i32 %120, ptr %137, align 8, !tbaa !21
  %gep133 = getelementptr inbounds ptr, ptr %invariant.gep132, i64 %indvars.iv103
  %138 = load ptr, ptr %gep133, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 -32
  store i32 %120, ptr %139, align 8, !tbaa !21
  %gep135 = getelementptr inbounds ptr, ptr %invariant.gep134, i64 %indvars.iv103
  %140 = load ptr, ptr %gep135, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i64 -32
  store i32 %120, ptr %141, align 8, !tbaa !21
  %gep137 = getelementptr inbounds ptr, ptr %invariant.gep136, i64 %indvars.iv103
  %142 = load ptr, ptr %gep137, align 8, !tbaa !5
  %143 = getelementptr inbounds i8, ptr %142, i64 -32
  store i32 %120, ptr %143, align 8, !tbaa !21
  %indvars.iv.next104.7 = add nuw nsw i64 %indvars.iv103, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge97.loopexit.unr-lcssa, label %126, !llvm.loop !28

._crit_edge97.loopexit.unr-lcssa:                 ; preds = %126, %.lr.ph96
  %indvars.iv103.unr = phi i64 [ 1, %.lr.ph96 ], [ %indvars.iv.next104.7, %126 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge97, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge97.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv103.epil = phi i64 [ %indvars.iv.next104.epil, %.epil.preheader ], [ %indvars.iv103.unr, %._crit_edge97.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge97.loopexit.unr-lcssa ]
  %144 = getelementptr inbounds ptr, ptr %122, i64 %indvars.iv103.epil
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %145, i64 -32
  store i32 %120, ptr %146, align 8, !tbaa !21
  %indvars.iv.next104.epil = add nuw nsw i64 %indvars.iv103.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge97, label %.epil.preheader, !llvm.loop !29

._crit_edge97:                                    ; preds = %._crit_edge97.loopexit.unr-lcssa, %.epil.preheader, %119
  %147 = getelementptr %struct.feature_node, ptr %116, i64 %.051.lcssa
  %148 = getelementptr i8, ptr %147, i64 -32
  store i32 %120, ptr %148, align 8, !tbaa !21
  br label %150

149:                                              ; preds = %._crit_edge90
  store i32 %.0.lcssa, ptr getelementptr inbounds (i8, ptr @prob, i64 4), align 4, !tbaa !27
  br label %150

150:                                              ; preds = %149, %._crit_edge97
  %151 = tail call i32 @fclose(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret void
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 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 uwtable
declare hidden ptr @readline(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #5

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

; Function Attrs: mustprogress nofree nounwind willreturn
declare double @strtod(ptr noundef readonly, ptr nocapture noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #5

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

attributes #0 = { 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 #1 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { cold nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { 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, !11, i64 0}
!10 = !{!"problem", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !12, i64 24}
!19 = !{!10, !6, i64 8}
!20 = !{!10, !6, i64 16}
!21 = !{!22, !11, i64 0}
!22 = !{!"feature_node", !11, i64 0, !12, i64 8}
!23 = !{!22, !12, i64 8}
!24 = !{!25, !25, i64 0}
!25 = !{!"short", !7, i64 0}
!26 = distinct !{!26, !16}
!27 = !{!10, !11, i64 4}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}


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