; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm (svm)

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

@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZL14svm_type_table = external hidden global [6 x ptr], align 16
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL17kernel_type_table = external hidden global [6 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @svm_save_model(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noalias ptr @fopen(ptr noundef %22, ptr noundef @.str.10)
  store ptr %23, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %350

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %28 = call ptr @setlocale(i32 noundef 6, ptr noundef null) #4
  %29 = call noalias ptr @strdup(ptr noundef %28) #4
  store ptr %29, ptr %8, align 8, !tbaa !5
  %30 = call ptr @setlocale(i32 noundef 6, ptr noundef @.str.11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.svm_model, ptr %31, i32 0, i32 0
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.svm_parameter, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [6 x ptr], ptr @_ZL14svm_type_table, i64 0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.12, ptr noundef %39) #4
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.svm_parameter, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [6 x ptr], ptr @_ZL17kernel_type_table, i64 0, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.13, ptr noundef %47) #4
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.svm_parameter, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = icmp eq i32 %51, 1
  br i1 %52, label %53, label %59

53:                                               ; preds = %27
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.svm_parameter, ptr %55, i32 0, i32 2
  %57 = load i32, ptr %56, align 8, !tbaa !14
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.14, i32 noundef %57) #4
  br label %59

59:                                               ; preds = %53, %27
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.svm_parameter, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !13
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %74, label %64

64:                                               ; preds = %59
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.svm_parameter, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = icmp eq i32 %67, 2
  br i1 %68, label %74, label %69

69:                                               ; preds = %64
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.svm_parameter, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !13
  %73 = icmp eq i32 %72, 3
  br i1 %73, label %74, label %80

74:                                               ; preds = %69, %64, %59
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.svm_parameter, ptr %76, i32 0, i32 3
  %78 = load double, ptr %77, align 8, !tbaa !15
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.15, double noundef %78) #4
  br label %80

80:                                               ; preds = %74, %69
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.svm_parameter, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 4, !tbaa !13
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %90, label %85

85:                                               ; preds = %80
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.svm_parameter, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !13
  %89 = icmp eq i32 %88, 3
  br i1 %89, label %90, label %96

90:                                               ; preds = %85, %80
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.svm_parameter, ptr %92, i32 0, i32 4
  %94 = load double, ptr %93, align 8, !tbaa !16
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.16, double noundef %94) #4
  br label %96

96:                                               ; preds = %90, %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.svm_model, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !17
  store i32 %99, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.svm_model, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !20
  store i32 %102, ptr %11, align 4, !tbaa !19
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !19
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.17, i32 noundef %104) #4
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = load i32, ptr %11, align 4, !tbaa !19
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.18, i32 noundef %107) #4
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef @.str.19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !19
  br label %111

111:                                              ; preds = %130, %96
  %112 = load i32, ptr %12, align 4, !tbaa !19
  %113 = load i32, ptr %10, align 4, !tbaa !19
  %114 = load i32, ptr %10, align 4, !tbaa !19
  %115 = sub nsw i32 %114, 1
  %116 = mul nsw i32 %113, %115
  %117 = sdiv i32 %116, 2
  %118 = icmp slt i32 %112, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %111
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %133

120:                                              ; preds = %111
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.svm_model, ptr %122, i32 0, i32 5
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = load i32, ptr %12, align 4, !tbaa !19
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %124, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !22
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.20, double noundef %128) #4
  br label %130

130:                                              ; preds = %120
  %131 = load i32, ptr %12, align 4, !tbaa !19
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !19
  br label %111, !llvm.loop !23

133:                                              ; preds = %119
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.21) #4
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.svm_model, ptr %136, i32 0, i32 9
  %138 = load ptr, ptr %137, align 8, !tbaa !25
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %164

140:                                              ; preds = %133
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !19
  br label %143

143:                                              ; preds = %158, %140
  %144 = load i32, ptr %13, align 4, !tbaa !19
  %145 = load i32, ptr %10, align 4, !tbaa !19
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %143
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %161

148:                                              ; preds = %143
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.svm_model, ptr %150, i32 0, i32 9
  %152 = load ptr, ptr %151, align 8, !tbaa !25
  %153 = load i32, ptr %13, align 4, !tbaa !19
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds i32, ptr %152, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !19
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.23, i32 noundef %156) #4
  br label %158

158:                                              ; preds = %148
  %159 = load i32, ptr %13, align 4, !tbaa !19
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %13, align 4, !tbaa !19
  br label %143, !llvm.loop !26

161:                                              ; preds = %147
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef @.str.21) #4
  br label %164

164:                                              ; preds = %161, %133
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.svm_model, ptr %165, i32 0, i32 6
  %167 = load ptr, ptr %166, align 8, !tbaa !27
  %168 = icmp ne ptr %167, null
  br i1 %168, label %169, label %197

169:                                              ; preds = %164
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !19
  br label %172

172:                                              ; preds = %191, %169
  %173 = load i32, ptr %14, align 4, !tbaa !19
  %174 = load i32, ptr %10, align 4, !tbaa !19
  %175 = load i32, ptr %10, align 4, !tbaa !19
  %176 = sub nsw i32 %175, 1
  %177 = mul nsw i32 %174, %176
  %178 = sdiv i32 %177, 2
  %179 = icmp slt i32 %173, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %172
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %194

181:                                              ; preds = %172
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.svm_model, ptr %183, i32 0, i32 6
  %185 = load ptr, ptr %184, align 8, !tbaa !27
  %186 = load i32, ptr %14, align 4, !tbaa !19
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  %189 = load double, ptr %188, align 8, !tbaa !22
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.20, double noundef %189) #4
  br label %191

191:                                              ; preds = %181
  %192 = load i32, ptr %14, align 4, !tbaa !19
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %14, align 4, !tbaa !19
  br label %172, !llvm.loop !28

194:                                              ; preds = %180
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.21) #4
  br label %197

197:                                              ; preds = %194, %164
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.svm_model, ptr %198, i32 0, i32 7
  %200 = load ptr, ptr %199, align 8, !tbaa !29
  %201 = icmp ne ptr %200, null
  br i1 %201, label %202, label %230

202:                                              ; preds = %197
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef @.str.25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !19
  br label %205

205:                                              ; preds = %224, %202
  %206 = load i32, ptr %15, align 4, !tbaa !19
  %207 = load i32, ptr %10, align 4, !tbaa !19
  %208 = load i32, ptr %10, align 4, !tbaa !19
  %209 = sub nsw i32 %208, 1
  %210 = mul nsw i32 %207, %209
  %211 = sdiv i32 %210, 2
  %212 = icmp slt i32 %206, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %205
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %227

214:                                              ; preds = %205
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.svm_model, ptr %216, i32 0, i32 7
  %218 = load ptr, ptr %217, align 8, !tbaa !29
  %219 = load i32, ptr %15, align 4, !tbaa !19
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds double, ptr %218, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !22
  %223 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.20, double noundef %222) #4
  br label %224

224:                                              ; preds = %214
  %225 = load i32, ptr %15, align 4, !tbaa !19
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %15, align 4, !tbaa !19
  br label %205, !llvm.loop !30

227:                                              ; preds = %213
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef @.str.21) #4
  br label %230

230:                                              ; preds = %227, %197
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.svm_model, ptr %231, i32 0, i32 10
  %233 = load ptr, ptr %232, align 8, !tbaa !31
  %234 = icmp ne ptr %233, null
  br i1 %234, label %235, label %259

235:                                              ; preds = %230
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !19
  br label %238

238:                                              ; preds = %253, %235
  %239 = load i32, ptr %16, align 4, !tbaa !19
  %240 = load i32, ptr %10, align 4, !tbaa !19
  %241 = icmp slt i32 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %256

243:                                              ; preds = %238
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.svm_model, ptr %245, i32 0, i32 10
  %247 = load ptr, ptr %246, align 8, !tbaa !31
  %248 = load i32, ptr %16, align 4, !tbaa !19
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds i32, ptr %247, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !19
  %252 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %244, ptr noundef @.str.23, i32 noundef %251) #4
  br label %253

253:                                              ; preds = %243
  %254 = load i32, ptr %16, align 4, !tbaa !19
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %16, align 4, !tbaa !19
  br label %238, !llvm.loop !32

256:                                              ; preds = %242
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %257, ptr noundef @.str.21) #4
  br label %259

259:                                              ; preds = %256, %230
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %260, ptr noundef @.str.27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %262 = load ptr, ptr %5, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.svm_model, ptr %262, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !33
  store ptr %264, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %265 = load ptr, ptr %5, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.svm_model, ptr %265, i32 0, i32 3
  %267 = load ptr, ptr %266, align 8, !tbaa !34
  store ptr %267, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !19
  br label %268

268:                                              ; preds = %333, %259
  %269 = load i32, ptr %19, align 4, !tbaa !19
  %270 = load i32, ptr %11, align 4, !tbaa !19
  %271 = icmp slt i32 %269, %270
  br i1 %271, label %273, label %272

272:                                              ; preds = %268
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %336

273:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !19
  br label %274

274:                                              ; preds = %292, %273
  %275 = load i32, ptr %20, align 4, !tbaa !19
  %276 = load i32, ptr %10, align 4, !tbaa !19
  %277 = sub nsw i32 %276, 1
  %278 = icmp slt i32 %275, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %274
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %295

280:                                              ; preds = %274
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = load ptr, ptr %17, align 8, !tbaa !5
  %283 = load i32, ptr %20, align 4, !tbaa !19
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds ptr, ptr %282, i64 %284
  %286 = load ptr, ptr %285, align 8, !tbaa !5
  %287 = load i32, ptr %19, align 4, !tbaa !19
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds double, ptr %286, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !22
  %291 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %281, ptr noundef @.str.28, double noundef %290) #4
  br label %292

292:                                              ; preds = %280
  %293 = load i32, ptr %20, align 4, !tbaa !19
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %20, align 4, !tbaa !19
  br label %274, !llvm.loop !35

295:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %296 = load ptr, ptr %18, align 8, !tbaa !5
  %297 = load i32, ptr %19, align 4, !tbaa !19
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds ptr, ptr %296, i64 %298
  %300 = load ptr, ptr %299, align 8, !tbaa !5
  store ptr %300, ptr %21, align 8, !tbaa !5
  %301 = load ptr, ptr %9, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.svm_parameter, ptr %301, i32 0, i32 1
  %303 = load i32, ptr %302, align 4, !tbaa !13
  %304 = icmp eq i32 %303, 4
  br i1 %304, label %305, label %312

305:                                              ; preds = %295
  %306 = load ptr, ptr %6, align 8, !tbaa !5
  %307 = load ptr, ptr %21, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.svm_node, ptr %307, i32 0, i32 1
  %309 = load double, ptr %308, align 8, !tbaa !36
  %310 = fptosi double %309 to i32
  %311 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %306, ptr noundef @.str.29, i32 noundef %310) #4
  br label %330

312:                                              ; preds = %295
  br label %313

313:                                              ; preds = %318, %312
  %314 = load ptr, ptr %21, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.svm_node, ptr %314, i32 0, i32 0
  %316 = load i32, ptr %315, align 8, !tbaa !38
  %317 = icmp ne i32 %316, -1
  br i1 %317, label %318, label %329

318:                                              ; preds = %313
  %319 = load ptr, ptr %6, align 8, !tbaa !5
  %320 = load ptr, ptr %21, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.svm_node, ptr %320, i32 0, i32 0
  %322 = load i32, ptr %321, align 8, !tbaa !38
  %323 = load ptr, ptr %21, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.svm_node, ptr %323, i32 0, i32 1
  %325 = load double, ptr %324, align 8, !tbaa !36
  %326 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %319, ptr noundef @.str.30, i32 noundef %322, double noundef %325) #4
  %327 = load ptr, ptr %21, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.svm_node, ptr %327, i32 1
  store ptr %328, ptr %21, align 8, !tbaa !5
  br label %313, !llvm.loop !39

329:                                              ; preds = %313
  br label %330

330:                                              ; preds = %329, %305
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %331, ptr noundef @.str.21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %333

333:                                              ; preds = %330
  %334 = load i32, ptr %19, align 4, !tbaa !19
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %19, align 4, !tbaa !19
  br label %268, !llvm.loop !40

336:                                              ; preds = %272
  %337 = load ptr, ptr %8, align 8, !tbaa !5
  %338 = call ptr @setlocale(i32 noundef 6, ptr noundef %337) #4
  %339 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %339) #4
  %340 = load ptr, ptr %6, align 8, !tbaa !5
  %341 = call i32 @ferror(ptr noundef %340) #4
  %342 = icmp ne i32 %341, 0
  br i1 %342, label %347, label %343

343:                                              ; preds = %336
  %344 = load ptr, ptr %6, align 8, !tbaa !5
  %345 = call i32 @fclose(ptr noundef %344)
  %346 = icmp ne i32 %345, 0
  br i1 %346, label %347, label %348

347:                                              ; preds = %343, %336
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %349

348:                                              ; preds = %343
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %349

349:                                              ; preds = %348, %347
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %350

350:                                              ; preds = %349, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %351 = load i32, ptr %3, align 4
  ret i32 %351
}

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

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #1

; Function Attrs: nounwind
declare ptr @setlocale(i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @ferror(ptr noundef) #1

declare i32 @fclose(ptr noundef) #3

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

!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++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS13svm_parameter", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 88, !11, i64 96, !11, i64 100}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !12, i64 16}
!16 = !{!10, !12, i64 24}
!17 = !{!18, !11, i64 104}
!18 = !{!"_ZTS9svm_model", !10, i64 0, !11, i64 104, !11, i64 108, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !11, i64 176}
!19 = !{!11, !11, i64 0}
!20 = !{!18, !11, i64 108}
!21 = !{!18, !6, i64 128}
!22 = !{!12, !12, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!18, !6, i64 160}
!26 = distinct !{!26, !24}
!27 = !{!18, !6, i64 136}
!28 = distinct !{!28, !24}
!29 = !{!18, !6, i64 144}
!30 = distinct !{!30, !24}
!31 = !{!18, !6, i64 168}
!32 = distinct !{!32, !24}
!33 = !{!18, !6, i64 120}
!34 = !{!18, !6, i64 112}
!35 = distinct !{!35, !24}
!36 = !{!37, !12, i64 8}
!37 = !{!"_ZTS8svm_node", !11, i64 0, !12, i64 8}
!38 = !{!37, !11, i64 0}
!39 = distinct !{!39, !24}
!40 = distinct !{!40, !24}


; 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.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZL14svm_type_table = external hidden local_unnamed_addr global [6 x ptr], align 16
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL17kernel_type_table = external hidden local_unnamed_addr global [6 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local range(i32 -1, 1) i32 @svm_save_model(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.10)
  %4 = icmp eq ptr %3, null
  br i1 %4, label %132, label %5

5:                                                ; preds = %2
  %6 = tail call ptr @setlocale(i32 noundef 6, ptr noundef null) #6
  %7 = tail call noalias ptr @strdup(ptr noundef %6) #6
  %8 = tail call ptr @setlocale(i32 noundef 6, ptr noundef nonnull @.str.11) #6
  %9 = load i32, ptr %1, align 8, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [6 x ptr], ptr @_ZL14svm_type_table, i64 0, i64 %10
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.12, ptr noundef %12) #6
  %14 = getelementptr inbounds i8, ptr %1, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !13
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [6 x ptr], ptr @_ZL17kernel_type_table, i64 0, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.13, ptr noundef %18) #6
  %20 = load i32, ptr %14, align 4, !tbaa !13
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %26

22:                                               ; preds = %5
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !14
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.14, i32 noundef %24) #6
  %.pre = load i32, ptr %14, align 4, !tbaa !13
  br label %26

26:                                               ; preds = %22, %5
  %27 = phi i32 [ %.pre, %22 ], [ %20, %5 ]
  %.off = add i32 %27, -1
  %switch = icmp ult i32 %.off, 3
  br i1 %switch, label %28, label %32

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %1, i64 16
  %30 = load double, ptr %29, align 8, !tbaa !15
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.15, double noundef %30) #6
  %.pr = load i32, ptr %14, align 4, !tbaa !13
  br label %32

32:                                               ; preds = %26, %28
  %33 = phi i32 [ %27, %26 ], [ %.pr, %28 ]
  switch i32 %33, label %38 [
    i32 1, label %34
    i32 3, label %34
  ]

34:                                               ; preds = %32, %32
  %35 = getelementptr inbounds i8, ptr %1, i64 24
  %36 = load double, ptr %35, align 8, !tbaa !16
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.16, double noundef %36) #6
  br label %38

38:                                               ; preds = %32, %34
  %39 = getelementptr inbounds i8, ptr %1, i64 104
  %40 = load i32, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %1, i64 108
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.17, i32 noundef %40) #6
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.18, i32 noundef %42) #6
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.19) #6
  %46 = add nsw i32 %40, -1
  %47 = mul nsw i32 %46, %40
  %48 = sdiv i32 %47, 2
  %49 = icmp sgt i32 %47, 1
  br i1 %49, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %50 = getelementptr inbounds i8, ptr %1, i64 128
  %wide.trip.count = zext nneg i32 %48 to i64
  br label %54

._crit_edge:                                      ; preds = %54, %38
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  %52 = getelementptr inbounds i8, ptr %1, i64 160
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %.not = icmp eq ptr %53, null
  br i1 %.not, label %67, label %59

54:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %55 = load ptr, ptr %50, align 8, !tbaa !21
  %56 = getelementptr inbounds double, ptr %55, i64 %indvars.iv
  %57 = load double, ptr %56, align 8, !tbaa !22
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.20, double noundef %57) #6
  %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, label %54, !llvm.loop !23

59:                                               ; preds = %._crit_edge
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.22) #6
  %61 = icmp sgt i32 %40, 0
  br i1 %61, label %.lr.ph125.preheader, label %._crit_edge126

.lr.ph125.preheader:                              ; preds = %59
  %wide.trip.count151 = zext nneg i32 %40 to i64
  br label %.lr.ph125

._crit_edge126:                                   ; preds = %.lr.ph125, %59
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  br label %67

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %.lr.ph125
  %indvars.iv148 = phi i64 [ 0, %.lr.ph125.preheader ], [ %indvars.iv.next149, %.lr.ph125 ]
  %63 = load ptr, ptr %52, align 8, !tbaa !20
  %64 = getelementptr inbounds i32, ptr %63, i64 %indvars.iv148
  %65 = load i32, ptr %64, align 4, !tbaa !25
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.23, i32 noundef %65) #6
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %._crit_edge126, label %.lr.ph125, !llvm.loop !26

67:                                               ; preds = %._crit_edge126, %._crit_edge
  %68 = getelementptr inbounds i8, ptr %1, i64 136
  %69 = load ptr, ptr %68, align 8, !tbaa !27
  %.not113 = icmp eq ptr %69, null
  br i1 %.not113, label %77, label %70

70:                                               ; preds = %67
  %71 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.24) #6
  br i1 %49, label %.lr.ph129.preheader, label %._crit_edge130

.lr.ph129.preheader:                              ; preds = %70
  %wide.trip.count156 = zext nneg i32 %48 to i64
  br label %.lr.ph129

._crit_edge130:                                   ; preds = %.lr.ph129, %70
  %72 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  br label %77

.lr.ph129:                                        ; preds = %.lr.ph129.preheader, %.lr.ph129
  %indvars.iv153 = phi i64 [ 0, %.lr.ph129.preheader ], [ %indvars.iv.next154, %.lr.ph129 ]
  %73 = load ptr, ptr %68, align 8, !tbaa !27
  %74 = getelementptr inbounds double, ptr %73, i64 %indvars.iv153
  %75 = load double, ptr %74, align 8, !tbaa !22
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.20, double noundef %75) #6
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond157.not = icmp eq i64 %indvars.iv.next154, %wide.trip.count156
  br i1 %exitcond157.not, label %._crit_edge130, label %.lr.ph129, !llvm.loop !28

77:                                               ; preds = %._crit_edge130, %67
  %78 = getelementptr inbounds i8, ptr %1, i64 144
  %79 = load ptr, ptr %78, align 8, !tbaa !29
  %.not114 = icmp eq ptr %79, null
  br i1 %.not114, label %87, label %80

80:                                               ; preds = %77
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.25) #6
  br i1 %49, label %.lr.ph133.preheader, label %._crit_edge134

.lr.ph133.preheader:                              ; preds = %80
  %wide.trip.count161 = zext nneg i32 %48 to i64
  br label %.lr.ph133

._crit_edge134:                                   ; preds = %.lr.ph133, %80
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  br label %87

.lr.ph133:                                        ; preds = %.lr.ph133.preheader, %.lr.ph133
  %indvars.iv158 = phi i64 [ 0, %.lr.ph133.preheader ], [ %indvars.iv.next159, %.lr.ph133 ]
  %83 = load ptr, ptr %78, align 8, !tbaa !29
  %84 = getelementptr inbounds double, ptr %83, i64 %indvars.iv158
  %85 = load double, ptr %84, align 8, !tbaa !22
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.20, double noundef %85) #6
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161
  br i1 %exitcond162.not, label %._crit_edge134, label %.lr.ph133, !llvm.loop !30

87:                                               ; preds = %._crit_edge134, %77
  %88 = getelementptr inbounds i8, ptr %1, i64 168
  %89 = load ptr, ptr %88, align 8, !tbaa !31
  %.not115 = icmp eq ptr %89, null
  br i1 %.not115, label %98, label %90

90:                                               ; preds = %87
  %91 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.26) #6
  %92 = icmp sgt i32 %40, 0
  br i1 %92, label %.lr.ph137.preheader, label %._crit_edge138

.lr.ph137.preheader:                              ; preds = %90
  %wide.trip.count166 = zext nneg i32 %40 to i64
  br label %.lr.ph137

._crit_edge138:                                   ; preds = %.lr.ph137, %90
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  br label %98

.lr.ph137:                                        ; preds = %.lr.ph137.preheader, %.lr.ph137
  %indvars.iv163 = phi i64 [ 0, %.lr.ph137.preheader ], [ %indvars.iv.next164, %.lr.ph137 ]
  %94 = load ptr, ptr %88, align 8, !tbaa !31
  %95 = getelementptr inbounds i32, ptr %94, i64 %indvars.iv163
  %96 = load i32, ptr %95, align 4, !tbaa !25
  %97 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.23, i32 noundef %96) #6
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond167.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count166
  br i1 %exitcond167.not, label %._crit_edge138, label %.lr.ph137, !llvm.loop !32

98:                                               ; preds = %._crit_edge138, %87
  %99 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.27) #6
  %100 = getelementptr inbounds i8, ptr %1, i64 120
  %101 = load ptr, ptr %100, align 8, !tbaa !33
  %102 = getelementptr inbounds i8, ptr %1, i64 112
  %103 = load ptr, ptr %102, align 8, !tbaa !34
  %104 = icmp sgt i32 %42, 0
  br i1 %104, label %.preheader119.lr.ph, label %._crit_edge146

.preheader119.lr.ph:                              ; preds = %98
  %105 = icmp sgt i32 %40, 1
  %wide.trip.count176 = zext nneg i32 %42 to i64
  %wide.trip.count171 = zext nneg i32 %46 to i64
  br label %.preheader119

.preheader119:                                    ; preds = %.preheader119.lr.ph, %.loopexit
  %indvars.iv173 = phi i64 [ 0, %.preheader119.lr.ph ], [ %indvars.iv.next174, %.loopexit ]
  br i1 %105, label %.lr.ph140, label %._crit_edge141

._crit_edge146:                                   ; preds = %.loopexit, %98
  %106 = tail call ptr @setlocale(i32 noundef 6, ptr noundef %7) #6
  tail call void @free(ptr noundef %7) #6
  %107 = tail call i32 @ferror(ptr noundef %3) #6
  %.not116 = icmp eq i32 %107, 0
  br i1 %.not116, label %130, label %132

._crit_edge141:                                   ; preds = %.lr.ph140, %.preheader119
  %108 = getelementptr inbounds ptr, ptr %103, i64 %indvars.iv173
  %109 = load ptr, ptr %108, align 8, !tbaa !12
  %110 = load i32, ptr %14, align 4, !tbaa !13
  %111 = icmp eq i32 %110, 4
  br i1 %111, label %118, label %.preheader

.preheader:                                       ; preds = %._crit_edge141
  %112 = load i32, ptr %109, align 8, !tbaa !35
  %.not118142 = icmp eq i32 %112, -1
  br i1 %.not118142, label %.loopexit, label %.lr.ph144

.lr.ph140:                                        ; preds = %.preheader119, %.lr.ph140
  %indvars.iv168 = phi i64 [ %indvars.iv.next169, %.lr.ph140 ], [ 0, %.preheader119 ]
  %113 = getelementptr inbounds ptr, ptr %101, i64 %indvars.iv168
  %114 = load ptr, ptr %113, align 8, !tbaa !12
  %115 = getelementptr inbounds double, ptr %114, i64 %indvars.iv173
  %116 = load double, ptr %115, align 8, !tbaa !22
  %117 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.28, double noundef %116) #6
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond172.not = icmp eq i64 %indvars.iv.next169, %wide.trip.count171
  br i1 %exitcond172.not, label %._crit_edge141, label %.lr.ph140, !llvm.loop !37

118:                                              ; preds = %._crit_edge141
  %119 = getelementptr inbounds i8, ptr %109, i64 8
  %120 = load double, ptr %119, align 8, !tbaa !38
  %121 = fptosi double %120 to i32
  %122 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.29, i32 noundef %121) #6
  br label %.loopexit

.lr.ph144:                                        ; preds = %.preheader, %.lr.ph144
  %123 = phi i32 [ %128, %.lr.ph144 ], [ %112, %.preheader ]
  %.0143 = phi ptr [ %127, %.lr.ph144 ], [ %109, %.preheader ]
  %124 = getelementptr inbounds i8, ptr %.0143, i64 8
  %125 = load double, ptr %124, align 8, !tbaa !38
  %126 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.30, i32 noundef %123, double noundef %125) #6
  %127 = getelementptr inbounds i8, ptr %.0143, i64 16
  %128 = load i32, ptr %127, align 8, !tbaa !35
  %.not118 = icmp eq i32 %128, -1
  br i1 %.not118, label %.loopexit, label %.lr.ph144, !llvm.loop !39

.loopexit:                                        ; preds = %.lr.ph144, %.preheader, %118
  %129 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.21) #6
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %exitcond177.not = icmp eq i64 %indvars.iv.next174, %wide.trip.count176
  br i1 %exitcond177.not, label %._crit_edge146, label %.preheader119, !llvm.loop !40

130:                                              ; preds = %._crit_edge146
  %131 = tail call i32 @fclose(ptr noundef %3)
  %.not117 = icmp ne i32 %131, 0
  %spec.select = sext i1 %.not117 to i32
  br label %132

132:                                              ; preds = %130, %._crit_edge146, %2
  %.1 = phi i32 [ -1, %2 ], [ -1, %._crit_edge146 ], [ %spec.select, %130 ]
  ret i32 %.1
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind memory(read)
declare noundef i32 @ferror(ptr nocapture noundef) local_unnamed_addr #5

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

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind 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 = { 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, !7, i64 0}
!6 = !{!"_ZTS13svm_parameter", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !10, i64 24}
!17 = !{!18, !7, i64 104}
!18 = !{!"_ZTS9svm_model", !6, i64 0, !7, i64 104, !7, i64 108, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !7, i64 176}
!19 = !{!18, !7, i64 108}
!20 = !{!18, !11, i64 160}
!21 = !{!18, !11, i64 128}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !24}
!27 = !{!18, !11, i64 136}
!28 = distinct !{!28, !24}
!29 = !{!18, !11, i64 144}
!30 = distinct !{!30, !24}
!31 = !{!18, !11, i64 168}
!32 = distinct !{!32, !24}
!33 = !{!18, !11, i64 120}
!34 = !{!18, !11, i64 112}
!35 = !{!36, !7, i64 0}
!36 = !{!"_ZTS8svm_node", !7, i64 0, !10, i64 8}
!37 = distinct !{!37, !24}
!38 = !{!36, !10, i64 8}
!39 = distinct !{!39, !24}
!40 = distinct !{!40, !24}


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