; LLVM IR from tangjz/acm-icpc :: hdu/4785.ll (Z5solvev)

; 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.Point = type { double, double }
%struct.Line = type { %struct.Point, %struct.Point }
%struct.Event = type { i32, %struct.Point }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@etot = external dso_local global i32, align 4
@sz = external dso_local global [41 x i32], align 16
@p = external dso_local global [41 x [41 x %struct.Point]], align 16
@seg = external dso_local global [901 x %struct.Line], align 16
@eve = external dso_local global [1803 x %struct.Event], align 16
@_ZZ5solvevE3ins = external hidden global [3 x %struct.Point], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Line, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.Line, align 8
  %10 = alloca %struct.Point, align 8
  %11 = alloca %struct.Event, align 8
  %12 = alloca %struct.Event, align 8
  %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 %struct.Point, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.Point, align 8
  %21 = alloca %struct.Point, align 8
  %22 = alloca %struct.Line, align 8
  %23 = alloca %struct.Point, align 8
  %24 = alloca %struct.Point, align 8
  %25 = alloca %struct.Event, align 8
  %26 = alloca %struct.Event, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store i32 0, ptr @etot, align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %89, %0
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %92

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %85, %35
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp slt i32 %42, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %41
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %88

49:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %51
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [41 x %struct.Point], ptr %52, i64 0, i64 %54
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %57
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [41 x %struct.Point], ptr %58, i64 0, i64 %60
  %62 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %61)
  %63 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  %64 = extractvalue { double, double } %62, 0
  store double %64, ptr %63, align 8
  %65 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  %66 = extractvalue { double, double } %62, 1
  store double %66, ptr %65, align 8
  %67 = getelementptr inbounds %struct.Point, ptr %5, i32 0, i32 0
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = call noundef i32 @_Z3sgnd(double noundef %68)
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %84

71:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #6
  %72 = getelementptr inbounds %struct.Line, ptr %6, i32 0, i32 0
  %73 = load i32, ptr %1, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %74
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [41 x %struct.Point], ptr %75, i64 0, i64 %77
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 16 %78, i64 16, i1 false), !tbaa.struct !12
  %79 = getelementptr inbounds %struct.Line, ptr %6, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %79, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !12
  %80 = load i32, ptr @m, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr @m, align 4, !tbaa !5
  %82 = sext i32 %80 to i64
  %83 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %82
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %83, ptr align 8 %6, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  br label %84

84:                                               ; preds = %71, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %4, align 4, !tbaa !5
  store i32 %86, ptr %3, align 4, !tbaa !5
  br label %41, !llvm.loop !15

88:                                               ; preds = %48
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %1, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %1, align 4, !tbaa !5
  br label %30, !llvm.loop !17

92:                                               ; preds = %34
  %93 = load i32, ptr @m, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.Line, ptr @seg, i64 %94
  call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef @seg, ptr noundef %95)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 0.000000e+00, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %411, %92
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = load i32, ptr @m, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %412

101:                                              ; preds = %96
  store i32 0, ptr @etot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 16 %104, i64 32, i1 false), !tbaa.struct !14
  br label %105

105:                                              ; preds = %166, %101
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = load i32, ptr @m, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  br i1 %108, label %109, label %134

109:                                              ; preds = %105
  %110 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 1
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %112
  %114 = getelementptr inbounds %struct.Line, ptr %113, i32 0, i32 1
  %115 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(16) %114)
  %116 = call noundef i32 @_Z3sgnd(double noundef %115)
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %134, label %118

118:                                              ; preds = %109
  %119 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 1
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.Line, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 0
  %125 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %127 = extractvalue { double, double } %125, 0
  store double %127, ptr %126, align 8
  %128 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %129 = extractvalue { double, double } %125, 1
  store double %129, ptr %128, align 8
  %130 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %119, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %131 = call noundef i32 @_Z3sgnd(double noundef %130)
  %132 = icmp ne i32 %131, 0
  %133 = xor i1 %132, true
  br label %134

134:                                              ; preds = %118, %109, %105
  %135 = phi i1 [ false, %109 ], [ false, %105 ], [ %133, %118 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br i1 %135, label %136, label %169

136:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %137 = getelementptr inbounds %struct.Event, ptr %11, i32 0, i32 0
  store i32 0, ptr %137, align 8, !tbaa !18
  %138 = getelementptr inbounds %struct.Event, ptr %11, i32 0, i32 1
  %139 = load i32, ptr %8, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %140
  %142 = getelementptr inbounds %struct.Line, ptr %141, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %138, ptr align 16 %142, i64 16, i1 false), !tbaa.struct !12
  %143 = load i32, ptr @etot, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr @etot, align 4, !tbaa !5
  %145 = sext i32 %143 to i64
  %146 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %145
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %146, ptr align 8 %11, i64 24, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %147 = getelementptr inbounds %struct.Event, ptr %12, i32 0, i32 0
  store i32 1, ptr %147, align 8, !tbaa !18
  %148 = getelementptr inbounds %struct.Event, ptr %12, i32 0, i32 1
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %150
  %152 = getelementptr inbounds %struct.Line, ptr %151, i32 0, i32 0
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.Line, ptr %155, i32 0, i32 1
  %157 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %152, ptr noundef nonnull align 8 dereferenceable(16) %156)
  %158 = getelementptr inbounds { double, double }, ptr %148, i32 0, i32 0
  %159 = extractvalue { double, double } %157, 0
  store double %159, ptr %158, align 8
  %160 = getelementptr inbounds { double, double }, ptr %148, i32 0, i32 1
  %161 = extractvalue { double, double } %157, 1
  store double %161, ptr %160, align 8
  %162 = load i32, ptr @etot, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr @etot, align 4, !tbaa !5
  %164 = sext i32 %162 to i64
  %165 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %164
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 8 %12, i64 24, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  br label %166

166:                                              ; preds = %136
  %167 = load i32, ptr %8, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %8, align 4, !tbaa !5
  br label %105, !llvm.loop !21

169:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %338, %169
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = load i32, ptr @n, align 4, !tbaa !5
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 13, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %341

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %176 = load i32, ptr %13, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sub nsw i32 %179, 1
  store i32 %180, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %181 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %183
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [41 x %struct.Point], ptr %184, i64 0, i64 %186
  %188 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 0
  %189 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %187, ptr noundef nonnull align 8 dereferenceable(16) %188)
  %190 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %191 = extractvalue { double, double } %189, 0
  store double %191, ptr %190, align 8
  %192 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %193 = extractvalue { double, double } %189, 1
  store double %193, ptr %192, align 8
  %194 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %181, ptr noundef nonnull align 8 dereferenceable(16) %18)
  %195 = call noundef i32 @_Z3sgnd(double noundef %194)
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  store i32 %195, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  br label %196

196:                                              ; preds = %310, %175
  %197 = load i32, ptr %14, align 4, !tbaa !5
  %198 = icmp sle i32 %197, 2
  br i1 %198, label %199, label %206

199:                                              ; preds = %196
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = load i32, ptr %13, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = icmp slt i32 %200, %204
  br label %206

206:                                              ; preds = %199, %196
  %207 = phi i1 [ false, %196 ], [ %205, %199 ]
  br i1 %207, label %209, label %208

208:                                              ; preds = %206
  store i32 16, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %314

209:                                              ; preds = %206
  %210 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  %211 = load i32, ptr %13, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %212
  %214 = load i32, ptr %16, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [41 x %struct.Point], ptr %213, i64 0, i64 %215
  %217 = getelementptr inbounds %struct.Line, ptr %9, i32 0, i32 0
  %218 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %216, ptr noundef nonnull align 8 dereferenceable(16) %217)
  %219 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %220 = extractvalue { double, double } %218, 0
  store double %220, ptr %219, align 8
  %221 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %222 = extractvalue { double, double } %218, 1
  store double %222, ptr %221, align 8
  %223 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %210, ptr noundef nonnull align 8 dereferenceable(16) %20)
  %224 = call noundef i32 @_Z3sgnd(double noundef %223)
  store i32 %224, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  %225 = load i32, ptr %17, align 4, !tbaa !5
  %226 = load i32, ptr %19, align 4, !tbaa !5
  %227 = mul nsw i32 %225, %226
  %228 = icmp slt i32 %227, 0
  br i1 %228, label %229, label %291

229:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  %230 = getelementptr inbounds %struct.Line, ptr %22, i32 0, i32 0
  %231 = load i32, ptr %13, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %232
  %234 = load i32, ptr %15, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [41 x %struct.Point], ptr %233, i64 0, i64 %235
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %230, ptr align 16 %236, i64 16, i1 false), !tbaa.struct !12
  %237 = getelementptr inbounds %struct.Line, ptr %22, i32 0, i32 1
  %238 = load i32, ptr %13, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %239
  %241 = load i32, ptr %16, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [41 x %struct.Point], ptr %240, i64 0, i64 %242
  %244 = load i32, ptr %13, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %245
  %247 = load i32, ptr %15, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [41 x %struct.Point], ptr %246, i64 0, i64 %248
  %250 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %243, ptr noundef nonnull align 8 dereferenceable(16) %249)
  %251 = getelementptr inbounds { double, double }, ptr %237, i32 0, i32 0
  %252 = extractvalue { double, double } %250, 0
  store double %252, ptr %251, align 8
  %253 = getelementptr inbounds { double, double }, ptr %237, i32 0, i32 1
  %254 = extractvalue { double, double } %250, 1
  store double %254, ptr %253, align 8
  %255 = call { double, double } @_ZNK4Line12intersectionERKS_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %22)
  %256 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %257 = extractvalue { double, double } %255, 0
  store double %257, ptr %256, align 8
  %258 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %259 = extractvalue { double, double } %255, 1
  store double %259, ptr %258, align 8
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %260 = load i32, ptr %13, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %261
  %263 = load i32, ptr %15, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [41 x %struct.Point], ptr %262, i64 0, i64 %264
  %266 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %265, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %267 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %268 = extractvalue { double, double } %266, 0
  store double %268, ptr %267, align 8
  %269 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %270 = extractvalue { double, double } %266, 1
  store double %270, ptr %269, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  %271 = load i32, ptr %13, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %272
  %274 = load i32, ptr %16, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [41 x %struct.Point], ptr %273, i64 0, i64 %275
  %277 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %276, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %278 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %279 = extractvalue { double, double } %277, 0
  store double %279, ptr %278, align 8
  %280 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %281 = extractvalue { double, double } %277, 1
  store double %281, ptr %280, align 8
  %282 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %283 = call noundef i32 @_Z3sgnd(double noundef %282)
  %284 = icmp sle i32 %283, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br i1 %284, label %285, label %290

285:                                              ; preds = %229
  %286 = load i32, ptr %14, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %14, align 4, !tbaa !5
  %288 = sext i32 %286 to i64
  %289 = getelementptr inbounds [3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 %288
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %289, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !12
  br label %290

290:                                              ; preds = %285, %229
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  br label %309

291:                                              ; preds = %209
  %292 = load i32, ptr %17, align 4, !tbaa !5
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %308

294:                                              ; preds = %291
  %295 = load i32, ptr %19, align 4, !tbaa !5
  %296 = icmp eq i32 %295, 0
  br i1 %296, label %297, label %308

297:                                              ; preds = %294
  %298 = load i32, ptr %13, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %299
  %301 = load i32, ptr %16, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [41 x %struct.Point], ptr %300, i64 0, i64 %302
  %304 = load i32, ptr %14, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %14, align 4, !tbaa !5
  %306 = sext i32 %304 to i64
  %307 = getelementptr inbounds [3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 %306
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %307, ptr align 16 %303, i64 16, i1 false), !tbaa.struct !12
  br label %308

308:                                              ; preds = %297, %294, %291
  br label %309

309:                                              ; preds = %308, %290
  br label %310

310:                                              ; preds = %309
  %311 = load i32, ptr %16, align 4, !tbaa !5
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %16, align 4, !tbaa !5
  store i32 %311, ptr %15, align 4, !tbaa !5
  %313 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %313, ptr %17, align 4, !tbaa !5
  br label %196, !llvm.loop !22

314:                                              ; preds = %208
  %315 = load i32, ptr %14, align 4, !tbaa !5
  %316 = icmp eq i32 %315, 2
  br i1 %316, label %317, label %337

317:                                              ; preds = %314
  %318 = load double, ptr @_ZZ5solvevE3ins, align 16, !tbaa !9
  %319 = load double, ptr getelementptr inbounds ([3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 1), align 16, !tbaa !9
  %320 = fsub double %318, %319
  %321 = call noundef i32 @_Z3sgnd(double noundef %320)
  %322 = icmp sgt i32 %321, 0
  br i1 %322, label %323, label %324

323:                                              ; preds = %317
  call void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5solvevE3ins, ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 1)) #6
  br label %324

324:                                              ; preds = %323, %317
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #6
  %325 = getelementptr inbounds %struct.Event, ptr %25, i32 0, i32 0
  store i32 2, ptr %325, align 8, !tbaa !18
  %326 = getelementptr inbounds %struct.Event, ptr %25, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %326, ptr align 16 @_ZZ5solvevE3ins, i64 16, i1 false), !tbaa.struct !12
  %327 = load i32, ptr @etot, align 4, !tbaa !5
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr @etot, align 4, !tbaa !5
  %329 = sext i32 %327 to i64
  %330 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %329
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %330, ptr align 8 %25, i64 24, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  %331 = getelementptr inbounds %struct.Event, ptr %26, i32 0, i32 0
  store i32 3, ptr %331, align 8, !tbaa !18
  %332 = getelementptr inbounds %struct.Event, ptr %26, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %332, ptr align 16 getelementptr inbounds ([3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 1), i64 16, i1 false), !tbaa.struct !12
  %333 = load i32, ptr @etot, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr @etot, align 4, !tbaa !5
  %335 = sext i32 %333 to i64
  %336 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %335
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %336, ptr align 8 %26, i64 24, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br label %337

337:                                              ; preds = %324, %314
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %13, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %13, align 4, !tbaa !5
  br label %170, !llvm.loop !23

341:                                              ; preds = %174
  %342 = load i32, ptr @etot, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds %struct.Event, ptr @eve, i64 %343
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef @eve, ptr noundef %344)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %345

345:                                              ; preds = %408, %341
  %346 = load i32, ptr %27, align 4, !tbaa !5
  %347 = load i32, ptr @etot, align 4, !tbaa !5
  %348 = icmp slt i32 %346, %347
  br i1 %348, label %350, label %349

349:                                              ; preds = %345
  store i32 19, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %411

350:                                              ; preds = %345
  %351 = load i32, ptr %28, align 4, !tbaa !5
  %352 = icmp ne i32 %351, 0
  br i1 %352, label %353, label %389

353:                                              ; preds = %350
  %354 = load i32, ptr %29, align 4, !tbaa !5
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %389, label %356

356:                                              ; preds = %353
  %357 = load i32, ptr %27, align 4, !tbaa !5
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %358
  %360 = getelementptr inbounds %struct.Event, ptr %359, i32 0, i32 1
  %361 = getelementptr inbounds %struct.Point, ptr %360, i32 0, i32 1
  %362 = load double, ptr %361, align 8, !tbaa !24
  %363 = load i32, ptr %27, align 4, !tbaa !5
  %364 = sub nsw i32 %363, 1
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %365
  %367 = getelementptr inbounds %struct.Event, ptr %366, i32 0, i32 1
  %368 = getelementptr inbounds %struct.Point, ptr %367, i32 0, i32 1
  %369 = load double, ptr %368, align 8, !tbaa !24
  %370 = fadd double %362, %369
  %371 = load i32, ptr %27, align 4, !tbaa !5
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %372
  %374 = getelementptr inbounds %struct.Event, ptr %373, i32 0, i32 1
  %375 = getelementptr inbounds %struct.Point, ptr %374, i32 0, i32 0
  %376 = load double, ptr %375, align 8, !tbaa !25
  %377 = load i32, ptr %27, align 4, !tbaa !5
  %378 = sub nsw i32 %377, 1
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %379
  %381 = getelementptr inbounds %struct.Event, ptr %380, i32 0, i32 1
  %382 = getelementptr inbounds %struct.Point, ptr %381, i32 0, i32 0
  %383 = load double, ptr %382, align 8, !tbaa !25
  %384 = fsub double %376, %383
  %385 = fmul double %370, %384
  %386 = fdiv double %385, 2.000000e+00
  %387 = load double, ptr %7, align 8, !tbaa !13
  %388 = fadd double %387, %386
  store double %388, ptr %7, align 8, !tbaa !13
  br label %389

389:                                              ; preds = %356, %353, %350
  %390 = load i32, ptr %27, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %391
  %393 = getelementptr inbounds %struct.Event, ptr %392, i32 0, i32 0
  %394 = load i32, ptr %393, align 8, !tbaa !18
  switch i32 %394, label %407 [
    i32 0, label %395
    i32 1, label %398
    i32 2, label %401
    i32 3, label %404
  ]

395:                                              ; preds = %389
  %396 = load i32, ptr %28, align 4, !tbaa !5
  %397 = add nsw i32 %396, 1
  store i32 %397, ptr %28, align 4, !tbaa !5
  br label %407

398:                                              ; preds = %389
  %399 = load i32, ptr %28, align 4, !tbaa !5
  %400 = add nsw i32 %399, -1
  store i32 %400, ptr %28, align 4, !tbaa !5
  br label %407

401:                                              ; preds = %389
  %402 = load i32, ptr %29, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %29, align 4, !tbaa !5
  br label %407

404:                                              ; preds = %389
  %405 = load i32, ptr %29, align 4, !tbaa !5
  %406 = add nsw i32 %405, -1
  store i32 %406, ptr %29, align 4, !tbaa !5
  br label %407

407:                                              ; preds = %404, %401, %398, %395, %389
  br label %408

408:                                              ; preds = %407
  %409 = load i32, ptr %27, align 4, !tbaa !5
  %410 = add nsw i32 %409, 1
  store i32 %410, ptr %27, align 4, !tbaa !5
  br label %345, !llvm.loop !26

411:                                              ; preds = %349
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %96, !llvm.loop !27

412:                                              ; preds = %100
  %413 = load double, ptr %7, align 8, !tbaa !13
  store i32 1, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret double %413
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) #3

; 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) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4LineEvT_S2_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4Line12intersectionERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP5EventEvT_S2_(ptr noundef, ptr noundef) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS5Point", !11, i64 0, !11, i64 8}
!11 = !{!"double", !7, i64 0}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!13 = !{!11, !11, i64 0}
!14 = !{i64 0, i64 8, !13, i64 8, i64 8, !13, i64 16, i64 8, !13, i64 24, i64 8, !13}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTS5Event", !6, i64 0, !10, i64 8}
!20 = !{i64 0, i64 4, !5, i64 8, i64 8, !13, i64 16, i64 8, !13}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = !{!19, !11, i64 16}
!25 = !{!19, !11, i64 8}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}


; 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.Point = type { double, double }
%struct.Line = type { %struct.Point, %struct.Point }
%struct.Event = type { i32, %struct.Point }

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@etot = external dso_local local_unnamed_addr global i32, align 4
@sz = external dso_local local_unnamed_addr global [41 x i32], align 16
@p = external dso_local global [41 x [41 x %struct.Point]], align 16
@seg = external dso_local global [901 x %struct.Line], align 16
@eve = external dso_local global [1803 x %struct.Event], align 16
@_ZZ5solvevE3ins = external hidden global [3 x %struct.Point], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca %struct.Line, align 8
  %2 = alloca %struct.Point, align 8
  %.sroa.455 = alloca [20 x i8], align 4
  %3 = alloca %struct.Point, align 8
  %4 = alloca %struct.Point, align 8
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Line, align 8
  %7 = alloca %struct.Point, align 8
  %8 = alloca %struct.Point, align 8
  %.sroa.419 = alloca [20 x i8], align 4
  %.sroa.4 = alloca [20 x i8], align 4
  store i32 0, ptr @etot, align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph108, label %._crit_edge109

._crit_edge109.loopexit:                          ; preds = %._crit_edge
  %.pre158 = load i32, ptr @m, align 4, !tbaa !5
  %11 = sext i32 %.pre158 to i64
  br label %._crit_edge109

._crit_edge109:                                   ; preds = %._crit_edge109.loopexit, %0
  %12 = phi i64 [ %11, %._crit_edge109.loopexit ], [ 0, %0 ]
  %13 = getelementptr inbounds %struct.Line, ptr @seg, i64 %12
  tail call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef nonnull @seg, ptr noundef nonnull %13)
  %14 = load i32, ptr @m, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %._crit_edge109
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  %.sroa.455.8.sroa_idx = getelementptr inbounds i8, ptr %.sroa.455, i64 4
  %18 = getelementptr inbounds i8, ptr %3, i64 8
  %19 = getelementptr inbounds i8, ptr %4, i64 8
  %20 = getelementptr inbounds i8, ptr %6, i64 16
  %21 = getelementptr inbounds i8, ptr %6, i64 24
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = getelementptr inbounds i8, ptr %7, i64 8
  %24 = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.419.8.sroa_idx = getelementptr inbounds i8, ptr %.sroa.419, i64 4
  %.sroa.4.8.sroa_idx = getelementptr inbounds i8, ptr %.sroa.4, i64 4
  br label %51

.lr.ph108:                                        ; preds = %0, %._crit_edge
  %25 = phi i32 [ %30, %._crit_edge ], [ %9, %0 ]
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %._crit_edge ], [ 0, %0 ]
  %26 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %indvars.iv140
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph108
  %29 = add nsw i32 %27, -1
  br label %.lr.ph

._crit_edge.loopexit:                             ; preds = %46
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph108
  %30 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %25, %.lr.ph108 ]
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next141, %31
  br i1 %32, label %.lr.ph108, label %._crit_edge109.loopexit, !llvm.loop !9

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %46 ]
  %.087105 = phi i32 [ %29, %.lr.ph.preheader ], [ %50, %46 ]
  %33 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %indvars.iv140, i64 %indvars.iv
  %34 = sext i32 %.087105 to i64
  %35 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %indvars.iv140, i64 %34
  %36 = tail call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = extractvalue { double, double } %36, 0
  %38 = tail call noundef i32 @_Z3sgnd(double noundef %37)
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %46

40:                                               ; preds = %.lr.ph
  %41 = extractvalue { double, double } %36, 1
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr @m, align 4, !tbaa !5
  %44 = sext i32 %42 to i64
  %45 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %44
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %45, ptr noundef nonnull align 16 dereferenceable(16) %35, i64 16, i1 false)
  %.sroa.469.0..sroa_idx = getelementptr inbounds i8, ptr %45, i64 16
  store double %37, ptr %.sroa.469.0..sroa_idx, align 16, !tbaa !11
  %.sroa.570.0..sroa_idx = getelementptr inbounds i8, ptr %45, i64 24
  store double %41, ptr %.sroa.570.0..sroa_idx, align 8, !tbaa !11
  br label %46

46:                                               ; preds = %40, %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %26, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  %50 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %49, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !13

._crit_edge135:                                   ; preds = %._crit_edge129, %._crit_edge109
  %.095.lcssa = phi double [ 0.000000e+00, %._crit_edge109 ], [ %.196.lcssa, %._crit_edge129 ]
  ret double %.095.lcssa

51:                                               ; preds = %.lr.ph134, %._crit_edge129
  %52 = phi i32 [ %14, %.lr.ph134 ], [ %165, %._crit_edge129 ]
  %.095132 = phi double [ 0.000000e+00, %.lr.ph134 ], [ %.196.lcssa, %._crit_edge129 ]
  %.098131 = phi i32 [ 0, %.lr.ph134 ], [ %.199102, %._crit_edge129 ]
  store i32 0, ptr @etot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  %53 = sext i32 %.098131 to i64
  %54 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %53
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 16 dereferenceable(32) %54, i64 32, i1 false), !tbaa.struct !14
  %55 = icmp slt i32 %.098131, %52
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  br i1 %55, label %.lr.ph112, label %.critedge

.lr.ph112:                                        ; preds = %51, %66
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %66 ], [ %53, %51 ]
  %56 = getelementptr inbounds [901 x %struct.Line], ptr @seg, i64 0, i64 %indvars.iv143
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %57)
  %59 = call noundef i32 @_Z3sgnd(double noundef %58)
  %.not = icmp eq i32 %59, 0
  br i1 %.not, label %60, label %.critedge.loopexit

60:                                               ; preds = %.lr.ph112
  %61 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %62 = extractvalue { double, double } %61, 0
  store double %62, ptr %2, align 8
  %63 = extractvalue { double, double } %61, 1
  store double %63, ptr %17, align 8
  %64 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %65 = call noundef i32 @_Z3sgnd(double noundef %64)
  %.not100 = icmp eq i32 %65, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br i1 %.not100, label %66, label %.loopexit.loopexit

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %.sroa.455)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %.sroa.455.8.sroa_idx, ptr noundef nonnull align 16 dereferenceable(16) %56, i64 16, i1 false), !tbaa.struct !15
  %67 = load i32, ptr @etot, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr @etot, align 4, !tbaa !5
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %69
  store i32 0, ptr %70, align 8, !tbaa !5
  %.sroa.455.0..sroa_idx = getelementptr inbounds i8, ptr %70, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %.sroa.455.0..sroa_idx, ptr noundef nonnull align 4 dereferenceable(20) %.sroa.455, i64 20, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %.sroa.455)
  %71 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %57)
  %72 = extractvalue { double, double } %71, 0
  %73 = extractvalue { double, double } %71, 1
  %74 = load i32, ptr @etot, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @etot, align 4, !tbaa !5
  %76 = sext i32 %74 to i64
  %77 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %76
  store i32 1, ptr %77, align 8, !tbaa !5
  %.sroa.453.0..sroa_idx = getelementptr inbounds i8, ptr %77, i64 8
  store double %72, ptr %.sroa.453.0..sroa_idx, align 8, !tbaa !11
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %77, i64 16
  store double %73, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !11
  %indvars.iv.next144 = add nsw i64 %indvars.iv143, 1
  %78 = load i32, ptr @m, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = icmp slt i64 %indvars.iv.next144, %79
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  br i1 %80, label %.lr.ph112, label %.critedge.loopexit, !llvm.loop !17

.critedge.loopexit:                               ; preds = %.lr.ph112, %66
  %indvars.iv143.lcssa.sink = phi i64 [ %indvars.iv.next144, %66 ], [ %indvars.iv143, %.lr.ph112 ]
  %81 = trunc i64 %indvars.iv143.lcssa.sink to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %51
  %.199.lcssa = phi i32 [ %.098131, %51 ], [ %81, %.critedge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %60
  %82 = trunc nsw i64 %indvars.iv143 to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.critedge
  %.199102 = phi i32 [ %.199.lcssa, %.critedge ], [ %82, %.loopexit.loopexit ]
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %.lr.ph121, label %._crit_edge122

._crit_edge122:                                   ; preds = %.critedge2.thread, %.loopexit
  %85 = load i32, ptr @etot, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.Event, ptr @eve, i64 %86
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef nonnull @eve, ptr noundef nonnull %87)
  %88 = load i32, ptr @etot, align 4, !tbaa !5
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.lr.ph128.preheader, label %._crit_edge129

.lr.ph128.preheader:                              ; preds = %._crit_edge122
  %wide.trip.count = zext nneg i32 %88 to i64
  br label %.lr.ph128

.lr.ph121:                                        ; preds = %.loopexit, %.critedge2.thread
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %.critedge2.thread ], [ 0, %.loopexit ]
  %90 = getelementptr inbounds [41 x i32], ptr @sz, i64 0, i64 %indvars.iv150
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = add nsw i32 %91, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %indvars.iv150, i64 %93
  %95 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %96 = extractvalue { double, double } %95, 0
  store double %96, ptr %3, align 8
  %97 = extractvalue { double, double } %95, 1
  store double %97, ptr %18, align 8
  %98 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %99 = call noundef i32 @_Z3sgnd(double noundef %98)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %100

100:                                              ; preds = %.lr.ph121, %144
  %indvars.iv146 = phi i64 [ 0, %.lr.ph121 ], [ %indvars.iv.next147, %144 ]
  %.088118 = phi i32 [ %99, %.lr.ph121 ], [ %111, %144 ]
  %.090116 = phi i32 [ %92, %.lr.ph121 ], [ %146, %144 ]
  %.091115 = phi i32 [ 0, %.lr.ph121 ], [ %.2, %144 ]
  %101 = load i32, ptr %90, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv146, %102
  br i1 %103, label %105, label %.critedge2

.critedge2:                                       ; preds = %100
  %104 = icmp eq i32 %.091115, 2
  br i1 %104, label %147, label %.critedge2.thread

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %106 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %indvars.iv150, i64 %indvars.iv146
  %107 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %108 = extractvalue { double, double } %107, 0
  store double %108, ptr %4, align 8
  %109 = extractvalue { double, double } %107, 1
  store double %109, ptr %19, align 8
  %110 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %111 = call noundef i32 @_Z3sgnd(double noundef %110)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  %112 = mul nsw i32 %111, %.088118
  %113 = icmp slt i32 %112, 0
  br i1 %113, label %114, label %137

114:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %115 = sext i32 %.090116 to i64
  %116 = getelementptr inbounds [41 x [41 x %struct.Point]], ptr @p, i64 0, i64 %indvars.iv150, i64 %115
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %116, i64 16, i1 false), !tbaa.struct !15
  %117 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 8 dereferenceable(16) %116)
  %118 = extractvalue { double, double } %117, 0
  store double %118, ptr %20, align 8
  %119 = extractvalue { double, double } %117, 1
  store double %119, ptr %21, align 8
  %120 = call { double, double } @_ZNK4Line12intersectionERKS_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %6)
  %121 = extractvalue { double, double } %120, 0
  store double %121, ptr %5, align 8
  %122 = extractvalue { double, double } %120, 1
  store double %122, ptr %22, align 8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %123 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %124 = extractvalue { double, double } %123, 0
  store double %124, ptr %7, align 8
  %125 = extractvalue { double, double } %123, 1
  store double %125, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %126 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %127 = extractvalue { double, double } %126, 0
  store double %127, ptr %8, align 8
  %128 = extractvalue { double, double } %126, 1
  store double %128, ptr %24, align 8
  %129 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %130 = call noundef i32 @_Z3sgnd(double noundef %129)
  %131 = icmp slt i32 %130, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br i1 %131, label %132, label %136

132:                                              ; preds = %114
  %133 = add nsw i32 %.091115, 1
  %134 = sext i32 %.091115 to i64
  %135 = getelementptr inbounds [3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 %134
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !15
  br label %136

136:                                              ; preds = %132, %114
  %.192 = phi i32 [ %133, %132 ], [ %.091115, %114 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %144

137:                                              ; preds = %105
  %138 = icmp ne i32 %.088118, 0
  %139 = icmp eq i32 %111, 0
  %or.cond = and i1 %138, %139
  br i1 %or.cond, label %140, label %144

140:                                              ; preds = %137
  %141 = add nsw i32 %.091115, 1
  %142 = sext i32 %.091115 to i64
  %143 = getelementptr inbounds [3 x %struct.Point], ptr @_ZZ5solvevE3ins, i64 0, i64 %142
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %143, ptr noundef nonnull align 16 dereferenceable(16) %106, i64 16, i1 false), !tbaa.struct !15
  br label %144

144:                                              ; preds = %136, %140, %137
  %.2 = phi i32 [ %.192, %136 ], [ %141, %140 ], [ %.091115, %137 ]
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %145 = icmp slt i32 %.2, 3
  %146 = trunc nuw nsw i64 %indvars.iv146 to i32
  br i1 %145, label %100, label %.critedge2.thread, !llvm.loop !18

147:                                              ; preds = %.critedge2
  %148 = load double, ptr @_ZZ5solvevE3ins, align 16, !tbaa !19
  %149 = load double, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3ins, i64 16), align 16, !tbaa !19
  %150 = fsub double %148, %149
  %151 = call noundef i32 @_Z3sgnd(double noundef %150)
  %152 = icmp sgt i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %147
  call void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5solvevE3ins, ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZ5solvevE3ins, i64 16)) #6
  br label %154

154:                                              ; preds = %153, %147
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %.sroa.419)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %.sroa.419.8.sroa_idx, ptr noundef nonnull align 16 dereferenceable(16) @_ZZ5solvevE3ins, i64 16, i1 false), !tbaa.struct !15
  %155 = load i32, ptr @etot, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  %157 = sext i32 %155 to i64
  %158 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %157
  store i32 2, ptr %158, align 8, !tbaa !5
  %.sroa.419.0..sroa_idx = getelementptr inbounds i8, ptr %158, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %.sroa.419.0..sroa_idx, ptr noundef nonnull align 4 dereferenceable(20) %.sroa.419, i64 20, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %.sroa.419)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %.sroa.4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %.sroa.4.8.sroa_idx, ptr noundef nonnull align 16 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZ5solvevE3ins, i64 16), i64 16, i1 false), !tbaa.struct !15
  %159 = add nsw i32 %155, 2
  store i32 %159, ptr @etot, align 4, !tbaa !5
  %160 = sext i32 %156 to i64
  %161 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %160
  store i32 3, ptr %161, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %161, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %.sroa.4.0..sroa_idx, ptr noundef nonnull align 4 dereferenceable(20) %.sroa.4, i64 20, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %.sroa.4)
  br label %.critedge2.thread

.critedge2.thread:                                ; preds = %144, %154, %.critedge2
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = icmp slt i64 %indvars.iv.next151, %163
  br i1 %164, label %.lr.ph121, label %._crit_edge122, !llvm.loop !21

._crit_edge129:                                   ; preds = %195, %._crit_edge122
  %.196.lcssa = phi double [ %.095132, %._crit_edge122 ], [ %.297, %195 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  %165 = load i32, ptr @m, align 4, !tbaa !5
  %166 = icmp slt i32 %.199102, %165
  br i1 %166, label %51, label %._crit_edge135, !llvm.loop !22

.lr.ph128:                                        ; preds = %.lr.ph128.preheader, %195
  %indvars.iv154 = phi i64 [ 0, %.lr.ph128.preheader ], [ %indvars.iv.next155, %195 ]
  %.0126 = phi i32 [ 0, %.lr.ph128.preheader ], [ %.1, %195 ]
  %.083125 = phi i32 [ 0, %.lr.ph128.preheader ], [ %.184, %195 ]
  %.196123 = phi double [ %.095132, %.lr.ph128.preheader ], [ %.297, %195 ]
  %167 = icmp eq i32 %.083125, 0
  %168 = icmp ne i32 %.0126, 0
  %or.cond5 = select i1 %167, i1 true, i1 %168
  br i1 %or.cond5, label %184, label %169

169:                                              ; preds = %.lr.ph128
  %170 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %indvars.iv154, i32 1
  %171 = getelementptr inbounds i8, ptr %170, i64 8
  %172 = load double, ptr %171, align 8, !tbaa !23
  %173 = add nsw i64 %indvars.iv154, -1
  %174 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %173, i32 1
  %175 = getelementptr inbounds i8, ptr %174, i64 8
  %176 = load double, ptr %175, align 8, !tbaa !23
  %177 = fadd double %172, %176
  %178 = load double, ptr %170, align 8, !tbaa !25
  %179 = load double, ptr %174, align 8, !tbaa !25
  %180 = fsub double %178, %179
  %181 = fmul double %177, %180
  %182 = fmul double %181, 5.000000e-01
  %183 = fadd double %.196123, %182
  br label %184

184:                                              ; preds = %169, %.lr.ph128
  %.297 = phi double [ %.196123, %.lr.ph128 ], [ %183, %169 ]
  %185 = getelementptr inbounds [1803 x %struct.Event], ptr @eve, i64 0, i64 %indvars.iv154
  %186 = load i32, ptr %185, align 8, !tbaa !26
  switch i32 %186, label %195 [
    i32 0, label %187
    i32 1, label %189
    i32 2, label %191
    i32 3, label %193
  ]

187:                                              ; preds = %184
  %188 = add nsw i32 %.083125, 1
  br label %195

189:                                              ; preds = %184
  %190 = add nsw i32 %.083125, -1
  br label %195

191:                                              ; preds = %184
  %192 = add nsw i32 %.0126, 1
  br label %195

193:                                              ; preds = %184
  %194 = add nsw i32 %.0126, -1
  br label %195

195:                                              ; preds = %184, %187, %189, %191, %193
  %.184 = phi i32 [ %.083125, %184 ], [ %.083125, %193 ], [ %.083125, %191 ], [ %190, %189 ], [ %188, %187 ]
  %.1 = phi i32 [ %.0126, %184 ], [ %194, %193 ], [ %192, %191 ], [ %.0126, %189 ], [ %.0126, %187 ]
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge129, label %.lr.ph128, !llvm.loop !27
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress 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) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4LineEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4Line12intersectionERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP5EventEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11, i64 24, i64 8, !11}
!15 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!16 = !{i64 4, i64 8, !11, i64 12, i64 8, !11}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !12, i64 0}
!20 = !{!"_ZTS5Point", !12, i64 0, !12, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!24, !12, i64 16}
!24 = !{!"_ZTS5Event", !6, i64 0, !20, i64 8}
!25 = !{!24, !12, i64 8}
!26 = !{!24, !6, i64 0}
!27 = distinct !{!27, !10}


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