; LLVM IR from tangjz/acm-icpc :: codechef/SNCKEL19 (IMPO)

; 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.Event = type { i32, i32, x86_fp80, x86_fp80 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@p = external dso_local global [100001 x %struct.Point], align 16
@q = external dso_local global [100001 x %struct.Point], align 16
@eve = external dso_local global [400005 x %struct.Event], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #0

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %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 i32, align 4
  %7 = alloca x86_fp80, align 16
  %8 = alloca x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca x86_fp80, align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca x86_fp80, align 16
  %16 = alloca x86_fp80, align 16
  %17 = alloca x86_fp80, align 16
  store i32 0, ptr %1, align 4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @t)
  br label %19

19:                                               ; preds = %161, %159, %0
  %20 = load i32, ptr @t, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr @t, align 4, !tbaa !5
  %22 = icmp ne i32 %20, 0
  br i1 %22, label %23, label %162

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef @p, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef 0)
  call void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4) @m, ptr noundef @q, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1)
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp ne i32 %24, %25
  br i1 %26, label %31, label %27

27:                                               ; preds = %23
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = icmp ne i32 %28, %29
  br i1 %30, label %31, label %33

31:                                               ; preds = %27, %23
  %32 = call i32 @puts(ptr noundef @.str.3)
  store i32 2, ptr %6, align 4
  br label %159, !llvm.loop !9

33:                                               ; preds = %27
  %34 = load i32, ptr @tot, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %struct.Event, ptr @eve, i64 %35
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef @eve, ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  store x86_fp80 0xK00000000000000000000, ptr %7, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  store x86_fp80 0xK00000000000000000000, ptr %8, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  store x86_fp80 0xK00000000000000000000, ptr %9, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  store x86_fp80 0xK00000000000000000000, ptr %10, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  store x86_fp80 0xK00000000000000000000, ptr %11, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %154, %33
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = load i32, ptr @tot, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 4, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %155

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.Event, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !13
  store i32 %47, ptr %13, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %100, %42
  %49 = load i32, ptr %12, align 4, !tbaa !5
  %50 = load i32, ptr @tot, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %52, label %60

52:                                               ; preds = %48
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %54
  %56 = getelementptr inbounds %struct.Event, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !13
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = icmp eq i32 %57, %58
  br label %60

60:                                               ; preds = %52, %48
  %61 = phi i1 [ false, %48 ], [ %59, %52 ]
  br i1 %61, label %62, label %103

62:                                               ; preds = %60
  %63 = load i32, ptr %12, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.Event, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 16, !tbaa !15
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %84, label %69

69:                                               ; preds = %62
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %71
  %73 = getelementptr inbounds %struct.Event, ptr %72, i32 0, i32 2
  %74 = load x86_fp80, ptr %73, align 16, !tbaa !16
  %75 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %76 = fadd x86_fp80 %75, %74
  store x86_fp80 %76, ptr %7, align 16, !tbaa !11
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.Event, ptr %79, i32 0, i32 3
  %81 = load x86_fp80, ptr %80, align 16, !tbaa !17
  %82 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %83 = fadd x86_fp80 %82, %81
  store x86_fp80 %83, ptr %8, align 16, !tbaa !11
  br label %99

84:                                               ; preds = %62
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %86
  %88 = getelementptr inbounds %struct.Event, ptr %87, i32 0, i32 2
  %89 = load x86_fp80, ptr %88, align 16, !tbaa !16
  %90 = load x86_fp80, ptr %9, align 16, !tbaa !11
  %91 = fadd x86_fp80 %90, %89
  store x86_fp80 %91, ptr %9, align 16, !tbaa !11
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.Event, ptr %94, i32 0, i32 3
  %96 = load x86_fp80, ptr %95, align 16, !tbaa !17
  %97 = load x86_fp80, ptr %10, align 16, !tbaa !11
  %98 = fadd x86_fp80 %97, %96
  store x86_fp80 %98, ptr %10, align 16, !tbaa !11
  br label %99

99:                                               ; preds = %84, %69
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %12, align 4, !tbaa !5
  br label %48, !llvm.loop !18

103:                                              ; preds = %60
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = load i32, ptr @tot, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %154

107:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %109
  %111 = getelementptr inbounds %struct.Event, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !13
  store i32 %112, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %113 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %114 = load x86_fp80, ptr %9, align 16, !tbaa !11
  %115 = fmul x86_fp80 %113, %114
  %116 = fdiv x86_fp80 %115, 0xK4000C000000000000000
  store x86_fp80 %116, ptr %15, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %117 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %118 = load x86_fp80, ptr %10, align 16, !tbaa !11
  %119 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %120 = load x86_fp80, ptr %9, align 16, !tbaa !11
  %121 = fmul x86_fp80 %119, %120
  %122 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %117, x86_fp80 %118, x86_fp80 %121)
  %123 = fdiv x86_fp80 %122, 0xK40008000000000000000
  store x86_fp80 %123, ptr %16, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %124 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %125 = load x86_fp80, ptr %10, align 16, !tbaa !11
  %126 = fmul x86_fp80 %124, %125
  store x86_fp80 %126, ptr %17, align 16, !tbaa !11
  %127 = load x86_fp80, ptr %15, align 16, !tbaa !11
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = sitofp i32 %128 to x86_fp80
  %130 = load x86_fp80, ptr %16, align 16, !tbaa !11
  %131 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %127, x86_fp80 %129, x86_fp80 %130)
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = sitofp i32 %132 to x86_fp80
  %134 = load x86_fp80, ptr %17, align 16, !tbaa !11
  %135 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %131, x86_fp80 %133, x86_fp80 %134)
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = sitofp i32 %136 to x86_fp80
  %138 = load x86_fp80, ptr %11, align 16, !tbaa !11
  %139 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %135, x86_fp80 %137, x86_fp80 %138)
  store x86_fp80 %139, ptr %11, align 16, !tbaa !11
  %140 = load x86_fp80, ptr %15, align 16, !tbaa !11
  %141 = load i32, ptr %13, align 4, !tbaa !5
  %142 = sitofp i32 %141 to x86_fp80
  %143 = load x86_fp80, ptr %16, align 16, !tbaa !11
  %144 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %140, x86_fp80 %142, x86_fp80 %143)
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = sitofp i32 %145 to x86_fp80
  %147 = load x86_fp80, ptr %17, align 16, !tbaa !11
  %148 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %144, x86_fp80 %146, x86_fp80 %147)
  %149 = load i32, ptr %13, align 4, !tbaa !5
  %150 = sitofp i32 %149 to x86_fp80
  %151 = load x86_fp80, ptr %11, align 16, !tbaa !11
  %152 = fneg x86_fp80 %148
  %153 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %152, x86_fp80 %150, x86_fp80 %151)
  store x86_fp80 %153, ptr %11, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %154

154:                                              ; preds = %107, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %37, !llvm.loop !19

155:                                              ; preds = %41
  %156 = load x86_fp80, ptr %11, align 16, !tbaa !11
  %157 = fptrunc x86_fp80 %156 to double
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %157)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  store i32 0, ptr %6, align 4
  br label %159

159:                                              ; preds = %155, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %160 = load i32, ptr %6, align 4
  switch i32 %160, label %163 [
    i32 0, label %161
    i32 2, label %19
  ]

161:                                              ; preds = %159
  br label %19, !llvm.loop !9

162:                                              ; preds = %19
  ret i32 0

163:                                              ; preds = %159
  unreachable
}

declare i32 @puts(ptr noundef) #2

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"long double", !7, i64 0}
!13 = !{!14, !6, i64 4}
!14 = !{!"_ZTS5Event", !6, i64 0, !6, i64 4, !12, i64 16, !12, i64 32}
!15 = !{!14, !6, i64 0}
!16 = !{!14, !12, i64 16}
!17 = !{!14, !12, i64 32}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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.Point = type { i32, i32 }
%struct.Event = type { i32, i32, x86_fp80, x86_fp80 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local global [100001 x %struct.Point], align 16
@q = external dso_local global [100001 x %struct.Point], align 16
@eve = external dso_local global [400005 x %struct.Event], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #0

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @t)
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %.not81 = icmp eq i32 %6, 0
  br i1 %.not81, label %._crit_edge84, label %.lr.ph83

.lr.ph83:                                         ; preds = %0, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull @p, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef 0)
  call void @_Z11readPolygonRiP5PointS_S_i(ptr noundef nonnull align 4 dereferenceable(4) @m, ptr noundef nonnull @q, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef 1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = load i32, ptr %3, align 4, !tbaa !5
  %.not57 = icmp eq i32 %8, %9
  br i1 %.not57, label %10, label %13

10:                                               ; preds = %.lr.ph83
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %.not58 = icmp eq i32 %11, %12
  br i1 %.not58, label %15, label %13

13:                                               ; preds = %10, %.lr.ph83
  %14 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %66, !llvm.loop !9

15:                                               ; preds = %10
  %16 = load i32, ptr @tot, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds %struct.Event, ptr @eve, i64 %17
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef nonnull @eve, ptr noundef nonnull %18)
  %19 = load i32, ptr @tot, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %15
  %21 = zext nneg i32 %19 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.critedge, %15
  %.053.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %15 ], [ %.154, %.critedge ]
  %22 = fptrunc x86_fp80 %.053.lcssa to double
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %22)
  br label %66

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge
  %.080 = phi x86_fp80 [ %.161, %.critedge ], [ 0xK00000000000000000000, %.lr.ph.preheader ]
  %.04479 = phi x86_fp80 [ %.14563, %.critedge ], [ 0xK00000000000000000000, %.lr.ph.preheader ]
  %.04778 = phi x86_fp80 [ %.14865, %.critedge ], [ 0xK00000000000000000000, %.lr.ph.preheader ]
  %.05077 = phi x86_fp80 [ %.15167, %.critedge ], [ 0xK00000000000000000000, %.lr.ph.preheader ]
  %.05376 = phi x86_fp80 [ %.154, %.critedge ], [ 0xK00000000000000000000, %.lr.ph.preheader ]
  %.05575 = phi i64 [ %.15669.in, %.critedge ], [ 0, %.lr.ph.preheader ]
  %sext96 = shl i64 %.05575, 32
  %24 = ashr exact i64 %sext96, 32
  %25 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %24, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !11
  br label %27

27:                                               ; preds = %.lr.ph, %44
  %indvars.iv = phi i64 [ %24, %.lr.ph ], [ %indvars.iv.next, %44 ]
  %.174 = phi x86_fp80 [ %.080, %.lr.ph ], [ %.2, %44 ]
  %.14573 = phi x86_fp80 [ %.04479, %.lr.ph ], [ %.246, %44 ]
  %.14872 = phi x86_fp80 [ %.04778, %.lr.ph ], [ %.249, %44 ]
  %.15171 = phi x86_fp80 [ %.05077, %.lr.ph ], [ %.252, %44 ]
  %28 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %indvars.iv
  %29 = getelementptr inbounds i8, ptr %28, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = icmp eq i32 %30, %26
  br i1 %31, label %32, label %46

32:                                               ; preds = %27
  %33 = load i32, ptr %28, align 16, !tbaa !14
  %.not59 = icmp eq i32 %33, 0
  %34 = getelementptr inbounds i8, ptr %28, i64 16
  %35 = load x86_fp80, ptr %34, align 16, !tbaa !15
  %36 = getelementptr inbounds i8, ptr %28, i64 32
  %37 = load x86_fp80, ptr %36, align 16, !tbaa !16
  br i1 %.not59, label %38, label %41

38:                                               ; preds = %32
  %39 = fadd x86_fp80 %.174, %35
  %40 = fadd x86_fp80 %.14573, %37
  br label %44

41:                                               ; preds = %32
  %42 = fadd x86_fp80 %.14872, %35
  %43 = fadd x86_fp80 %.15171, %37
  br label %44

44:                                               ; preds = %38, %41
  %.252 = phi x86_fp80 [ %43, %41 ], [ %.15171, %38 ]
  %.249 = phi x86_fp80 [ %42, %41 ], [ %.14872, %38 ]
  %.246 = phi x86_fp80 [ %.14573, %41 ], [ %40, %38 ]
  %.2 = phi x86_fp80 [ %.174, %41 ], [ %39, %38 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %45 = icmp slt i64 %indvars.iv.next, %21
  br i1 %45, label %27, label %.critedge, !llvm.loop !17

46:                                               ; preds = %27
  %sext = shl i64 %indvars.iv, 32
  %47 = ashr exact i64 %sext, 32
  %48 = getelementptr inbounds [400005 x %struct.Event], ptr @eve, i64 0, i64 %47, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = fmul x86_fp80 %.14872, %.174
  %51 = fdiv x86_fp80 %50, 0xK4000C000000000000000
  %52 = fmul x86_fp80 %.14872, %.14573
  %53 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.174, x86_fp80 %.15171, x86_fp80 %52)
  %54 = fmul x86_fp80 %53, 0xK3FFE8000000000000000
  %55 = fmul x86_fp80 %.15171, %.14573
  %56 = sitofp i32 %49 to x86_fp80
  %57 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %51, x86_fp80 %56, x86_fp80 %54)
  %58 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %57, x86_fp80 %56, x86_fp80 %55)
  %59 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %58, x86_fp80 %56, x86_fp80 %.05376)
  %60 = sitofp i32 %26 to x86_fp80
  %61 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %51, x86_fp80 %60, x86_fp80 %54)
  %62 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %61, x86_fp80 %60, x86_fp80 %55)
  %63 = fneg x86_fp80 %62
  %64 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %63, x86_fp80 %60, x86_fp80 %59)
  br label %.critedge

.critedge:                                        ; preds = %44, %46
  %.15669.in = phi i64 [ %indvars.iv, %46 ], [ %indvars.iv.next, %44 ]
  %.15167 = phi x86_fp80 [ %.15171, %46 ], [ %.252, %44 ]
  %.14865 = phi x86_fp80 [ %.14872, %46 ], [ %.249, %44 ]
  %.14563 = phi x86_fp80 [ %.14573, %46 ], [ %.246, %44 ]
  %.161 = phi x86_fp80 [ %.174, %46 ], [ %.2, %44 ]
  %.154 = phi x86_fp80 [ %64, %46 ], [ %.05376, %44 ]
  %.15669 = trunc i64 %.15669.in to i32
  %65 = icmp sgt i32 %19, %.15669
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !18

66:                                               ; preds = %._crit_edge, %13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %67 = load i32, ptr @t, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %67, 0
  br i1 %.not, label %._crit_edge84, label %.lr.ph83

._crit_edge84:                                    ; preds = %66, %0
  ret i32 0
}

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

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

; 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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, !6, i64 4}
!12 = !{!"_ZTS5Event", !6, i64 0, !6, i64 4, !13, i64 16, !13, i64 32}
!13 = !{!"long double", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!12, !13, i64 16}
!16 = !{!12, !13, i64 32}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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