; LLVM IR from eyangch/competitive-programming :: Codeforces/1059 (d)

; 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.std::_Setprecision" = type { i32 }

@N = external dso_local global i64, align 8
@x = external dso_local global [100000 x x86_fp80], align 16
@y = external dso_local global [100000 x x86_fp80], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5workse(x86_fp80 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 %"struct.std::_Setprecision", align 4
  %3 = alloca i64, align 8
  %4 = alloca [2 x i8], align 1
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  store i32 0, ptr %1, align 4
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %18 = call i32 @_ZSt12setprecisioni(i32 noundef 16)
  %19 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  store i32 %18, ptr %19, align 4
  %20 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  %21 = load i32, ptr %20, align 4
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %21)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef @_ZSt5fixedRSt8ios_base)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %24

24:                                               ; preds = %36, %0
  %25 = load i64, ptr %3, align 8, !tbaa !8
  %26 = load i64, ptr @N, align 8, !tbaa !8
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %39

29:                                               ; preds = %24
  %30 = load i64, ptr %3, align 8, !tbaa !8
  %31 = getelementptr inbounds [100000 x x86_fp80], ptr @x, i64 0, i64 %30
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %31)
  %33 = load i64, ptr %3, align 8, !tbaa !8
  %34 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %33
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 16 dereferenceable(16) %34)
  br label %36

36:                                               ; preds = %29
  %37 = load i64, ptr %3, align 8, !tbaa !8
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %3, align 8, !tbaa !8
  br label %24, !llvm.loop !11

39:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #8
  call void @llvm.memset.p0.i64(ptr align 1 %4, i8 0, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %40

40:                                               ; preds = %52, %39
  %41 = load i64, ptr %5, align 8, !tbaa !8
  %42 = load i64, ptr @N, align 8, !tbaa !8
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %55

45:                                               ; preds = %40
  %46 = load i64, ptr %5, align 8, !tbaa !8
  %47 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %46
  %48 = load x86_fp80, ptr %47, align 16, !tbaa !13
  %49 = fcmp ogt x86_fp80 %48, 0xK00000000000000000000
  %50 = zext i1 %49 to i64
  %51 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 %50
  store i8 1, ptr %51, align 1, !tbaa !15
  br label %52

52:                                               ; preds = %45
  %53 = load i64, ptr %5, align 8, !tbaa !8
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %5, align 8, !tbaa !8
  br label %40, !llvm.loop !17

55:                                               ; preds = %44
  %56 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  %57 = load i8, ptr %56, align 1, !tbaa !15, !range !18, !noundef !19
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %66

59:                                               ; preds = %55
  %60 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %61 = load i8, ptr %60, align 1, !tbaa !15, !range !18, !noundef !19
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %66

63:                                               ; preds = %59
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %64, i8 noundef signext 10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %111

66:                                               ; preds = %59, %55
  %67 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  %68 = load i8, ptr %67, align 1, !tbaa !15, !range !18, !noundef !19
  %69 = trunc i8 %68 to i1
  br i1 %69, label %70, label %87

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %71

71:                                               ; preds = %83, %70
  %72 = load i64, ptr %7, align 8, !tbaa !8
  %73 = load i64, ptr @N, align 8, !tbaa !8
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %76, label %75

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

76:                                               ; preds = %71
  %77 = load i64, ptr %7, align 8, !tbaa !8
  %78 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %77
  %79 = load x86_fp80, ptr %78, align 16, !tbaa !13
  %80 = fneg x86_fp80 %79
  %81 = load i64, ptr %7, align 8, !tbaa !8
  %82 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %81
  store x86_fp80 %80, ptr %82, align 16, !tbaa !13
  br label %83

83:                                               ; preds = %76
  %84 = load i64, ptr %7, align 8, !tbaa !8
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %7, align 8, !tbaa !8
  br label %71, !llvm.loop !20

86:                                               ; preds = %75
  br label %87

87:                                               ; preds = %86, %66
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  store x86_fp80 0xK00000000000000000000, ptr %8, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  store x86_fp80 0xK4037B1A2BC2EC5000000, ptr %9, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  store x86_fp80 0xK00000000000000000000, ptr %10, align 16, !tbaa !13
  br label %88

88:                                               ; preds = %106, %87
  %89 = load x86_fp80, ptr %9, align 16, !tbaa !13
  %90 = load x86_fp80, ptr %8, align 16, !tbaa !13
  %91 = fsub x86_fp80 %89, %90
  %92 = load x86_fp80, ptr %8, align 16, !tbaa !13
  %93 = fmul x86_fp80 0xK3FE189705F4136B4A800, %92
  %94 = fcmp ogt x86_fp80 %91, %93
  br i1 %94, label %95, label %107

95:                                               ; preds = %88
  %96 = load x86_fp80, ptr %8, align 16, !tbaa !13
  %97 = load x86_fp80, ptr %9, align 16, !tbaa !13
  %98 = fadd x86_fp80 %96, %97
  %99 = fmul x86_fp80 %98, 0xK3FFE8000000000000000
  store x86_fp80 %99, ptr %10, align 16, !tbaa !13
  %100 = load x86_fp80, ptr %10, align 16, !tbaa !13
  %101 = call noundef zeroext i1 @_Z5workse(x86_fp80 noundef %100)
  br i1 %101, label %102, label %104

102:                                              ; preds = %95
  %103 = load x86_fp80, ptr %10, align 16, !tbaa !13
  store x86_fp80 %103, ptr %9, align 16, !tbaa !13
  br label %106

104:                                              ; preds = %95
  %105 = load x86_fp80, ptr %10, align 16, !tbaa !13
  store x86_fp80 %105, ptr %8, align 16, !tbaa !13
  br label %106

106:                                              ; preds = %104, %102
  br label %88, !llvm.loop !21

107:                                              ; preds = %88
  %108 = load x86_fp80, ptr %10, align 16, !tbaa !13
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, x86_fp80 noundef %108)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %109, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  store i32 0, ptr %6, align 4
  br label %111

111:                                              ; preds = %107, %63
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #8
  %112 = load i32, ptr %6, align 4
  switch i32 %112, label %115 [
    i32 0, label %113
    i32 1, label %113
  ]

113:                                              ; preds = %111, %111
  %114 = load i32, ptr %1, align 4
  ret i32 %114

115:                                              ; preds = %111
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 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 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long double", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = distinct !{!17, !12}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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

@N = external dso_local global i64, align 8
@x = external dso_local global [100000 x x86_fp80], align 16
@y = external dso_local global [100000 x x86_fp80], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5workse(x86_fp80 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 [2 x i8], align 2
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %9 = tail call i32 @_ZSt12setprecisioni(i32 noundef 16)
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %9)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %12 = load i64, ptr @N, align 8, !tbaa !8
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %1) #7
  br label %.thread.preheader

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %1) #7
  store i16 0, ptr %1, align 2
  %14 = icmp sgt i64 %21, 0
  br i1 %14, label %.lr.ph30.preheader, label %.thread.preheader

.lr.ph30.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i64 %21, 1
  %15 = icmp eq i64 %21, 1
  br i1 %15, label %._crit_edge31.unr-lcssa, label %.lr.ph30.preheader.new

.lr.ph30.preheader.new:                           ; preds = %.lr.ph30.preheader
  %unroll_iter = and i64 %21, 9223372036854775806
  br label %.lr.ph30

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02227 = phi i64 [ %20, %.lr.ph ], [ 0, %0 ]
  %16 = getelementptr inbounds [100000 x x86_fp80], ptr @x, i64 0, i64 %.02227
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %16)
  %18 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %.02227
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %18)
  %20 = add nuw nsw i64 %.02227, 1
  %21 = load i64, ptr @N, align 8, !tbaa !8
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge31.unr-lcssa:                          ; preds = %.lr.ph30, %.lr.ph30.preheader
  %.02528.unr = phi i64 [ 0, %.lr.ph30.preheader ], [ %40, %.lr.ph30 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge31, label %.lr.ph30.epil

.lr.ph30.epil:                                    ; preds = %._crit_edge31.unr-lcssa
  %23 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %.02528.unr
  %24 = load x86_fp80, ptr %23, align 16, !tbaa !13
  %25 = fcmp ogt x86_fp80 %24, 0xK00000000000000000000
  %26 = zext i1 %25 to i64
  %27 = getelementptr inbounds [2 x i8], ptr %1, i64 0, i64 %26
  store i8 1, ptr %27, align 1, !tbaa !15
  br label %._crit_edge31

._crit_edge31:                                    ; preds = %._crit_edge31.unr-lcssa, %.lr.ph30.epil
  %.pre = load i8, ptr %1, align 2, !tbaa !15, !range !17
  %28 = trunc nuw i8 %.pre to i1
  br i1 %28, label %41, label %.thread.preheader

.lr.ph30:                                         ; preds = %.lr.ph30, %.lr.ph30.preheader.new
  %.02528 = phi i64 [ 0, %.lr.ph30.preheader.new ], [ %40, %.lr.ph30 ]
  %niter = phi i64 [ 0, %.lr.ph30.preheader.new ], [ %niter.next.1, %.lr.ph30 ]
  %29 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %.02528
  %30 = load x86_fp80, ptr %29, align 16, !tbaa !13
  %31 = fcmp ogt x86_fp80 %30, 0xK00000000000000000000
  %32 = zext i1 %31 to i64
  %33 = getelementptr inbounds [2 x i8], ptr %1, i64 0, i64 %32
  store i8 1, ptr %33, align 1, !tbaa !15
  %34 = or disjoint i64 %.02528, 1
  %35 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %34
  %36 = load x86_fp80, ptr %35, align 16, !tbaa !13
  %37 = fcmp ogt x86_fp80 %36, 0xK00000000000000000000
  %38 = zext i1 %37 to i64
  %39 = getelementptr inbounds [2 x i8], ptr %1, i64 0, i64 %38
  store i8 1, ptr %39, align 1, !tbaa !15
  %40 = add nuw nsw i64 %.02528, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge31.unr-lcssa, label %.lr.ph30, !llvm.loop !18

41:                                               ; preds = %._crit_edge31
  %42 = getelementptr inbounds i8, ptr %1, i64 1
  %43 = load i8, ptr %42, align 1, !tbaa !15, !range !17, !noundef !19
  %44 = trunc nuw i8 %43 to i1
  br i1 %44, label %46, label %.preheader

.preheader:                                       ; preds = %41
  br i1 %14, label %.lr.ph33.preheader, label %.thread.preheader

.lr.ph33.preheader:                               ; preds = %.preheader
  %xtraiter45 = and i64 %21, 3
  %45 = icmp ult i64 %21, 4
  br i1 %45, label %.thread.preheader.loopexit.unr-lcssa, label %.lr.ph33.preheader.new

.lr.ph33.preheader.new:                           ; preds = %.lr.ph33.preheader
  %unroll_iter47 = and i64 %21, 9223372036854775804
  br label %.lr.ph33

46:                                               ; preds = %41
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %76

.lr.ph33:                                         ; preds = %.lr.ph33, %.lr.ph33.preheader.new
  %.02632 = phi i64 [ 0, %.lr.ph33.preheader.new ], [ %63, %.lr.ph33 ]
  %niter48 = phi i64 [ 0, %.lr.ph33.preheader.new ], [ %niter48.next.3, %.lr.ph33 ]
  %48 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %.02632
  %49 = load x86_fp80, ptr %48, align 16, !tbaa !13
  %50 = fneg x86_fp80 %49
  store x86_fp80 %50, ptr %48, align 16, !tbaa !13
  %51 = or disjoint i64 %.02632, 1
  %52 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %51
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !13
  %54 = fneg x86_fp80 %53
  store x86_fp80 %54, ptr %52, align 16, !tbaa !13
  %55 = or disjoint i64 %.02632, 2
  %56 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %55
  %57 = load x86_fp80, ptr %56, align 16, !tbaa !13
  %58 = fneg x86_fp80 %57
  store x86_fp80 %58, ptr %56, align 16, !tbaa !13
  %59 = or disjoint i64 %.02632, 3
  %60 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %59
  %61 = load x86_fp80, ptr %60, align 16, !tbaa !13
  %62 = fneg x86_fp80 %61
  store x86_fp80 %62, ptr %60, align 16, !tbaa !13
  %63 = add nuw nsw i64 %.02632, 4
  %niter48.next.3 = add i64 %niter48, 4
  %niter48.ncmp.3 = icmp eq i64 %niter48.next.3, %unroll_iter47
  br i1 %niter48.ncmp.3, label %.thread.preheader.loopexit.unr-lcssa, label %.lr.ph33, !llvm.loop !20

.thread.preheader.loopexit.unr-lcssa:             ; preds = %.lr.ph33, %.lr.ph33.preheader
  %.02632.unr = phi i64 [ 0, %.lr.ph33.preheader ], [ %63, %.lr.ph33 ]
  %lcmp.mod46.not = icmp eq i64 %xtraiter45, 0
  br i1 %lcmp.mod46.not, label %.thread.preheader, label %.lr.ph33.epil

.lr.ph33.epil:                                    ; preds = %.thread.preheader.loopexit.unr-lcssa, %.lr.ph33.epil
  %.02632.epil = phi i64 [ %67, %.lr.ph33.epil ], [ %.02632.unr, %.thread.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph33.epil ], [ 0, %.thread.preheader.loopexit.unr-lcssa ]
  %64 = getelementptr inbounds [100000 x x86_fp80], ptr @y, i64 0, i64 %.02632.epil
  %65 = load x86_fp80, ptr %64, align 16, !tbaa !13
  %66 = fneg x86_fp80 %65
  store x86_fp80 %66, ptr %64, align 16, !tbaa !13
  %67 = add nuw nsw i64 %.02632.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter45
  br i1 %epil.iter.cmp.not, label %.thread.preheader, label %.lr.ph33.epil, !llvm.loop !21

.thread.preheader:                                ; preds = %.thread.preheader.loopexit.unr-lcssa, %.lr.ph33.epil, %._crit_edge.thread, %._crit_edge, %.preheader, %._crit_edge31
  br label %.thread

.thread:                                          ; preds = %.thread.preheader, %.thread
  %.02135 = phi x86_fp80 [ %..021, %.thread ], [ 0xK4037B1A2BC2EC5000000, %.thread.preheader ]
  %.02334 = phi x86_fp80 [ %.023., %.thread ], [ 0xK00000000000000000000, %.thread.preheader ]
  %68 = fadd x86_fp80 %.02334, %.02135
  %69 = fmul x86_fp80 %68, 0xK3FFE8000000000000000
  %70 = tail call noundef zeroext i1 @_Z5workse(x86_fp80 noundef %69)
  %.023. = select i1 %70, x86_fp80 %.02334, x86_fp80 %69
  %..021 = select i1 %70, x86_fp80 %69, x86_fp80 %.02135
  %71 = fsub x86_fp80 %..021, %.023.
  %72 = fmul x86_fp80 %.023., 0xK3FE189705F4136B4A800
  %73 = fcmp ogt x86_fp80 %71, %72
  br i1 %73, label %.thread, label %74, !llvm.loop !23

74:                                               ; preds = %.thread
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, x86_fp80 noundef %69)
  br label %76

76:                                               ; preds = %74, %46
  %.sink = phi ptr [ %75, %74 ], [ %47, %46 ]
  %77 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %.sink, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %1) #7
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

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

; 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 #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 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 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long double", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = distinct !{!18, !12}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !12}


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