; LLVM IR from UtkarshPathrabe/Competitive-Coding :: HackerRank Solutions/Algorithms/Geometry (Sherlock And Planes)

; 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"

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

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

18:                                               ; preds = %168, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr %2, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %169

22:                                               ; preds = %18
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #5
  %26 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %27 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %27, ptr %26, align 4, !tbaa !9
  %28 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %29 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %29, ptr %28, align 4, !tbaa !11
  %30 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 2
  %31 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %31, ptr %30, align 4, !tbaa !12
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #5
  %35 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %36 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %36, ptr %35, align 4, !tbaa !9
  %37 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %38 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %38, ptr %37, align 4, !tbaa !11
  %39 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 2
  %40 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %40, ptr %39, align 4, !tbaa !12
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #5
  %44 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %45 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %45, ptr %44, align 4, !tbaa !9
  %46 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %47 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %47, ptr %46, align 4, !tbaa !11
  %48 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 2
  %49 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %49, ptr %48, align 4, !tbaa !12
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #5
  %53 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  %54 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %54, ptr %53, align 4, !tbaa !9
  %55 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 1
  %56 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %56, ptr %55, align 4, !tbaa !11
  %57 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 2
  %58 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %58, ptr %57, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  %59 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 0
  %60 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = sub nsw i32 %61, %63
  store i32 %64, ptr %59, align 4, !tbaa !9
  %65 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 1
  %66 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = sub nsw i32 %67, %69
  store i32 %70, ptr %65, align 4, !tbaa !11
  %71 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 2
  %72 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 2
  %73 = load i32, ptr %72, align 4, !tbaa !12
  %74 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = sub nsw i32 %73, %75
  store i32 %76, ptr %71, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  %77 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %78 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = sub nsw i32 %79, %81
  store i32 %82, ptr %77, align 4, !tbaa !9
  %83 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %84 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %85 = load i32, ptr %84, align 4, !tbaa !11
  %86 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !11
  %88 = sub nsw i32 %85, %87
  store i32 %88, ptr %83, align 4, !tbaa !11
  %89 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 2
  %90 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 2
  %91 = load i32, ptr %90, align 4, !tbaa !12
  %92 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !12
  %94 = sub nsw i32 %91, %93
  store i32 %94, ptr %89, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #5
  %95 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 0
  %96 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = sub nsw i32 %97, %99
  store i32 %100, ptr %95, align 4, !tbaa !9
  %101 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 1
  %102 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !11
  %104 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = sub nsw i32 %103, %105
  store i32 %106, ptr %101, align 4, !tbaa !11
  %107 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 2
  %108 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !12
  %110 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 2
  %111 = load i32, ptr %110, align 4, !tbaa !12
  %112 = sub nsw i32 %109, %111
  store i32 %112, ptr %107, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %113 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !11
  %115 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !12
  %117 = mul nsw i32 %114, %116
  %118 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 2
  %121 = load i32, ptr %120, align 4, !tbaa !12
  %122 = mul nsw i32 %119, %121
  %123 = sub nsw i32 %117, %122
  store i32 %123, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %124 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !11
  %126 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 2
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = mul nsw i32 %125, %127
  %129 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !11
  %131 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 2
  %132 = load i32, ptr %131, align 4, !tbaa !12
  %133 = mul nsw i32 %130, %132
  %134 = sub nsw i32 %128, %133
  store i32 %134, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %135 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !11
  %137 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 2
  %138 = load i32, ptr %137, align 4, !tbaa !12
  %139 = mul nsw i32 %136, %138
  %140 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 1
  %141 = load i32, ptr %140, align 4, !tbaa !11
  %142 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 2
  %143 = load i32, ptr %142, align 4, !tbaa !12
  %144 = mul nsw i32 %141, %143
  %145 = sub nsw i32 %139, %144
  store i32 %145, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %146 = getelementptr inbounds %struct.Point, ptr %10, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = mul nsw i32 %147, %148
  %150 = getelementptr inbounds %struct.Point, ptr %11, i32 0, i32 0
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = load i32, ptr %14, align 4, !tbaa !5
  %153 = mul nsw i32 %151, %152
  %154 = sub nsw i32 %149, %153
  %155 = getelementptr inbounds %struct.Point, ptr %12, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = mul nsw i32 %156, %157
  %159 = add nsw i32 %154, %158
  store i32 %159, ptr %16, align 4, !tbaa !5
  %160 = load i32, ptr %16, align 4, !tbaa !5
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %165

162:                                              ; preds = %22
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %168

165:                                              ; preds = %22
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %168

168:                                              ; preds = %165, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #5
  br label %18, !llvm.loop !13

169:                                              ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = { 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 #4 = { 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 #5 = { 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 0}
!10 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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"

%"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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %5 = 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)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr %1, align 4, !tbaa !5
  %.not35 = icmp eq i32 %6, 0
  br i1 %.not35, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %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) %2)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %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)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = 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)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = 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)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sub nsw i32 %17, %11
  %33 = sub nsw i32 %18, %12
  %34 = sub nsw i32 %19, %13
  %35 = sub nsw i32 %23, %11
  %36 = sub nsw i32 %24, %12
  %37 = sub nsw i32 %25, %13
  %38 = sub nsw i32 %29, %11
  %39 = sub nsw i32 %30, %12
  %40 = sub nsw i32 %31, %13
  %41 = mul nsw i32 %40, %36
  %42 = mul nsw i32 %39, %37
  %43 = sub nsw i32 %41, %42
  %44 = mul nsw i32 %40, %33
  %45 = mul nsw i32 %39, %34
  %.neg = sub i32 %45, %44
  %46 = mul nsw i32 %37, %33
  %47 = mul nsw i32 %36, %34
  %.neg33 = sub i32 %47, %46
  %48 = mul nsw i32 %43, %32
  %.neg32 = mul i32 %.neg, %35
  %49 = add i32 %.neg32, %48
  %.neg34 = mul i32 %38, %.neg33
  %50 = icmp eq i32 %49, %.neg34
  %.str..str.1 = select i1 %50, ptr @.str, ptr @.str.1
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str..str.1)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %53, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

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 #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress 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 = { 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 #4 = { 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 #5 = { 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"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass