; LLVM IR from ShahjalalShohag/code-library :: Geometry (Rectangle Union)

; 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.Line = type { i32, i32, i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@all = external dso_local global [200018 x %struct.Line], align 16
@t = external dso_local global [1600144 x i64], align 16
@mp = external dso_local global [200018 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3updiiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Line, align 4
  %11 = alloca %struct.Line, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %62, %0
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9)
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = load i32, ptr %8, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  br label %28

26:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 42, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %28
  br label %35

33:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 42, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !5
  call void @_ZN4LineC2Eiiii(ptr noundef nonnull align 4 dereferenceable(16) %10, i32 noundef %36, i32 noundef %37, i32 noundef %38, i32 noundef 1)
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %39 to i64
  %42 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %41
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 4 %10, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !5
  call void @_ZN4LineC2Eiiii(ptr noundef nonnull align 4 dereferenceable(16) %11, i32 noundef %43, i32 noundef %44, i32 noundef %45, i32 noundef 1)
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %46 to i64
  %49 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %48
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200018 x i64], ptr @mp, i64 0, i64 %54
  store i64 %51, ptr %55, align 8, !tbaa !10
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200018 x i64], ptr @mp, i64 0, i64 %60
  store i64 %57, ptr %61, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %62

62:                                               ; preds = %35
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %5, align 4, !tbaa !5
  br label %15, !llvm.loop !12

65:                                               ; preds = %19
  %66 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %66, ptr %2, align 4, !tbaa !5
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds %struct.Line, ptr @all, i64 %68
  call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef @all, ptr noundef %69)
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i64, ptr @mp, i64 %71
  %73 = getelementptr inbounds i64, ptr %72, i64 1
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef getelementptr inbounds (i64, ptr @mp, i64 1), ptr noundef %73)
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i64, ptr @mp, i64 %75
  %77 = getelementptr inbounds i64, ptr %76, i64 1
  %78 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef getelementptr inbounds (i64, ptr @mp, i64 1), ptr noundef %77)
  %79 = ptrtoint ptr %78 to i64
  %80 = sub i64 %79, ptrtoint (ptr @mp to i64)
  %81 = sdiv exact i64 %80, 8
  %82 = sub nsw i64 %81, 1
  %83 = trunc i64 %82 to i32
  store i32 %83, ptr %4, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = load i32, ptr getelementptr inbounds (%struct.Line, ptr @all, i32 0, i32 1), align 4, !tbaa !14
  %86 = load i32, ptr getelementptr inbounds (%struct.Line, ptr @all, i32 0, i32 2), align 8, !tbaa !16
  %87 = load i32, ptr getelementptr inbounds (%struct.Line, ptr @all, i32 0, i32 3), align 4, !tbaa !17
  call void @_Z3updiiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %84, i32 noundef %85, i32 noundef %86, i32 noundef %87)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %128, %65
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  %94 = load i64, ptr getelementptr inbounds ([1600144 x i64], ptr @t, i64 0, i64 1), align 8, !tbaa !10
  %95 = mul nsw i64 1, %94
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.Line, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 16, !tbaa !18
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.Line, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 16, !tbaa !18
  %107 = sub nsw i32 %100, %106
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %95, %108
  %110 = load i64, ptr %12, align 8, !tbaa !10
  %111 = add nsw i64 %110, %109
  store i64 %111, ptr %12, align 8, !tbaa !10
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.Line, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !14
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.Line, ptr %120, i32 0, i32 2
  %122 = load i32, ptr %121, align 8, !tbaa !16
  %123 = load i32, ptr %13, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.Line, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 4, !tbaa !17
  call void @_Z3updiiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %112, i32 noundef %117, i32 noundef %122, i32 noundef %127)
  br label %128

128:                                              ; preds = %93
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %13, align 4, !tbaa !5
  br label %88, !llvm.loop !19

131:                                              ; preds = %92
  %132 = load i64, ptr %12, align 8, !tbaa !10
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %132)
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %133, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4LineC2Eiiii(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #5 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4LineEvT_S2_(ptr noundef, ptr noundef) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 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 = { 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 #3 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 4}
!15 = !{!"_ZTS4Line", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!16 = !{!15, !6, i64 8}
!17 = !{!15, !6, i64 12}
!18 = !{!15, !6, i64 0}
!19 = distinct !{!19, !13}


; 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.Line = type { i32, i32, i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@all = external dso_local global [200018 x %struct.Line], align 16
@t = external dso_local local_unnamed_addr global [1600144 x i64], align 16
@mp = external dso_local global [200018 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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 %struct.Line, align 4
  %7 = alloca %struct.Line, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %37
  %11 = trunc nuw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %.023.lcssa = phi i32 [ 0, %0 ], [ %11, %._crit_edge.loopexit ]
  store i32 %.023.lcssa, ptr %1, align 4, !tbaa !5
  %12 = zext nneg i32 %.023.lcssa to i64
  %13 = getelementptr inbounds %struct.Line, ptr @all, i64 %12
  call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef nonnull @all, ptr noundef nonnull %13)
  %14 = getelementptr inbounds i64, ptr @mp, i64 %12
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @mp, i64 8), ptr noundef nonnull %15)
  %16 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @mp, i64 8), ptr noundef nonnull %15)
  %17 = ptrtoint ptr %16 to i64
  %18 = sub i64 %17, ptrtoint (ptr @mp to i64)
  %19 = lshr exact i64 %18, 3
  %20 = trunc i64 %19 to i32
  %21 = add i32 %20, -1
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @all, i64 4), align 4, !tbaa !9
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @all, i64 8), align 8, !tbaa !11
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @all, i64 12), align 4, !tbaa !12
  call void @_Z3updiiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %21, i32 noundef %22, i32 noundef %23, i32 noundef %24)
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %.lr.ph35, label %._crit_edge36

.lr.ph:                                           ; preds = %0, %37
  %indvars.iv = phi i64 [ %indvars.iv.next, %37 ], [ 0, %0 ]
  %.02130 = phi i32 [ %50, %37 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 42, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

32:                                               ; preds = %.lr.ph
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 42, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @_ZN4LineC2Eiiii(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef %28, i32 noundef %33, i32 noundef %34, i32 noundef 1)
  %38 = or disjoint i64 %indvars.iv, 1
  %39 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr %5, align 4, !tbaa !5
  call void @_ZN4LineC2Eiiii(ptr noundef nonnull align 4 dereferenceable(16) %7, i32 noundef %40, i32 noundef %41, i32 noundef %42, i32 noundef 1)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %43 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %38
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200018 x i64], ptr @mp, i64 0, i64 %38
  store i64 %45, ptr %46, align 8, !tbaa !14
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200018 x i64], ptr @mp, i64 0, i64 %indvars.iv.next
  store i64 %48, ptr %49, align 16, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %50 = add nuw nsw i32 %.02130, 1
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

._crit_edge36:                                    ; preds = %.lr.ph35, %._crit_edge
  %.020.lcssa = phi i64 [ 0, %._crit_edge ], [ %64, %.lr.ph35 ]
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.020.lcssa)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %53, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0

.lr.ph35:                                         ; preds = %._crit_edge, %.lr.ph35
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %.lr.ph35 ], [ 1, %._crit_edge ]
  %.02032 = phi i64 [ %64, %.lr.ph35 ], [ 0, %._crit_edge ]
  %55 = load i64, ptr getelementptr inbounds (i8, ptr @t, i64 8), align 8, !tbaa !14
  %56 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %indvars.iv43
  %57 = load i32, ptr %56, align 16, !tbaa !18
  %58 = add nsw i64 %indvars.iv43, -1
  %59 = getelementptr inbounds [200018 x %struct.Line], ptr @all, i64 0, i64 %58
  %60 = load i32, ptr %59, align 16, !tbaa !18
  %61 = sub nsw i32 %57, %60
  %62 = sext i32 %61 to i64
  %63 = mul nsw i64 %55, %62
  %64 = add nsw i64 %63, %.02032
  %65 = getelementptr inbounds i8, ptr %56, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %56, i64 8
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds i8, ptr %56, i64 12
  %70 = load i32, ptr %69, align 4, !tbaa !12
  call void @_Z3updiiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %21, i32 noundef %66, i32 noundef %68, i32 noundef %70)
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next44, %72
  br i1 %73, label %.lr.ph35, label %._crit_edge36, !llvm.loop !19
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 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 = { 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 #3 = { "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 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTS4Line", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = !{!10, !6, i64 8}
!12 = !{!10, !6, i64 12}
!13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !6, i64 0}
!19 = distinct !{!19, !17}


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