; LLVM IR from mbheinen/bpa-ipf-tsp :: cflow (post_pvcurve)

; 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.CRIT = type { i32, [60 x i8], [60 x i8], [60 x i8], [60 x i8] }
%struct.BS_DVDQ = type { ptr, double, double, double }
%struct.MATRIX = type { i32, i32, i32, i32, [200 x i32], [500 x i32], [3 x [60 x i8]], [500 x [200 x ptr]] }

@stderr = external global ptr, align 8
@caselog_fp = external dso_local global ptr, align 8
@critical = external dso_local global [200 x %struct.CRIT], align 16
@__const.analyze_dvdq.blank = external hidden unnamed_addr constant [13 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [46 x i8], align 1
@bus_dvdq = external dso_local global [66 x %struct.BS_DVDQ], align 16
@temp_dvdq1 = external dso_local global [166 x i32], align 16
@temp_dvdq2 = external dso_local global [166 x i32], align 16
@temp_dvdq3 = external dso_local global [166 x i32], align 16
@.str.95 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @analyze_dvdq(i32 noundef %0, i32 noundef %1, ptr noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca [13 x i8], align 1
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 13, ptr %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %21, ptr align 1 @__const.analyze_dvdq.blank, i64 13, i1 false)
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 1
  br i1 %23, label %24, label %27

24:                                               ; preds = %3
  %25 = load ptr, ptr @caselog_fp, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.92) #7
  br label %42

27:                                               ; preds = %3
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = icmp eq i32 %28, 5
  br i1 %29, label %30, label %38

30:                                               ; preds = %27
  %31 = load ptr, ptr @caselog_fp, align 8, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [200 x %struct.CRIT], ptr @critical, i64 0, i64 %33
  %35 = getelementptr inbounds %struct.CRIT, ptr %34, i32 0, i32 3
  %36 = getelementptr inbounds [60 x i8], ptr %35, i64 0, i64 0
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.93, ptr noundef %36) #7
  br label %41

38:                                               ; preds = %27
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.94) #7
  call void @exit(i32 noundef 1) #8
  unreachable

41:                                               ; preds = %30
  br label %42

42:                                               ; preds = %41, %24
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.MATRIX, ptr %43, i64 %45
  %47 = getelementptr inbounds %struct.MATRIX, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !11
  store i32 %48, ptr %9, align 4, !tbaa !5
  store i32 2, ptr %7, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %291, %42
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %294

53:                                               ; preds = %49
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.MATRIX, ptr %54, i64 %56
  %58 = getelementptr inbounds %struct.MATRIX, ptr %57, i32 0, i32 7
  %59 = getelementptr inbounds [500 x [200 x ptr]], ptr %58, i64 0, i64 2
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [200 x ptr], ptr %59, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.BS_DVDQ, ptr %66, i32 0, i32 0
  store ptr %63, ptr %67, align 16, !tbaa !13
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.BS_DVDQ, ptr %70, i32 0, i32 1
  store double 0.000000e+00, ptr %71, align 8, !tbaa !16
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.BS_DVDQ, ptr %74, i32 0, i32 2
  store double 0.000000e+00, ptr %75, align 16, !tbaa !17
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %77
  %79 = getelementptr inbounds %struct.BS_DVDQ, ptr %78, i32 0, i32 3
  store double 0.000000e+00, ptr %79, align 8, !tbaa !18
  store i32 -1, ptr %10, align 4, !tbaa !5
  store i32 -1, ptr %13, align 4, !tbaa !5
  store i32 -1, ptr %14, align 4, !tbaa !5
  store double 0.000000e+00, ptr %19, align 8, !tbaa !19
  store double 0.000000e+00, ptr %20, align 8, !tbaa !19
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.MATRIX, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.MATRIX, ptr %83, i32 0, i32 4
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200 x i32], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp eq i32 %88, 1
  br i1 %89, label %90, label %221

90:                                               ; preds = %53
  store i32 3, ptr %8, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %161, %90
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = load ptr, ptr %6, align 8, !tbaa !9
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %struct.MATRIX, ptr %93, i64 %96
  %98 = getelementptr inbounds %struct.MATRIX, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !20
  %100 = icmp slt i32 %92, %99
  br i1 %100, label %101, label %164

101:                                              ; preds = %91
  %102 = load ptr, ptr %6, align 8, !tbaa !9
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %struct.MATRIX, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.MATRIX, ptr %105, i32 0, i32 5
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [500 x i32], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %101
  br label %160

113:                                              ; preds = %101
  %114 = load ptr, ptr %6, align 8, !tbaa !9
  %115 = load i32, ptr %5, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.MATRIX, ptr %114, i64 %116
  %118 = getelementptr inbounds %struct.MATRIX, ptr %117, i32 0, i32 7
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [500 x [200 x ptr]], ptr %118, i64 0, i64 %120
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [200 x ptr], ptr %121, i64 0, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = call double @atof(ptr noundef %125) #9
  store double %126, ptr %18, align 8, !tbaa !19
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = icmp eq i32 %127, -1
  br i1 %128, label %129, label %131

129:                                              ; preds = %113
  %130 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %130, ptr %10, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %129, %113
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = icmp eq i32 %132, -1
  br i1 %133, label %134, label %137

134:                                              ; preds = %131
  %135 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %135, ptr %13, align 4, !tbaa !5
  %136 = load double, ptr %18, align 8, !tbaa !19
  store double %136, ptr %19, align 8, !tbaa !19
  br label %145

137:                                              ; preds = %131
  %138 = load double, ptr %18, align 8, !tbaa !19
  %139 = load double, ptr %19, align 8, !tbaa !19
  %140 = fcmp olt double %138, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %137
  %142 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %142, ptr %13, align 4, !tbaa !5
  %143 = load double, ptr %18, align 8, !tbaa !19
  store double %143, ptr %19, align 8, !tbaa !19
  br label %144

144:                                              ; preds = %141, %137
  br label %145

145:                                              ; preds = %144, %134
  %146 = load i32, ptr %14, align 4, !tbaa !5
  %147 = icmp eq i32 %146, -1
  br i1 %147, label %148, label %151

148:                                              ; preds = %145
  %149 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %149, ptr %14, align 4, !tbaa !5
  %150 = load double, ptr %18, align 8, !tbaa !19
  store double %150, ptr %20, align 8, !tbaa !19
  br label %159

151:                                              ; preds = %145
  %152 = load double, ptr %18, align 8, !tbaa !19
  %153 = load double, ptr %20, align 8, !tbaa !19
  %154 = fcmp ogt double %152, %153
  br i1 %154, label %155, label %158

155:                                              ; preds = %151
  %156 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %156, ptr %14, align 4, !tbaa !5
  %157 = load double, ptr %18, align 8, !tbaa !19
  store double %157, ptr %20, align 8, !tbaa !19
  br label %158

158:                                              ; preds = %155, %151
  br label %159

159:                                              ; preds = %158, %148
  br label %160

160:                                              ; preds = %159, %112
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %8, align 4, !tbaa !5
  br label %91, !llvm.loop !21

164:                                              ; preds = %91
  store i32 -1, ptr %11, align 4, !tbaa !5
  store i32 -1, ptr %12, align 4, !tbaa !5
  %165 = load ptr, ptr %6, align 8, !tbaa !9
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sub nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds %struct.MATRIX, ptr %165, i64 %168
  %170 = getelementptr inbounds %struct.MATRIX, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !20
  %172 = sub nsw i32 %171, 1
  store i32 %172, ptr %8, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %201, %164
  %174 = load i32, ptr %8, align 4, !tbaa !5
  %175 = icmp sgt i32 %174, 2
  br i1 %175, label %176, label %204

176:                                              ; preds = %173
  %177 = load ptr, ptr %6, align 8, !tbaa !9
  %178 = load i32, ptr %5, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds %struct.MATRIX, ptr %177, i64 %179
  %181 = getelementptr inbounds %struct.MATRIX, ptr %180, i32 0, i32 5
  %182 = load i32, ptr %8, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [500 x i32], ptr %181, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = icmp eq i32 %185, 0
  br i1 %186, label %187, label %188

187:                                              ; preds = %176
  br label %200

188:                                              ; preds = %176
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = icmp eq i32 %189, -1
  br i1 %190, label %191, label %193

191:                                              ; preds = %188
  %192 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %192, ptr %11, align 4, !tbaa !5
  br label %199

193:                                              ; preds = %188
  %194 = load i32, ptr %12, align 4, !tbaa !5
  %195 = icmp eq i32 %194, -1
  br i1 %195, label %196, label %198

196:                                              ; preds = %193
  %197 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %197, ptr %12, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %196, %193
  br label %199

199:                                              ; preds = %198, %191
  br label %200

200:                                              ; preds = %199, %187
  br label %201

201:                                              ; preds = %200
  %202 = load i32, ptr %8, align 4, !tbaa !5
  %203 = add nsw i32 %202, -1
  store i32 %203, ptr %8, align 4, !tbaa !5
  br label %173, !llvm.loop !23

204:                                              ; preds = %173
  %205 = load double, ptr %19, align 8, !tbaa !19
  %206 = fcmp une double %205, 0.000000e+00
  br i1 %206, label %207, label %215

207:                                              ; preds = %204
  %208 = load double, ptr %20, align 8, !tbaa !19
  %209 = load double, ptr %19, align 8, !tbaa !19
  %210 = fdiv double %208, %209
  %211 = load i32, ptr %7, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %212
  %214 = getelementptr inbounds %struct.BS_DVDQ, ptr %213, i32 0, i32 1
  store double %210, ptr %214, align 8, !tbaa !16
  br label %220

215:                                              ; preds = %204
  %216 = load i32, ptr %7, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.BS_DVDQ, ptr %218, i32 0, i32 1
  store double 0.000000e+00, ptr %219, align 8, !tbaa !16
  br label %220

220:                                              ; preds = %215, %207
  br label %221

221:                                              ; preds = %220, %53
  %222 = load i32, ptr %10, align 4, !tbaa !5
  %223 = icmp sge i32 %222, 0
  br i1 %223, label %224, label %238

224:                                              ; preds = %221
  %225 = load ptr, ptr %6, align 8, !tbaa !9
  %226 = load i32, ptr %5, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds %struct.MATRIX, ptr %225, i64 %227
  %229 = getelementptr inbounds %struct.MATRIX, ptr %228, i32 0, i32 7
  %230 = load i32, ptr %10, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [500 x [200 x ptr]], ptr %229, i64 0, i64 %231
  %233 = load i32, ptr %7, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [200 x ptr], ptr %232, i64 0, i64 %234
  %236 = load ptr, ptr %235, align 8, !tbaa !9
  %237 = call double @atof(ptr noundef %236) #9
  store double %237, ptr %18, align 8, !tbaa !19
  br label %239

238:                                              ; preds = %221
  store double 0.000000e+00, ptr %18, align 8, !tbaa !19
  br label %239

239:                                              ; preds = %238, %224
  %240 = load double, ptr %18, align 8, !tbaa !19
  %241 = fcmp une double %240, 0.000000e+00
  br i1 %241, label %242, label %281

242:                                              ; preds = %239
  %243 = load ptr, ptr %6, align 8, !tbaa !9
  %244 = load i32, ptr %5, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %struct.MATRIX, ptr %243, i64 %245
  %247 = getelementptr inbounds %struct.MATRIX, ptr %246, i32 0, i32 7
  %248 = load i32, ptr %11, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [500 x [200 x ptr]], ptr %247, i64 0, i64 %249
  %251 = load i32, ptr %7, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [200 x ptr], ptr %250, i64 0, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !9
  %255 = call double @atof(ptr noundef %254) #9
  %256 = load double, ptr %18, align 8, !tbaa !19
  %257 = fdiv double %255, %256
  %258 = load i32, ptr %7, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %259
  %261 = getelementptr inbounds %struct.BS_DVDQ, ptr %260, i32 0, i32 2
  store double %257, ptr %261, align 16, !tbaa !17
  %262 = load ptr, ptr %6, align 8, !tbaa !9
  %263 = load i32, ptr %5, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds %struct.MATRIX, ptr %262, i64 %264
  %266 = getelementptr inbounds %struct.MATRIX, ptr %265, i32 0, i32 7
  %267 = load i32, ptr %12, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [500 x [200 x ptr]], ptr %266, i64 0, i64 %268
  %270 = load i32, ptr %7, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [200 x ptr], ptr %269, i64 0, i64 %271
  %273 = load ptr, ptr %272, align 8, !tbaa !9
  %274 = call double @atof(ptr noundef %273) #9
  %275 = load double, ptr %18, align 8, !tbaa !19
  %276 = fdiv double %274, %275
  %277 = load i32, ptr %7, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %278
  %280 = getelementptr inbounds %struct.BS_DVDQ, ptr %279, i32 0, i32 3
  store double %276, ptr %280, align 8, !tbaa !18
  br label %290

281:                                              ; preds = %239
  %282 = load i32, ptr %7, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %283
  %285 = getelementptr inbounds %struct.BS_DVDQ, ptr %284, i32 0, i32 2
  store double 0.000000e+00, ptr %285, align 16, !tbaa !17
  %286 = load i32, ptr %7, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %287
  %289 = getelementptr inbounds %struct.BS_DVDQ, ptr %288, i32 0, i32 3
  store double 0.000000e+00, ptr %289, align 8, !tbaa !18
  br label %290

290:                                              ; preds = %281, %242
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %7, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %7, align 4, !tbaa !5
  br label %49, !llvm.loop !24

294:                                              ; preds = %49
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %306, %294
  %296 = load i32, ptr %7, align 4, !tbaa !5
  %297 = load i32, ptr %9, align 4, !tbaa !5
  %298 = sub nsw i32 %297, 2
  %299 = icmp slt i32 %296, %298
  br i1 %299, label %300, label %309

300:                                              ; preds = %295
  %301 = load i32, ptr %7, align 4, !tbaa !5
  %302 = add nsw i32 %301, 2
  %303 = load i32, ptr %7, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [166 x i32], ptr @temp_dvdq1, i64 0, i64 %304
  store i32 %302, ptr %305, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %300
  %307 = load i32, ptr %7, align 4, !tbaa !5
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %7, align 4, !tbaa !5
  br label %295, !llvm.loop !25

309:                                              ; preds = %295
  %310 = load i32, ptr %9, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = sub i64 %311, 2
  call void @qsort(ptr noundef @temp_dvdq1, i64 noundef %312, i64 noundef 4, ptr noundef @compare_dvdq1)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %313

313:                                              ; preds = %324, %309
  %314 = load i32, ptr %7, align 4, !tbaa !5
  %315 = load i32, ptr %9, align 4, !tbaa !5
  %316 = sub nsw i32 %315, 2
  %317 = icmp slt i32 %314, %316
  br i1 %317, label %318, label %327

318:                                              ; preds = %313
  %319 = load i32, ptr %7, align 4, !tbaa !5
  %320 = add nsw i32 %319, 2
  %321 = load i32, ptr %7, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [166 x i32], ptr @temp_dvdq2, i64 0, i64 %322
  store i32 %320, ptr %323, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %318
  %325 = load i32, ptr %7, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %7, align 4, !tbaa !5
  br label %313, !llvm.loop !26

327:                                              ; preds = %313
  %328 = load i32, ptr %9, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = sub i64 %329, 2
  call void @qsort(ptr noundef @temp_dvdq2, i64 noundef %330, i64 noundef 4, ptr noundef @compare_dvdq2)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %331

331:                                              ; preds = %342, %327
  %332 = load i32, ptr %7, align 4, !tbaa !5
  %333 = load i32, ptr %9, align 4, !tbaa !5
  %334 = sub nsw i32 %333, 2
  %335 = icmp slt i32 %332, %334
  br i1 %335, label %336, label %345

336:                                              ; preds = %331
  %337 = load i32, ptr %7, align 4, !tbaa !5
  %338 = add nsw i32 %337, 2
  %339 = load i32, ptr %7, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [166 x i32], ptr @temp_dvdq3, i64 0, i64 %340
  store i32 %338, ptr %341, align 4, !tbaa !5
  br label %342

342:                                              ; preds = %336
  %343 = load i32, ptr %7, align 4, !tbaa !5
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %7, align 4, !tbaa !5
  br label %331, !llvm.loop !27

345:                                              ; preds = %331
  %346 = load i32, ptr %9, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = sub i64 %347, 2
  call void @qsort(ptr noundef @temp_dvdq3, i64 noundef %348, i64 noundef 4, ptr noundef @compare_dvdq3)
  %349 = load ptr, ptr @caselog_fp, align 8, !tbaa !9
  %350 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %349, ptr noundef @.str.95) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %351

351:                                              ; preds = %401, %345
  %352 = load i32, ptr %7, align 4, !tbaa !5
  %353 = load i32, ptr %9, align 4, !tbaa !5
  %354 = sub nsw i32 %353, 2
  %355 = icmp slt i32 %352, %354
  br i1 %355, label %356, label %404

356:                                              ; preds = %351
  %357 = load i32, ptr %7, align 4, !tbaa !5
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds [166 x i32], ptr @temp_dvdq1, i64 0, i64 %358
  %360 = load i32, ptr %359, align 4, !tbaa !5
  store i32 %360, ptr %15, align 4, !tbaa !5
  %361 = load i32, ptr %7, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [166 x i32], ptr @temp_dvdq2, i64 0, i64 %362
  %364 = load i32, ptr %363, align 4, !tbaa !5
  store i32 %364, ptr %16, align 4, !tbaa !5
  %365 = load i32, ptr %7, align 4, !tbaa !5
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [166 x i32], ptr @temp_dvdq3, i64 0, i64 %366
  %368 = load i32, ptr %367, align 4, !tbaa !5
  store i32 %368, ptr %17, align 4, !tbaa !5
  %369 = load ptr, ptr @caselog_fp, align 8, !tbaa !9
  %370 = load i32, ptr %15, align 4, !tbaa !5
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %371
  %373 = getelementptr inbounds %struct.BS_DVDQ, ptr %372, i32 0, i32 0
  %374 = load ptr, ptr %373, align 16, !tbaa !13
  %375 = load i32, ptr %15, align 4, !tbaa !5
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %376
  %378 = getelementptr inbounds %struct.BS_DVDQ, ptr %377, i32 0, i32 1
  %379 = load double, ptr %378, align 8, !tbaa !16
  %380 = load i32, ptr %16, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %381
  %383 = getelementptr inbounds %struct.BS_DVDQ, ptr %382, i32 0, i32 0
  %384 = load ptr, ptr %383, align 16, !tbaa !13
  %385 = load i32, ptr %16, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %386
  %388 = getelementptr inbounds %struct.BS_DVDQ, ptr %387, i32 0, i32 2
  %389 = load double, ptr %388, align 16, !tbaa !17
  %390 = load i32, ptr %17, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %391
  %393 = getelementptr inbounds %struct.BS_DVDQ, ptr %392, i32 0, i32 0
  %394 = load ptr, ptr %393, align 16, !tbaa !13
  %395 = load i32, ptr %17, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %396
  %398 = getelementptr inbounds %struct.BS_DVDQ, ptr %397, i32 0, i32 3
  %399 = load double, ptr %398, align 8, !tbaa !18
  %400 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %369, ptr noundef @.str.96, ptr noundef %374, double noundef %379, ptr noundef %384, double noundef %389, ptr noundef %394, double noundef %399) #7
  br label %401

401:                                              ; preds = %356
  %402 = load i32, ptr %7, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %7, align 4, !tbaa !5
  br label %351, !llvm.loop !28

404:                                              ; preds = %351
  call void @llvm.lifetime.end.p0(i64 13, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret i32 0
}

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #6

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq1(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq2(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq3(ptr noundef, ptr noundef) #5

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

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

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


; 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.CRIT = type { i32, [60 x i8], [60 x i8], [60 x i8], [60 x i8] }
%struct.BS_DVDQ = type { ptr, double, double, double }
%struct.MATRIX = type { i32, i32, i32, i32, [200 x i32], [500 x i32], [3 x [60 x i8]], [500 x [200 x ptr]] }

@stderr = external local_unnamed_addr global ptr, align 8
@caselog_fp = external dso_local local_unnamed_addr global ptr, align 8
@critical = external dso_local global [200 x %struct.CRIT], align 16
@.str.92 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [46 x i8], align 1
@bus_dvdq = external dso_local local_unnamed_addr global [66 x %struct.BS_DVDQ], align 16
@temp_dvdq1 = external dso_local global [166 x i32], align 16
@temp_dvdq2 = external dso_local global [166 x i32], align 16
@temp_dvdq3 = external dso_local global [166 x i32], align 16
@.str.95 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @analyze_dvdq(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #3 {
  switch i32 %1, label %12 [
    i32 1, label %4
    i32 5, label %7
  ]

4:                                                ; preds = %3
  %5 = load ptr, ptr @caselog_fp, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.92) #6
  br label %15

7:                                                ; preds = %3
  %8 = load ptr, ptr @caselog_fp, align 8, !tbaa !5
  %9 = sext i32 %0 to i64
  %10 = getelementptr inbounds [200 x %struct.CRIT], ptr @critical, i64 0, i64 %9, i32 3
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.93, ptr noundef nonnull %10) #6
  br label %15

12:                                               ; preds = %3
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.94) #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

15:                                               ; preds = %7, %4
  %16 = zext nneg i32 %1 to i64
  %17 = getelementptr inbounds %struct.MATRIX, ptr %2, i64 %16
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = icmp sgt i32 %19, 2
  br i1 %20, label %.lr.ph177, label %.preheader.thread

.preheader.thread:                                ; preds = %15
  %21 = add i32 %19, -2
  br label %._crit_edge180.thread

.lr.ph177:                                        ; preds = %15
  %22 = getelementptr inbounds i8, ptr %17, i64 3000
  %23 = getelementptr inbounds i8, ptr %17, i64 6200
  %24 = getelementptr inbounds i8, ptr %17, i64 16
  %25 = getelementptr i8, ptr %17, i64 -803000
  %26 = getelementptr inbounds i8, ptr %17, i64 816
  %wide.trip.count201 = zext nneg i32 %19 to i64
  br label %33

.preheader:                                       ; preds = %95
  %27 = add nsw i32 %19, -2
  br i1 %20, label %.lr.ph179.preheader, label %._crit_edge180.thread

.lr.ph179.preheader:                              ; preds = %.preheader
  %wide.trip.count206 = zext nneg i32 %27 to i64
  %min.iters.check = icmp ult i32 %27, 8
  br i1 %min.iters.check, label %.lr.ph179.preheader270, label %vector.ph

.lr.ph179.preheader270:                           ; preds = %middle.block, %.lr.ph179.preheader
  %indvars.iv203.ph = phi i64 [ 0, %.lr.ph179.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph179

vector.ph:                                        ; preds = %.lr.ph179.preheader
  %n.vec = and i64 %wide.trip.count206, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %28 = getelementptr inbounds [166 x i32], ptr @temp_dvdq1, i64 0, i64 %index
  %29 = add <4 x i32> %vec.ind, <i32 2, i32 2, i32 2, i32 2>
  %30 = add <4 x i32> %vec.ind, <i32 6, i32 6, i32 6, i32 6>
  %31 = getelementptr inbounds i8, ptr %28, i64 16
  store <4 x i32> %29, ptr %28, align 16, !tbaa !12
  store <4 x i32> %30, ptr %31, align 16, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %32 = icmp eq i64 %index.next, %n.vec
  br i1 %32, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count206
  br i1 %cmp.n, label %._crit_edge180, label %.lr.ph179.preheader270

33:                                               ; preds = %.lr.ph177, %95
  %indvars.iv198 = phi i64 [ 2, %.lr.ph177 ], [ %indvars.iv.next199, %95 ]
  %34 = getelementptr inbounds [200 x ptr], ptr %23, i64 0, i64 %indvars.iv198
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %indvars.iv198
  store ptr %35, ptr %36, align 16, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = getelementptr inbounds i8, ptr %36, i64 16
  %39 = getelementptr inbounds i8, ptr %36, i64 24
  %40 = getelementptr inbounds [200 x i32], ptr %24, i64 0, i64 %indvars.iv198
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %37, i8 0, i64 24, i1 false)
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %.preheader157, label %.thread147

.preheader157:                                    ; preds = %33
  %43 = load i32, ptr %25, align 8, !tbaa !20
  %44 = icmp sgt i32 %43, 3
  br i1 %44, label %.lr.ph.preheader, label %.thread147

.lr.ph.preheader:                                 ; preds = %.preheader157
  %wide.trip.count = zext nneg i32 %43 to i64
  br label %.lr.ph

.preheader156:                                    ; preds = %64
  br i1 %44, label %.lr.ph172.preheader, label %._crit_edge

.lr.ph172.preheader:                              ; preds = %.preheader156
  %45 = zext nneg i32 %43 to i64
  br label %.lr.ph172

.lr.ph:                                           ; preds = %.lr.ph.preheader, %64
  %indvars.iv = phi i64 [ 3, %.lr.ph.preheader ], [ %indvars.iv.next, %64 ]
  %.0164 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %.1, %64 ]
  %.0110163 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %.2, %64 ]
  %.0118161 = phi i32 [ -1, %.lr.ph.preheader ], [ %.2120, %64 ]
  %.0122160 = phi i32 [ -1, %.lr.ph.preheader ], [ %.1123, %64 ]
  %.0124159 = phi i32 [ -1, %.lr.ph.preheader ], [ %.2126, %64 ]
  %46 = getelementptr inbounds [500 x i32], ptr %26, i64 0, i64 %indvars.iv
  %47 = load i32, ptr %46, align 4, !tbaa !12
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %64, label %49

49:                                               ; preds = %.lr.ph
  %50 = getelementptr inbounds [500 x [200 x ptr]], ptr %22, i64 0, i64 %indvars.iv, i64 %indvars.iv198
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = tail call double @atof(ptr noundef %51) #9
  %53 = icmp eq i32 %.0118161, -1
  %54 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %53, i32 %54, i32 %.0118161
  %55 = icmp eq i32 %.0124159, -1
  br i1 %55, label %59, label %56

56:                                               ; preds = %49
  %57 = fcmp olt double %52, %.0110163
  br i1 %57, label %58, label %59

58:                                               ; preds = %56
  br label %59

59:                                               ; preds = %49, %56, %58
  %.1125 = phi i32 [ %54, %58 ], [ %.0124159, %56 ], [ %54, %49 ]
  %.1111 = phi double [ %52, %58 ], [ %.0110163, %56 ], [ %52, %49 ]
  %60 = icmp eq i32 %.0122160, -1
  br i1 %60, label %64, label %61

61:                                               ; preds = %59
  %62 = fcmp ogt double %52, %.0164
  br i1 %62, label %63, label %64

63:                                               ; preds = %61
  br label %64

64:                                               ; preds = %59, %.lr.ph, %61, %63
  %.2126 = phi i32 [ %.0124159, %.lr.ph ], [ %.1125, %63 ], [ %.1125, %61 ], [ %.1125, %59 ]
  %.1123 = phi i32 [ %.0122160, %.lr.ph ], [ %54, %63 ], [ %.0122160, %61 ], [ %54, %59 ]
  %.2120 = phi i32 [ %.0118161, %.lr.ph ], [ %spec.select, %63 ], [ %spec.select, %61 ], [ %spec.select, %59 ]
  %.2 = phi double [ %.0110163, %.lr.ph ], [ %.1111, %63 ], [ %.1111, %61 ], [ %.1111, %59 ]
  %.1 = phi double [ %.0164, %.lr.ph ], [ %52, %63 ], [ %.0164, %61 ], [ %52, %59 ]
  %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 %.preheader156, label %.lr.ph, !llvm.loop !21

.lr.ph172:                                        ; preds = %.lr.ph172.preheader, %73
  %indvars.iv195 = phi i64 [ %45, %.lr.ph172.preheader ], [ %indvars.iv.next196, %73 ]
  %.1128170 = phi i32 [ -1, %.lr.ph172.preheader ], [ %.2129, %73 ]
  %.1132169 = phi i32 [ -1, %.lr.ph172.preheader ], [ %.2133, %73 ]
  %indvars.iv.next196 = add nsw i64 %indvars.iv195, -1
  %65 = getelementptr inbounds [500 x i32], ptr %26, i64 0, i64 %indvars.iv.next196
  %66 = load i32, ptr %65, align 4, !tbaa !12
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %73, label %68

68:                                               ; preds = %.lr.ph172
  %69 = icmp eq i32 %.1132169, -1
  %70 = trunc nuw nsw i64 %indvars.iv.next196 to i32
  br i1 %69, label %73, label %71

71:                                               ; preds = %68
  %72 = icmp eq i32 %.1128170, -1
  %spec.select141 = select i1 %72, i32 %70, i32 %.1128170
  br label %73

73:                                               ; preds = %71, %68, %.lr.ph172
  %.2133 = phi i32 [ %.1132169, %.lr.ph172 ], [ %70, %68 ], [ %.1132169, %71 ]
  %.2129 = phi i32 [ %.1128170, %.lr.ph172 ], [ %.1128170, %68 ], [ %spec.select141, %71 ]
  %74 = icmp ugt i64 %indvars.iv195, 4
  br i1 %74, label %.lr.ph172, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %73, %.preheader156
  %.1132.lcssa = phi i32 [ -1, %.preheader156 ], [ %.2133, %73 ]
  %.1128.lcssa = phi i32 [ -1, %.preheader156 ], [ %.2129, %73 ]
  %75 = fcmp une double %.2, 0.000000e+00
  %76 = fdiv double %.1, %.2
  %storemerge155 = select i1 %75, double %76, double 0.000000e+00
  store double %storemerge155, ptr %37, align 8, !tbaa !23
  %77 = icmp sgt i32 %.2120, -1
  br i1 %77, label %78, label %.thread147

78:                                               ; preds = %._crit_edge
  %79 = zext nneg i32 %.2120 to i64
  %80 = getelementptr inbounds [500 x [200 x ptr]], ptr %22, i64 0, i64 %79, i64 %indvars.iv198
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = tail call double @atof(ptr noundef %81) #9
  %83 = fcmp une double %82, 0.000000e+00
  br i1 %83, label %84, label %.thread147

84:                                               ; preds = %78
  %85 = sext i32 %.1132.lcssa to i64
  %86 = getelementptr inbounds [500 x [200 x ptr]], ptr %22, i64 0, i64 %85, i64 %indvars.iv198
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = tail call double @atof(ptr noundef %87) #9
  %89 = fdiv double %88, %82
  store double %89, ptr %38, align 16, !tbaa !24
  %90 = sext i32 %.1128.lcssa to i64
  %91 = getelementptr inbounds [500 x [200 x ptr]], ptr %22, i64 0, i64 %90, i64 %indvars.iv198
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = tail call double @atof(ptr noundef %92) #9
  %94 = fdiv double %93, %82
  br label %95

.thread147:                                       ; preds = %.preheader157, %33, %._crit_edge, %78
  store double 0.000000e+00, ptr %38, align 16, !tbaa !24
  br label %95

95:                                               ; preds = %84, %.thread147
  %storemerge = phi double [ 0.000000e+00, %.thread147 ], [ %94, %84 ]
  store double %storemerge, ptr %39, align 8, !tbaa !25
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %exitcond202.not = icmp eq i64 %indvars.iv.next199, %wide.trip.count201
  br i1 %exitcond202.not, label %.preheader, label %33, !llvm.loop !26

.lr.ph179:                                        ; preds = %.lr.ph179.preheader270, %.lr.ph179
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %.lr.ph179 ], [ %indvars.iv203.ph, %.lr.ph179.preheader270 ]
  %96 = getelementptr inbounds [166 x i32], ptr @temp_dvdq1, i64 0, i64 %indvars.iv203
  %97 = trunc i64 %indvars.iv203 to i32
  %98 = add i32 %97, 2
  store i32 %98, ptr %96, align 4, !tbaa !12
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %exitcond207.not = icmp eq i64 %indvars.iv.next204, %wide.trip.count206
  br i1 %exitcond207.not, label %._crit_edge180, label %.lr.ph179, !llvm.loop !27

._crit_edge180.thread:                            ; preds = %.preheader.thread, %.preheader
  %.ph = phi i32 [ %27, %.preheader ], [ %21, %.preheader.thread ]
  %99 = sext i32 %19 to i64
  %100 = add nsw i64 %99, -2
  tail call void @qsort(ptr noundef nonnull @temp_dvdq1, i64 noundef %100, i64 noundef 4, ptr noundef nonnull @compare_dvdq1) #6
  br label %._crit_edge185.thread

._crit_edge180:                                   ; preds = %.lr.ph179, %middle.block
  %101 = zext nneg i32 %19 to i64
  %102 = add nsw i64 %101, -2
  tail call void @qsort(ptr noundef nonnull @temp_dvdq1, i64 noundef %102, i64 noundef 4, ptr noundef nonnull @compare_dvdq1) #6
  br i1 %20, label %.lr.ph184.preheader, label %._crit_edge185.thread

.lr.ph184.preheader:                              ; preds = %._crit_edge180
  %wide.trip.count211 = zext nneg i32 %27 to i64
  %min.iters.check240 = icmp ult i32 %27, 8
  br i1 %min.iters.check240, label %.lr.ph184.preheader269, label %vector.ph241

vector.ph241:                                     ; preds = %.lr.ph184.preheader
  %n.vec243 = and i64 %wide.trip.count206, 2147483640
  br label %vector.body245

vector.body245:                                   ; preds = %vector.body245, %vector.ph241
  %index246 = phi i64 [ 0, %vector.ph241 ], [ %index.next251, %vector.body245 ]
  %vec.ind247 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph241 ], [ %vec.ind.next250, %vector.body245 ]
  %103 = getelementptr inbounds [166 x i32], ptr @temp_dvdq2, i64 0, i64 %index246
  %104 = add <4 x i32> %vec.ind247, <i32 2, i32 2, i32 2, i32 2>
  %105 = add <4 x i32> %vec.ind247, <i32 6, i32 6, i32 6, i32 6>
  %106 = getelementptr inbounds i8, ptr %103, i64 16
  store <4 x i32> %104, ptr %103, align 16, !tbaa !12
  store <4 x i32> %105, ptr %106, align 16, !tbaa !12
  %index.next251 = add nuw i64 %index246, 8
  %vec.ind.next250 = add <4 x i32> %vec.ind247, <i32 8, i32 8, i32 8, i32 8>
  %107 = icmp eq i64 %index.next251, %n.vec243
  br i1 %107, label %middle.block238, label %vector.body245, !llvm.loop !28

middle.block238:                                  ; preds = %vector.body245
  %cmp.n252 = icmp eq i64 %n.vec243, %wide.trip.count206
  br i1 %cmp.n252, label %._crit_edge185, label %.lr.ph184.preheader269

.lr.ph184.preheader269:                           ; preds = %middle.block238, %.lr.ph184.preheader
  %indvars.iv208.ph = phi i64 [ 0, %.lr.ph184.preheader ], [ %n.vec243, %middle.block238 ]
  br label %.lr.ph184

.lr.ph184:                                        ; preds = %.lr.ph184.preheader269, %.lr.ph184
  %indvars.iv208 = phi i64 [ %indvars.iv.next209, %.lr.ph184 ], [ %indvars.iv208.ph, %.lr.ph184.preheader269 ]
  %108 = getelementptr inbounds [166 x i32], ptr @temp_dvdq2, i64 0, i64 %indvars.iv208
  %109 = trunc i64 %indvars.iv208 to i32
  %110 = add i32 %109, 2
  store i32 %110, ptr %108, align 4, !tbaa !12
  %indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
  %exitcond212.not = icmp eq i64 %indvars.iv.next209, %wide.trip.count211
  br i1 %exitcond212.not, label %._crit_edge185, label %.lr.ph184, !llvm.loop !29

._crit_edge185.thread:                            ; preds = %._crit_edge180.thread, %._crit_edge180
  %.ph235 = phi i64 [ %102, %._crit_edge180 ], [ %100, %._crit_edge180.thread ]
  %.ph236 = phi i32 [ %27, %._crit_edge180 ], [ %.ph, %._crit_edge180.thread ]
  tail call void @qsort(ptr noundef nonnull @temp_dvdq2, i64 noundef %.ph235, i64 noundef 4, ptr noundef nonnull @compare_dvdq2) #6
  br label %._crit_edge189

._crit_edge185:                                   ; preds = %.lr.ph184, %middle.block238
  tail call void @qsort(ptr noundef nonnull @temp_dvdq2, i64 noundef %102, i64 noundef 4, ptr noundef nonnull @compare_dvdq2) #6
  br i1 %20, label %.lr.ph188.preheader, label %._crit_edge189

.lr.ph188.preheader:                              ; preds = %._crit_edge185
  %wide.trip.count216 = zext nneg i32 %27 to i64
  %min.iters.check255 = icmp ult i32 %27, 8
  br i1 %min.iters.check255, label %.lr.ph188.preheader268, label %vector.ph256

vector.ph256:                                     ; preds = %.lr.ph188.preheader
  %n.vec258 = and i64 %wide.trip.count206, 2147483640
  br label %vector.body260

vector.body260:                                   ; preds = %vector.body260, %vector.ph256
  %index261 = phi i64 [ 0, %vector.ph256 ], [ %index.next266, %vector.body260 ]
  %vec.ind262 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph256 ], [ %vec.ind.next265, %vector.body260 ]
  %111 = getelementptr inbounds [166 x i32], ptr @temp_dvdq3, i64 0, i64 %index261
  %112 = add <4 x i32> %vec.ind262, <i32 2, i32 2, i32 2, i32 2>
  %113 = add <4 x i32> %vec.ind262, <i32 6, i32 6, i32 6, i32 6>
  %114 = getelementptr inbounds i8, ptr %111, i64 16
  store <4 x i32> %112, ptr %111, align 16, !tbaa !12
  store <4 x i32> %113, ptr %114, align 16, !tbaa !12
  %index.next266 = add nuw i64 %index261, 8
  %vec.ind.next265 = add <4 x i32> %vec.ind262, <i32 8, i32 8, i32 8, i32 8>
  %115 = icmp eq i64 %index.next266, %n.vec258
  br i1 %115, label %middle.block253, label %vector.body260, !llvm.loop !30

middle.block253:                                  ; preds = %vector.body260
  %cmp.n267 = icmp eq i64 %n.vec258, %wide.trip.count206
  br i1 %cmp.n267, label %._crit_edge189, label %.lr.ph188.preheader268

.lr.ph188.preheader268:                           ; preds = %middle.block253, %.lr.ph188.preheader
  %indvars.iv213.ph = phi i64 [ 0, %.lr.ph188.preheader ], [ %n.vec258, %middle.block253 ]
  br label %.lr.ph188

.lr.ph188:                                        ; preds = %.lr.ph188.preheader268, %.lr.ph188
  %indvars.iv213 = phi i64 [ %indvars.iv.next214, %.lr.ph188 ], [ %indvars.iv213.ph, %.lr.ph188.preheader268 ]
  %116 = getelementptr inbounds [166 x i32], ptr @temp_dvdq3, i64 0, i64 %indvars.iv213
  %117 = trunc i64 %indvars.iv213 to i32
  %118 = add i32 %117, 2
  store i32 %118, ptr %116, align 4, !tbaa !12
  %indvars.iv.next214 = add nuw nsw i64 %indvars.iv213, 1
  %exitcond217.not = icmp eq i64 %indvars.iv.next214, %wide.trip.count216
  br i1 %exitcond217.not, label %._crit_edge189, label %.lr.ph188, !llvm.loop !31

._crit_edge189:                                   ; preds = %.lr.ph188, %middle.block253, %._crit_edge185.thread, %._crit_edge185
  %119 = phi i32 [ %.ph236, %._crit_edge185.thread ], [ %27, %._crit_edge185 ], [ %27, %middle.block253 ], [ %27, %.lr.ph188 ]
  %120 = phi i64 [ %.ph235, %._crit_edge185.thread ], [ %102, %._crit_edge185 ], [ %102, %middle.block253 ], [ %102, %.lr.ph188 ]
  tail call void @qsort(ptr noundef nonnull @temp_dvdq3, i64 noundef %120, i64 noundef 4, ptr noundef nonnull @compare_dvdq3) #6
  %121 = load ptr, ptr @caselog_fp, align 8, !tbaa !5
  %122 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef nonnull @.str.95) #6
  br i1 %20, label %.lr.ph192.preheader, label %._crit_edge193

.lr.ph192.preheader:                              ; preds = %._crit_edge189
  %wide.trip.count221 = zext i32 %119 to i64
  br label %.lr.ph192

.lr.ph192:                                        ; preds = %.lr.ph192.preheader, %.lr.ph192
  %indvars.iv218 = phi i64 [ 0, %.lr.ph192.preheader ], [ %indvars.iv.next219, %.lr.ph192 ]
  %123 = getelementptr inbounds [166 x i32], ptr @temp_dvdq1, i64 0, i64 %indvars.iv218
  %124 = load i32, ptr %123, align 4, !tbaa !12
  %125 = getelementptr inbounds [166 x i32], ptr @temp_dvdq2, i64 0, i64 %indvars.iv218
  %126 = load i32, ptr %125, align 4, !tbaa !12
  %127 = getelementptr inbounds [166 x i32], ptr @temp_dvdq3, i64 0, i64 %indvars.iv218
  %128 = load i32, ptr %127, align 4, !tbaa !12
  %129 = load ptr, ptr @caselog_fp, align 8, !tbaa !5
  %130 = sext i32 %124 to i64
  %131 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %130
  %132 = load ptr, ptr %131, align 16, !tbaa !17
  %133 = getelementptr inbounds i8, ptr %131, i64 8
  %134 = load double, ptr %133, align 8, !tbaa !23
  %135 = sext i32 %126 to i64
  %136 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %135
  %137 = load ptr, ptr %136, align 16, !tbaa !17
  %138 = getelementptr inbounds i8, ptr %136, i64 16
  %139 = load double, ptr %138, align 16, !tbaa !24
  %140 = sext i32 %128 to i64
  %141 = getelementptr inbounds [66 x %struct.BS_DVDQ], ptr @bus_dvdq, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 16, !tbaa !17
  %143 = getelementptr inbounds i8, ptr %141, i64 24
  %144 = load double, ptr %143, align 8, !tbaa !25
  %145 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef nonnull @.str.96, ptr noundef %132, double noundef %134, ptr noundef %137, double noundef %139, ptr noundef %142, double noundef %144) #6
  %indvars.iv.next219 = add nuw nsw i64 %indvars.iv218, 1
  %exitcond222.not = icmp eq i64 %indvars.iv.next219, %wide.trip.count221
  br i1 %exitcond222.not, label %._crit_edge193, label %.lr.ph192, !llvm.loop !32

._crit_edge193:                                   ; preds = %.lr.ph192, %._crit_edge189
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq1(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq2(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @compare_dvdq3(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

!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 4}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !7, i64 16, !7, i64 816, !7, i64 2816, !7, i64 3000}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = !{!18, !6, i64 0}
!18 = !{!"", !6, i64 0, !19, i64 8, !19, i64 16, !19, i64 24}
!19 = !{!"double", !7, i64 0}
!20 = !{!10, !11, i64 0}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = !{!18, !19, i64 8}
!24 = !{!18, !19, i64 16}
!25 = !{!18, !19, i64 24}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14, !16, !15}
!28 = distinct !{!28, !14, !15, !16}
!29 = distinct !{!29, !14, !16, !15}
!30 = distinct !{!30, !14, !15, !16}
!31 = distinct !{!31, !14, !16, !15}
!32 = distinct !{!32, !14}


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