; LLVM IR from tangjz/acm-icpc :: poj/2043.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 { i32, i32 }
%struct.Line = type { %struct.Point, %struct.Point }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE1a = external hidden global [101 x double], align 16
@_ZZ5solvevE1p = external hidden global [101 x %struct.Point], align 16
@_ZZ5solvevE1l = external hidden global [101 x %struct.Line], align 16
@_ZGVZ5solvevE1l = external hidden global i64, align 8
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE3seg = external hidden global [101 x %struct.Point], align 16
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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 %struct.Line, 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 double, align 8
  %17 = alloca double, align 8
  %18 = alloca %struct.Point, align 4
  %19 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  br label %20

20:                                               ; preds = %237, %0
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br label %26

26:                                               ; preds = %23, %20
  %27 = phi i1 [ false, %20 ], [ %25, %23 ]
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %240

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 2001, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 -2001, ptr %5, align 4, !tbaa !5
  %30 = load atomic i8, ptr @_ZGVZ5solvevE1l acquire, align 8
  %31 = icmp eq i8 %30, 0
  br i1 %31, label %32, label %42, !prof !9

32:                                               ; preds = %29
  %33 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ5solvevE1l) #3
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %42

35:                                               ; preds = %32
  br label %36

36:                                               ; preds = %38, %35
  %37 = phi ptr [ @_ZZ5solvevE1l, %35 ], [ %39, %38 ]
  invoke void @_ZN4LineC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %37)
          to label %38 unwind label %48

38:                                               ; preds = %36
  %39 = getelementptr inbounds %struct.Line, ptr %37, i64 1
  %40 = icmp eq ptr %39, getelementptr inbounds (%struct.Line, ptr @_ZZ5solvevE1l, i64 101)
  br i1 %40, label %41, label %36

41:                                               ; preds = %38
  call void @__cxa_guard_release(ptr @_ZGVZ5solvevE1l) #3
  br label %42

42:                                               ; preds = %41, %32, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %74, %42
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %52, label %47

47:                                               ; preds = %43
  store i32 4, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %77

48:                                               ; preds = %36
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ5solvevE1l) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %241

52:                                               ; preds = %43
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %54
  %56 = getelementptr inbounds %struct.Point, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.Point, ptr %59, i32 0, i32 1
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %56, ptr noundef %60)
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.Point, ptr %64, i32 0, i32 0
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr %4, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.Point, ptr %70, i32 0, i32 0
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %71)
  %73 = load i32, ptr %72, align 4, !tbaa !5
  store i32 %73, ptr %5, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %52
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !5
  br label %43, !llvm.loop !10

77:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %123, %77
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = load i32, ptr %1, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 7, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %126

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %85
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %92

89:                                               ; preds = %83
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  br label %95

92:                                               ; preds = %83
  %93 = load i32, ptr %1, align 4, !tbaa !5
  %94 = sub nsw i32 %93, 1
  br label %95

95:                                               ; preds = %92, %89
  %96 = phi i32 [ %91, %89 ], [ %94, %92 ]
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %97
  call void @_ZN4LineC2ERK5PointS2_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(8) %98)
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %101, ptr align 4 %10, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.Line, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.Point, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !13
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %122

109:                                              ; preds = %95
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %111
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.Line, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.Point, ptr %116, i32 0, i32 0
  %118 = call noundef double @_ZNK4Line4getYERKi(ptr noundef nonnull align 4 dereferenceable(16) %112, ptr noundef nonnull align 4 dereferenceable(4) %117)
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [101 x double], ptr @_ZZ5solvevE1a, i64 0, i64 %120
  store double %118, ptr %121, align 8, !tbaa !16
  br label %122

122:                                              ; preds = %109, %95
  br label %123

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

126:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %11, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %234, %126
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 10, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %237

134:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 -2001, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %195, %134
  %136 = load i32, ptr %15, align 4, !tbaa !5
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 13, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %198

140:                                              ; preds = %135
  %141 = load i32, ptr %15, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %142
  %144 = getelementptr inbounds %struct.Line, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %struct.Point, ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 16, !tbaa !19
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %149, label %194

149:                                              ; preds = %140
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = load i32, ptr %15, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %152
  %154 = getelementptr inbounds %struct.Line, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %struct.Point, ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 16, !tbaa !19
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Line, ptr %159, i32 0, i32 1
  %161 = getelementptr inbounds %struct.Point, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 8, !tbaa !13
  %163 = add nsw i32 %156, %162
  %164 = icmp sle i32 %150, %163
  br i1 %164, label %165, label %194

165:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %166 = load i32, ptr %15, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [101 x double], ptr @_ZZ5solvevE1a, i64 0, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !16
  store double %169, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %171
  %173 = call noundef double @_ZNK4Line4getYERKi(ptr noundef nonnull align 4 dereferenceable(16) %172, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %174 = load i32, ptr %15, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [101 x double], ptr @_ZZ5solvevE1a, i64 0, i64 %175
  store double %173, ptr %176, align 8, !tbaa !16
  store double %173, ptr %17, align 8, !tbaa !16
  %177 = load double, ptr %17, align 8, !tbaa !16
  %178 = load double, ptr %16, align 8, !tbaa !16
  %179 = fcmp olt double %177, %178
  br i1 %179, label %180, label %181

180:                                              ; preds = %165
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  br label %181

181:                                              ; preds = %180, %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %182 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 0
  %183 = load double, ptr %16, align 8, !tbaa !16
  %184 = call double @llvm.floor.f64(double %183)
  %185 = fptosi double %184 to i32
  store i32 %185, ptr %182, align 4, !tbaa !20
  %186 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %187 = load double, ptr %17, align 8, !tbaa !16
  %188 = call double @llvm.ceil.f64(double %187)
  %189 = fptosi double %188 to i32
  store i32 %189, ptr %186, align 4, !tbaa !21
  %190 = load i32, ptr %12, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %12, align 4, !tbaa !5
  %192 = sext i32 %190 to i64
  %193 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %192
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %193, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %194

194:                                              ; preds = %181, %149, %140
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %15, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %15, align 4, !tbaa !5
  br label %135, !llvm.loop !23

198:                                              ; preds = %139
  %199 = load i32, ptr %12, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds %struct.Point, ptr @_ZZ5solvevE3seg, i64 %200
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef @_ZZ5solvevE3seg, ptr noundef %201)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %230, %198
  %203 = load i32, ptr %19, align 4, !tbaa !5
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  store i32 16, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %233

207:                                              ; preds = %202
  %208 = load i32, ptr %19, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %209
  %211 = getelementptr inbounds %struct.Point, ptr %210, i32 0, i32 0
  %212 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %211)
  %213 = load i32, ptr %212, align 4, !tbaa !5
  store i32 %213, ptr %13, align 4, !tbaa !5
  %214 = load i32, ptr %19, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %215
  %217 = getelementptr inbounds %struct.Point, ptr %216, i32 0, i32 1
  %218 = load i32, ptr %19, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %220
  %222 = getelementptr inbounds %struct.Point, ptr %221, i32 0, i32 1
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %217, ptr noundef nonnull align 4 dereferenceable(4) %222)
  %224 = load i32, ptr %223, align 4, !tbaa !5
  store i32 %224, ptr %14, align 4, !tbaa !5
  %225 = load i32, ptr %14, align 4, !tbaa !5
  %226 = load i32, ptr %13, align 4, !tbaa !5
  %227 = sub nsw i32 %225, %226
  %228 = load i32, ptr %3, align 4, !tbaa !5
  %229 = add nsw i32 %228, %227
  store i32 %229, ptr %3, align 4, !tbaa !5
  br label %230

230:                                              ; preds = %207
  %231 = load i32, ptr %19, align 4, !tbaa !5
  %232 = add nsw i32 %231, 2
  store i32 %232, ptr %19, align 4, !tbaa !5
  br label %202, !llvm.loop !24

233:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %11, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %11, align 4, !tbaa !5
  br label %129, !llvm.loop !25

237:                                              ; preds = %133
  %238 = load i32, ptr %3, align 4, !tbaa !5
  %239 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %238)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %20, !llvm.loop !26

240:                                              ; preds = %28
  ret void

241:                                              ; preds = %48
  %242 = load ptr, ptr %6, align 8
  %243 = load i32, ptr %7, align 4
  %244 = insertvalue { ptr, i32 } poison, ptr %242, 0
  %245 = insertvalue { ptr, i32 } %244, i32 %243, 1
  resume { ptr, i32 } %245
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4LineC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4LineC2ERK5PointS2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 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) #6

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #7

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

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

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 = { "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 }
attributes #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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" }

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS4Line", !15, i64 0, !15, i64 8}
!15 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !11}
!19 = !{!14, !6, i64 0}
!20 = !{!15, !6, i64 0}
!21 = !{!15, !6, i64 4}
!22 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE1a = external hidden local_unnamed_addr global [101 x double], align 16
@_ZZ5solvevE1p = external hidden global [101 x %struct.Point], align 16
@_ZZ5solvevE1l = external hidden global [101 x %struct.Line], align 16
@_ZGVZ5solvevE1l = external hidden global i64, align 8
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE3seg = external hidden global [101 x %struct.Point], align 16
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Line, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %10 = icmp eq i32 %9, 1
  %11 = load i32, ptr %1, align 4
  %12 = icmp ne i32 %11, 0
  %13 = select i1 %10, i1 %12, i1 false
  br i1 %13, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge68, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret void

.lr.ph71:                                         ; preds = %0, %._crit_edge68
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  store i32 2001, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 -2001, ptr %3, align 4, !tbaa !5
  %14 = load atomic i8, ptr @_ZGVZ5solvevE1l acquire, align 8
  %15 = icmp eq i8 %14, 0
  br i1 %15, label %16, label %20, !prof !9

16:                                               ; preds = %.lr.ph71
  %17 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ5solvevE1l) #9
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %20, label %.preheader47

.preheader47:                                     ; preds = %16, %.preheader47
  %.idx = phi i64 [ %.add, %.preheader47 ], [ 0, %16 ]
  %.ptr = getelementptr inbounds i8, ptr @_ZZ5solvevE1l, i64 %.idx
  call void @_ZN4LineC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %.ptr)
  %.add = add nuw nsw i64 %.idx, 16
  %18 = icmp eq i64 %.add, 1616
  br i1 %18, label %19, label %.preheader47

19:                                               ; preds = %.preheader47
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ5solvevE1l) #9
  br label %20

20:                                               ; preds = %19, %16, %.lr.ph71
  %21 = load i32, ptr %1, align 4
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %.lr.ph
  %23 = icmp sgt i32 %41, 0
  br i1 %23, label %.lr.ph50.preheader, label %._crit_edge

.lr.ph50.preheader:                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %24 = add nsw i32 %41, -1
  %25 = zext nneg i32 %24 to i64
  %26 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %25
  call void @_ZN4LineC2ERK5PointS2_(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(8) @_ZZ5solvevE1p, ptr noundef nonnull align 4 dereferenceable(8) %26)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) @_ZZ5solvevE1l, ptr noundef nonnull align 4 dereferenceable(16) %4, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1l, i64 8), align 8, !tbaa !11
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %29, label %31

29:                                               ; preds = %.lr.ph50.preheader
  %30 = call noundef double @_ZNK4Line4getYERKi(ptr noundef nonnull align 4 dereferenceable(16) @_ZZ5solvevE1l, ptr noundef nonnull align 4 dereferenceable(4) @_ZZ5solvevE1l)
  store double %30, ptr @_ZZ5solvevE1a, align 16, !tbaa !14
  br label %31

31:                                               ; preds = %29, %.lr.ph50.preheader
  %32 = load i32, ptr %1, align 4
  %33 = icmp sgt i32 %32, 1
  br i1 %33, label %.lr.ph50, label %._crit_edge

.lr.ph:                                           ; preds = %20, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %20 ]
  %34 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv
  %35 = getelementptr inbounds i8, ptr %34, i64 4
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %34, ptr noundef nonnull %35)
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr %2, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %3, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = load i32, ptr %1, align 4
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next, %42
  br i1 %43, label %.lr.ph, label %.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %56, %20, %31, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %storemerge.in62 = load i32, ptr %2, align 4, !tbaa !5
  %storemerge63 = add nsw i32 %storemerge.in62, 1
  store i32 %storemerge63, ptr %5, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %.not44.not64 = icmp slt i32 %storemerge.in62, %44
  br i1 %.not44.not64, label %.lr.ph67, label %._crit_edge68

.lr.ph50:                                         ; preds = %31, %56
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %56 ], [ 1, %31 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %45 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv74
  %46 = shl i64 %indvars.iv74, 32
  %sext = add i64 %46, -4294967296
  %47 = ashr exact i64 %sext, 32
  %48 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE1p, i64 0, i64 %47
  call void @_ZN4LineC2ERK5PointS2_(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(8) %45, ptr noundef nonnull align 4 dereferenceable(8) %48)
  %49 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %indvars.iv74
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(16) %4, i64 16, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !11
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %.lr.ph50
  %54 = call noundef double @_ZNK4Line4getYERKi(ptr noundef nonnull align 4 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(4) %49)
  %55 = getelementptr inbounds [101 x double], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv74
  store double %54, ptr %55, align 8, !tbaa !14
  br label %56

56:                                               ; preds = %.lr.ph50, %53
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %57 = load i32, ptr %1, align 4
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next75, %58
  br i1 %59, label %.lr.ph50, label %._crit_edge, !llvm.loop !18

._crit_edge68:                                    ; preds = %._crit_edge60, %._crit_edge
  %.035.lcssa = phi i32 [ 0, %._crit_edge ], [ %.1.lcssa, %._crit_edge60 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.035.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %62 = icmp eq i32 %61, 1
  %63 = load i32, ptr %1, align 4
  %64 = icmp ne i32 %63, 0
  %65 = select i1 %62, i1 %64, i1 false
  br i1 %65, label %.lr.ph71, label %._crit_edge72, !llvm.loop !20

.lr.ph67:                                         ; preds = %._crit_edge, %._crit_edge60
  %.03565 = phi i32 [ %.1.lcssa, %._crit_edge60 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 -2001, ptr %6, align 4, !tbaa !5
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph54, label %._crit_edge55.thread

._crit_edge55.thread:                             ; preds = %.lr.ph67
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef nonnull @_ZZ5solvevE3seg, ptr noundef nonnull @_ZZ5solvevE3seg)
  br label %._crit_edge60

._crit_edge55:                                    ; preds = %98
  %68 = sext i32 %.139 to i64
  %69 = getelementptr inbounds %struct.Point, ptr @_ZZ5solvevE3seg, i64 %68
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef nonnull @_ZZ5solvevE3seg, ptr noundef nonnull %69)
  %70 = icmp sgt i32 %.139, 0
  br i1 %70, label %.lr.ph59, label %._crit_edge60

.lr.ph54:                                         ; preds = %.lr.ph67, %98
  %71 = phi i32 [ %99, %98 ], [ %66, %.lr.ph67 ]
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %98 ], [ 0, %.lr.ph67 ]
  %.03851 = phi i32 [ %.139, %98 ], [ 0, %.lr.ph67 ]
  %72 = getelementptr inbounds [101 x %struct.Line], ptr @_ZZ5solvevE1l, i64 0, i64 %indvars.iv78
  %73 = load i32, ptr %72, align 16, !tbaa !21
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %76, label %98

76:                                               ; preds = %.lr.ph54
  %77 = getelementptr inbounds i8, ptr %72, i64 8
  %78 = load i32, ptr %77, align 8, !tbaa !11
  %79 = add nsw i32 %78, %73
  %.not45 = icmp sgt i32 %74, %79
  br i1 %.not45, label %98, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %81 = getelementptr inbounds [101 x double], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv78
  %82 = load double, ptr %81, align 8, !tbaa !14
  store double %82, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %83 = call noundef double @_ZNK4Line4getYERKi(ptr noundef nonnull align 4 dereferenceable(16) %72, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store double %83, ptr %81, align 8, !tbaa !14
  store double %83, ptr %8, align 8, !tbaa !14
  %84 = load double, ptr %7, align 8, !tbaa !14
  %85 = fcmp olt double %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %80
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  %.pre = load double, ptr %7, align 8, !tbaa !14
  %.pre84 = load double, ptr %8, align 8, !tbaa !14
  br label %87

87:                                               ; preds = %86, %80
  %88 = phi double [ %.pre84, %86 ], [ %83, %80 ]
  %89 = phi double [ %.pre, %86 ], [ %84, %80 ]
  %90 = call double @llvm.floor.f64(double %89)
  %91 = call double @llvm.ceil.f64(double %88)
  %92 = add nsw i32 %.03851, 1
  %93 = sext i32 %.03851 to i64
  %94 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %93
  %95 = insertelement <2 x double> poison, double %90, i64 0
  %96 = insertelement <2 x double> %95, double %91, i64 1
  %97 = fptosi <2 x double> %96 to <2 x i32>
  store <2 x i32> %97, ptr %94, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  %.pre85 = load i32, ptr %1, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %.lr.ph54, %76, %87
  %99 = phi i32 [ %.pre85, %87 ], [ %71, %76 ], [ %71, %.lr.ph54 ]
  %.139 = phi i32 [ %92, %87 ], [ %.03851, %76 ], [ %.03851, %.lr.ph54 ]
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next79, %100
  br i1 %101, label %.lr.ph54, label %._crit_edge55, !llvm.loop !22

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge55.thread, %._crit_edge55
  %.1.lcssa = phi i32 [ %.03565, %._crit_edge55 ], [ %.03565, %._crit_edge55.thread ], [ %112, %.lr.ph59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %storemerge.in = load i32, ptr %5, align 4, !tbaa !5
  %storemerge = add nsw i32 %storemerge.in, 1
  store i32 %storemerge, ptr %5, align 4, !tbaa !5
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %.not44.not = icmp slt i32 %storemerge.in, %102
  br i1 %.not44.not, label %.lr.ph67, label %._crit_edge68, !llvm.loop !23

.lr.ph59:                                         ; preds = %._crit_edge55, %.lr.ph59
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph59 ], [ 0, %._crit_edge55 ]
  %.156 = phi i32 [ %112, %.lr.ph59 ], [ %.03565, %._crit_edge55 ]
  %103 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %indvars.iv81
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %103)
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %103, i64 4
  %107 = or disjoint i64 %indvars.iv81, 1
  %108 = getelementptr inbounds [101 x %struct.Point], ptr @_ZZ5solvevE3seg, i64 0, i64 %107, i32 1
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %106, ptr noundef nonnull align 4 dereferenceable(4) %108)
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %6, align 4, !tbaa !5
  %111 = sub i32 %.156, %105
  %112 = add i32 %111, %110
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 2
  %113 = trunc nuw i64 %indvars.iv.next82 to i32
  %114 = icmp sgt i32 %.139, %113
  br i1 %114, label %.lr.ph59, label %._crit_edge60, !llvm.loop !24
}

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

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4LineC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4LineC2ERK5PointS2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #7

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

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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS4Line", !13, i64 0, !13, i64 8}
!13 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17, !19}
!19 = !{!"llvm.loop.peeled.count", i32 1}
!20 = distinct !{!20, !17}
!21 = !{!12, !6, i64 0}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass