; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/351 Division 1/Problem C (C)

; 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.convexHull = type { i8 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@t = external dso_local global [200100 x i32], align 16
@sum = external dso_local global [200100 x i64], align 16
@score = external dso_local global [200100 x x86_fp80], align 16
@inv = external dso_local global [200100 x x86_fp80], align 16
@dp = external dso_local global [200100 x [51 x x86_fp80]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.convexHull, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.convexHull, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %23, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = icmp sle i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %26

18:                                               ; preds = %13
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %20
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %21)
  br label %23

23:                                               ; preds = %18
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !9

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %82, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %85

32:                                               ; preds = %27
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sub nsw i32 %33, 1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = add nsw i64 %37, %42
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %45
  store i64 %43, ptr %46, align 8, !tbaa !11
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %49
  %51 = load x86_fp80, ptr %50, align 16, !tbaa !13
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sitofp i32 %55 to x86_fp80
  %57 = fdiv x86_fp80 0xK3FFF8000000000000000, %56
  %58 = fadd x86_fp80 %51, %57
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %60
  store x86_fp80 %58, ptr %61, align 16, !tbaa !13
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %64
  %66 = load x86_fp80, ptr %65, align 16, !tbaa !13
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !11
  %71 = sitofp i64 %70 to x86_fp80
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = sitofp i32 %75 to x86_fp80
  %77 = fdiv x86_fp80 %71, %76
  %78 = fadd x86_fp80 %66, %77
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %80
  store x86_fp80 %78, ptr %81, align 16, !tbaa !13
  br label %82

82:                                               ; preds = %32
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !15

85:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #8
  call void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %100, %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %89 = icmp sle i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %103

91:                                               ; preds = %86
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %93
  %95 = load x86_fp80, ptr %94, align 16, !tbaa !13
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %97
  %99 = getelementptr inbounds [51 x x86_fp80], ptr %98, i64 0, i64 1
  store x86_fp80 %95, ptr %99, align 16, !tbaa !13
  br label %100

100:                                              ; preds = %91
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %5, align 4, !tbaa !5
  br label %86, !llvm.loop !16

103:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %183, %103
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = load i32, ptr @k, align 4, !tbaa !5
  %107 = icmp sle i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %186

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  %110 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1) #9
  invoke void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %110)
          to label %111 unwind label %117

111:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %179, %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %121, label %116

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

117:                                              ; preds = %109
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %9, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %110, i64 noundef 1) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  br label %197

121:                                              ; preds = %112
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = icmp sge i32 %122, %123
  br i1 %124, label %125, label %142

125:                                              ; preds = %121
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %127
  %129 = load x86_fp80, ptr %128, align 16, !tbaa !13
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %131
  %133 = load x86_fp80, ptr %132, align 16, !tbaa !13
  %134 = call noundef x86_fp80 @_ZN10convexHull5queryEe(ptr noundef nonnull align 1 dereferenceable(1) %8, x86_fp80 noundef %133)
  %135 = fadd x86_fp80 %129, %134
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %137
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [51 x x86_fp80], ptr %138, i64 0, i64 %140
  store x86_fp80 %135, ptr %141, align 16, !tbaa !13
  br label %149

142:                                              ; preds = %121
  %143 = load i32, ptr %11, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %144
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [51 x x86_fp80], ptr %145, i64 0, i64 %147
  store x86_fp80 0xK403ADE0B6B3A76400000, ptr %148, align 16, !tbaa !13
  br label %149

149:                                              ; preds = %142, %125
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !11
  %154 = sub nsw i64 0, %153
  %155 = sitofp i64 %154 to x86_fp80
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %157
  %159 = load i32, ptr %6, align 4, !tbaa !5
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [51 x x86_fp80], ptr %158, i64 0, i64 %161
  %163 = load x86_fp80, ptr %162, align 16, !tbaa !13
  %164 = load i32, ptr %11, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %165
  %167 = load x86_fp80, ptr %166, align 16, !tbaa !13
  %168 = fsub x86_fp80 %163, %167
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %170
  %172 = load x86_fp80, ptr %171, align 16, !tbaa !13
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = sitofp i64 %176 to x86_fp80
  %178 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %172, x86_fp80 %177, x86_fp80 %168)
  call void @_ZN10convexHull6insertEee(ptr noundef nonnull align 1 dereferenceable(1) %8, x86_fp80 noundef %155, x86_fp80 noundef %178)
  br label %179

179:                                              ; preds = %149
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %11, align 4, !tbaa !5
  br label %112, !llvm.loop !17

182:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %6, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %6, align 4, !tbaa !5
  br label %104, !llvm.loop !18

186:                                              ; preds = %108
  %187 = load i32, ptr @n, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %188
  %190 = load i32, ptr @k, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [51 x x86_fp80], ptr %189, i64 0, i64 %191
  %193 = load x86_fp80, ptr %192, align 16, !tbaa !13
  %194 = fptrunc x86_fp80 %193 to double
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %194)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  %196 = load i32, ptr %1, align 4
  ret i32 %196

197:                                              ; preds = %117
  %198 = load ptr, ptr %9, align 8
  %199 = load i32, ptr %10, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZN10convexHull5queryEe(ptr noundef nonnull align 1 dereferenceable(1), x86_fp80 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10convexHull6insertEee(ptr noundef nonnull align 1 dereferenceable(1), x86_fp80 noundef, x86_fp80 noundef) #6 align 2

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

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

attributes #0 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"long long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long double", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; 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.convexHull = type { i8 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@t = external dso_local global [200100 x i32], align 16
@sum = external dso_local local_unnamed_addr global [200100 x i64], align 16
@score = external dso_local local_unnamed_addr global [200100 x x86_fp80], align 16
@inv = external dso_local local_unnamed_addr global [200100 x x86_fp80], align 16
@dp = external dso_local local_unnamed_addr global [200100 x [51 x x86_fp80]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.convexHull, align 1
  %2 = alloca %struct.convexHull, align 1
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not50 = icmp slt i32 %4, 1
  br i1 %.not50, label %._crit_edge, label %.lr.ph

.preheader48:                                     ; preds = %.lr.ph
  %.not4352 = icmp slt i32 %8, 1
  br i1 %.not4352, label %._crit_edge, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %.preheader48
  %5 = add nuw i32 %8, 1
  %wide.trip.count = zext i32 %5 to i64
  %.pre = load i64, ptr @sum, align 16, !tbaa !9
  %.pre86 = load x86_fp80, ptr @inv, align 16, !tbaa !11
  %.pre87 = load x86_fp80, ptr @score, align 16, !tbaa !11
  br label %.lr.ph54

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %6 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %indvars.iv
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %.not.not = icmp slt i64 %indvars.iv, %9
  br i1 %.not.not, label %.lr.ph, label %.preheader48, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph54, %0, %.preheader48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #7
  call void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %1)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not4455 = icmp slt i32 %10, 1
  br i1 %.not4455, label %.preheader, label %.lr.ph58.preheader

.lr.ph58.preheader:                               ; preds = %._crit_edge
  %11 = zext nneg i32 %10 to i64
  %xtraiter = and i64 %11, 3
  %12 = icmp ult i32 %10, 4
  br i1 %12, label %.preheader.loopexit.unr-lcssa, label %.lr.ph58.preheader.new

.lr.ph58.preheader.new:                           ; preds = %.lr.ph58.preheader
  %unroll_iter = and i64 %11, 2147483644
  br label %.lr.ph58

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %.lr.ph54
  %13 = phi x86_fp80 [ %.pre87, %.lr.ph54.preheader ], [ %27, %.lr.ph54 ]
  %14 = phi x86_fp80 [ %.pre86, %.lr.ph54.preheader ], [ %23, %.lr.ph54 ]
  %15 = phi i64 [ %.pre, %.lr.ph54.preheader ], [ %19, %.lr.ph54 ]
  %indvars.iv72 = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next73, %.lr.ph54 ]
  %16 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %indvars.iv72
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = add nsw i64 %15, %18
  %20 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %indvars.iv72
  store i64 %19, ptr %20, align 8, !tbaa !9
  %21 = sitofp i32 %17 to x86_fp80
  %22 = fdiv x86_fp80 0xK3FFF8000000000000000, %21
  %23 = fadd x86_fp80 %14, %22
  %24 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %indvars.iv72
  store x86_fp80 %23, ptr %24, align 16, !tbaa !11
  %25 = sitofp i64 %19 to x86_fp80
  %26 = fdiv x86_fp80 %25, %21
  %27 = fadd x86_fp80 %13, %26
  %28 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv72
  store x86_fp80 %27, ptr %28, align 16, !tbaa !11
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph54, !llvm.loop !15

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph58, %.lr.ph58.preheader
  %indvars.iv75.unr = phi i64 [ 1, %.lr.ph58.preheader ], [ %indvars.iv.next76.3, %.lr.ph58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph58.epil

.lr.ph58.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph58.epil
  %indvars.iv75.epil = phi i64 [ %indvars.iv.next76.epil, %.lr.ph58.epil ], [ %indvars.iv75.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph58.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %29 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv75.epil
  %30 = load x86_fp80, ptr %29, align 16, !tbaa !11
  %31 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv75.epil, i64 1
  store x86_fp80 %30, ptr %31, align 16, !tbaa !11
  %indvars.iv.next76.epil = add nuw nsw i64 %indvars.iv75.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph58.epil, !llvm.loop !16

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph58.epil, %._crit_edge
  %32 = load i32, ptr @k, align 4, !tbaa !5
  %.not4564 = icmp slt i32 %32, 2
  br i1 %.not4564, label %.preheader.._crit_edge67_crit_edge, label %.lr.ph66

.preheader.._crit_edge67_crit_edge:               ; preds = %.preheader
  %.pre88 = sext i32 %32 to i64
  br label %._crit_edge67

.lr.ph58:                                         ; preds = %.lr.ph58, %.lr.ph58.preheader.new
  %indvars.iv75 = phi i64 [ 1, %.lr.ph58.preheader.new ], [ %indvars.iv.next76.3, %.lr.ph58 ]
  %niter = phi i64 [ 0, %.lr.ph58.preheader.new ], [ %niter.next.3, %.lr.ph58 ]
  %33 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv75
  %34 = load x86_fp80, ptr %33, align 16, !tbaa !11
  %35 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv75, i64 1
  store x86_fp80 %34, ptr %35, align 16, !tbaa !11
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %36 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv.next76
  %37 = load x86_fp80, ptr %36, align 16, !tbaa !11
  %38 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv.next76, i64 1
  store x86_fp80 %37, ptr %38, align 16, !tbaa !11
  %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2
  %39 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv.next76.1
  %40 = load x86_fp80, ptr %39, align 16, !tbaa !11
  %41 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv.next76.1, i64 1
  store x86_fp80 %40, ptr %41, align 16, !tbaa !11
  %indvars.iv.next76.2 = add nuw nsw i64 %indvars.iv75, 3
  %42 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv.next76.2
  %43 = load x86_fp80, ptr %42, align 16, !tbaa !11
  %44 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv.next76.2, i64 1
  store x86_fp80 %43, ptr %44, align 16, !tbaa !11
  %indvars.iv.next76.3 = add nuw nsw i64 %indvars.iv75, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph58, !llvm.loop !18

._crit_edge67:                                    ; preds = %._crit_edge63, %.preheader.._crit_edge67_crit_edge
  %.pre-phi = phi i64 [ %.pre88, %.preheader.._crit_edge67_crit_edge ], [ %56, %._crit_edge63 ]
  %45 = phi i32 [ %10, %.preheader.._crit_edge67_crit_edge ], [ %54, %._crit_edge63 ]
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %46, i64 %.pre-phi
  %48 = load x86_fp80, ptr %47, align 16, !tbaa !11
  %49 = fptrunc x86_fp80 %48 to double
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %49)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #7
  ret i32 0

.lr.ph66:                                         ; preds = %.preheader, %._crit_edge63
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge63 ], [ 2, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  %51 = call noalias noundef nonnull dereferenceable(1) ptr @_Znwm(i64 noundef 1) #8
  call void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51)
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %.not4659 = icmp slt i32 %52, 1
  br i1 %.not4659, label %._crit_edge63, label %.lr.ph62

.lr.ph62:                                         ; preds = %.lr.ph66
  %53 = add nsw i64 %indvars.iv83, -1
  br label %57

._crit_edge63:                                    ; preds = %65, %.lr.ph66
  %54 = phi i32 [ %52, %.lr.ph66 ], [ %80, %65 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %55 = load i32, ptr @k, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not45.not = icmp slt i64 %indvars.iv83, %56
  br i1 %.not45.not, label %.lr.ph66, label %._crit_edge67, !llvm.loop !19

57:                                               ; preds = %.lr.ph62, %65
  %indvars.iv80 = phi i64 [ 1, %.lr.ph62 ], [ %indvars.iv.next81, %65 ]
  %.not47 = icmp ult i64 %indvars.iv80, %indvars.iv83
  br i1 %.not47, label %65, label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv80
  %60 = load x86_fp80, ptr %59, align 16, !tbaa !11
  %61 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %indvars.iv80
  %62 = load x86_fp80, ptr %61, align 16, !tbaa !11
  %63 = call noundef x86_fp80 @_ZN10convexHull5queryEe(ptr noundef nonnull align 1 dereferenceable(1) %2, x86_fp80 noundef %62)
  %64 = fadd x86_fp80 %60, %63
  br label %65

65:                                               ; preds = %57, %58
  %.sink = phi x86_fp80 [ %64, %58 ], [ 0xK403ADE0B6B3A76400000, %57 ]
  %66 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv80, i64 %indvars.iv83
  store x86_fp80 %.sink, ptr %66, align 16
  %67 = getelementptr inbounds [200100 x i64], ptr @sum, i64 0, i64 %indvars.iv80
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = sub nsw i64 0, %68
  %70 = sitofp i64 %69 to x86_fp80
  %71 = getelementptr inbounds [200100 x [51 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv80, i64 %53
  %72 = load x86_fp80, ptr %71, align 16, !tbaa !11
  %73 = getelementptr inbounds [200100 x x86_fp80], ptr @score, i64 0, i64 %indvars.iv80
  %74 = load x86_fp80, ptr %73, align 16, !tbaa !11
  %75 = fsub x86_fp80 %72, %74
  %76 = getelementptr inbounds [200100 x x86_fp80], ptr @inv, i64 0, i64 %indvars.iv80
  %77 = load x86_fp80, ptr %76, align 16, !tbaa !11
  %78 = sitofp i64 %68 to x86_fp80
  %79 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %77, x86_fp80 %78, x86_fp80 %75)
  call void @_ZN10convexHull6insertEee(ptr noundef nonnull align 1 dereferenceable(1) %2, x86_fp80 noundef %70, x86_fp80 noundef %79)
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %.not46.not = icmp slt i64 %indvars.iv80, %81
  br i1 %.not46.not, label %57, label %._crit_edge63, !llvm.loop !20
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10convexHullC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZN10convexHull5queryEe(ptr noundef nonnull align 1 dereferenceable(1), x86_fp80 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10convexHull6insertEee(ptr noundef nonnull align 1 dereferenceable(1), x86_fp80 noundef, x86_fp80 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #6

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

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

!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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


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