; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #764 (Div. 3)/B. Make AP.ll (Z5solvev)

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

@_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 [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca [4 x [3 x i64]], align 16
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  store i64 3, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %24, %0
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = icmp slt i64 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 0
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds [3 x i64], ptr %20, i64 0, i64 %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i64, ptr %3, align 8, !tbaa !5
  %26 = add nsw i64 %25, 1
  store i64 %26, ptr %3, align 8, !tbaa !5
  br label %14, !llvm.loop !9

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

28:                                               ; preds = %52, %27
  %29 = load i64, ptr %4, align 8, !tbaa !5
  %30 = load i64, ptr %1, align 8, !tbaa !5
  %31 = icmp sle i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %55

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %48, %33
  %35 = load i64, ptr %6, align 8, !tbaa !5
  %36 = load i64, ptr %1, align 8, !tbaa !5
  %37 = icmp slt i64 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %51

39:                                               ; preds = %34
  %40 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 0
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds [3 x i64], ptr %40, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !5
  %44 = load i64, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %44
  %46 = load i64, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds [3 x i64], ptr %45, i64 0, i64 %46
  store i64 %43, ptr %47, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %39
  %49 = load i64, ptr %6, align 8, !tbaa !5
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %6, align 8, !tbaa !5
  br label %34, !llvm.loop !11

51:                                               ; preds = %38
  br label %52

52:                                               ; preds = %51
  %53 = load i64, ptr %4, align 8, !tbaa !5
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %4, align 8, !tbaa !5
  br label %28, !llvm.loop !12

55:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %56 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 0
  %57 = getelementptr inbounds [3 x i64], ptr %56, i64 0, i64 0
  %58 = load i64, ptr %57, align 16, !tbaa !5
  store i64 %58, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %59 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 0
  %60 = getelementptr inbounds [3 x i64], ptr %59, i64 0, i64 1
  %61 = load i64, ptr %60, align 8, !tbaa !5
  store i64 %61, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %62 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 0
  %63 = getelementptr inbounds [3 x i64], ptr %62, i64 0, i64 2
  %64 = load i64, ptr %63, align 16, !tbaa !5
  store i64 %64, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %65 = load i64, ptr %7, align 8, !tbaa !5
  %66 = load i64, ptr %9, align 8, !tbaa !5
  %67 = add nsw i64 %65, %66
  %68 = sdiv i64 %67, 2
  store i64 %68, ptr %11, align 8, !tbaa !5
  %69 = load i64, ptr %8, align 8, !tbaa !5
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = load i64, ptr %9, align 8, !tbaa !5
  %72 = sub nsw i64 %70, %71
  %73 = add nsw i64 %69, %72
  store i64 %73, ptr %10, align 8, !tbaa !5
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = load i64, ptr %8, align 8, !tbaa !5
  %76 = load i64, ptr %7, align 8, !tbaa !5
  %77 = sub nsw i64 %75, %76
  %78 = add nsw i64 %74, %77
  store i64 %78, ptr %12, align 8, !tbaa !5
  %79 = load i64, ptr %12, align 8, !tbaa !5
  %80 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 1
  %81 = getelementptr inbounds [3 x i64], ptr %80, i64 0, i64 2
  store i64 %79, ptr %81, align 8, !tbaa !5
  %82 = load i64, ptr %11, align 8, !tbaa !5
  %83 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 2
  %84 = getelementptr inbounds [3 x i64], ptr %83, i64 0, i64 1
  store i64 %82, ptr %84, align 8, !tbaa !5
  %85 = load i64, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 3
  %87 = getelementptr inbounds [3 x i64], ptr %86, i64 0, i64 0
  store i64 %85, ptr %87, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %166, %55
  %89 = load i64, ptr %13, align 8, !tbaa !5
  %90 = load i64, ptr %1, align 8, !tbaa !5
  %91 = icmp sle i64 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 11, ptr %5, align 4
  br label %169

93:                                               ; preds = %88
  %94 = load i64, ptr %13, align 8, !tbaa !5
  %95 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %94
  %96 = getelementptr inbounds [3 x i64], ptr %95, i64 0, i64 1
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = load i64, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %98
  %100 = getelementptr inbounds [3 x i64], ptr %99, i64 0, i64 0
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = sub nsw i64 %97, %101
  %103 = load i64, ptr %13, align 8, !tbaa !5
  %104 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %103
  %105 = getelementptr inbounds [3 x i64], ptr %104, i64 0, i64 2
  %106 = load i64, ptr %105, align 8, !tbaa !5
  %107 = load i64, ptr %13, align 8, !tbaa !5
  %108 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %107
  %109 = getelementptr inbounds [3 x i64], ptr %108, i64 0, i64 1
  %110 = load i64, ptr %109, align 8, !tbaa !5
  %111 = sub nsw i64 %106, %110
  %112 = icmp eq i64 %102, %111
  br i1 %112, label %113, label %165

113:                                              ; preds = %93
  %114 = load i64, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %114
  %116 = getelementptr inbounds [3 x i64], ptr %115, i64 0, i64 0
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = load i64, ptr %7, align 8, !tbaa !5
  %119 = srem i64 %117, %118
  %120 = icmp eq i64 %119, 0
  br i1 %120, label %121, label %164

121:                                              ; preds = %113
  %122 = load i64, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %122
  %124 = getelementptr inbounds [3 x i64], ptr %123, i64 0, i64 1
  %125 = load i64, ptr %124, align 8, !tbaa !5
  %126 = load i64, ptr %8, align 8, !tbaa !5
  %127 = srem i64 %125, %126
  %128 = icmp eq i64 %127, 0
  br i1 %128, label %129, label %164

129:                                              ; preds = %121
  %130 = load i64, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %130
  %132 = getelementptr inbounds [3 x i64], ptr %131, i64 0, i64 2
  %133 = load i64, ptr %132, align 8, !tbaa !5
  %134 = load i64, ptr %9, align 8, !tbaa !5
  %135 = srem i64 %133, %134
  %136 = icmp eq i64 %135, 0
  br i1 %136, label %137, label %164

137:                                              ; preds = %129
  %138 = load i64, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %138
  %140 = getelementptr inbounds [3 x i64], ptr %139, i64 0, i64 0
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = load i64, ptr %7, align 8, !tbaa !5
  %143 = sdiv i64 %141, %142
  %144 = icmp sgt i64 %143, 0
  br i1 %144, label %145, label %164

145:                                              ; preds = %137
  %146 = load i64, ptr %13, align 8, !tbaa !5
  %147 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %146
  %148 = getelementptr inbounds [3 x i64], ptr %147, i64 0, i64 1
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = load i64, ptr %8, align 8, !tbaa !5
  %151 = sdiv i64 %149, %150
  %152 = icmp sgt i64 %151, 0
  br i1 %152, label %153, label %164

153:                                              ; preds = %145
  %154 = load i64, ptr %13, align 8, !tbaa !5
  %155 = getelementptr inbounds [4 x [3 x i64]], ptr %2, i64 0, i64 %154
  %156 = getelementptr inbounds [3 x i64], ptr %155, i64 0, i64 2
  %157 = load i64, ptr %156, align 8, !tbaa !5
  %158 = load i64, ptr %9, align 8, !tbaa !5
  %159 = sdiv i64 %157, %158
  %160 = icmp sgt i64 %159, 0
  br i1 %160, label %161, label %164

161:                                              ; preds = %153
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef @.str.1)
  store i32 1, ptr %5, align 4
  br label %169

164:                                              ; preds = %153, %145, %137, %129, %121, %113
  br label %165

165:                                              ; preds = %164, %93
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %13, align 8, !tbaa !5
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %13, align 8, !tbaa !5
  br label %88, !llvm.loop !13

169:                                              ; preds = %161, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  %170 = load i32, ptr %5, align 4
  switch i32 %170, label %174 [
    i32 11, label %171
  ]

171:                                              ; preds = %169
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef @.str.1)
  store i32 0, ptr %5, align 4
  br label %174

174:                                              ; preds = %171, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  %175 = load i32, ptr %5, align 4
  switch i32 %175, label %177 [
    i32 0, label %176
    i32 1, label %176
  ]

176:                                              ; preds = %174, %174
  ret void

177:                                              ; preds = %174
  unreachable
}

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

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

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

; 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) #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 = { 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 #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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"

%"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 [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
.preheader.preheader:
  %0 = alloca [4 x [3 x i64]], align 16
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %0) #3
  %1 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %0)
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %6 = load i64, ptr %0, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 %6, ptr %7, align 8, !tbaa !5
  %8 = load i64, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %8, ptr %9, align 16, !tbaa !5
  %10 = load i64, ptr %4, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  store i64 %6, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 56
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %10, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 72
  %16 = getelementptr inbounds i8, ptr %0, i64 80
  store i64 %8, ptr %16, align 16, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 88
  store i64 %10, ptr %17, align 8, !tbaa !5
  %18 = add nsw i64 %10, %6
  %19 = sdiv i64 %18, 2
  %factor = shl i64 %8, 1
  %20 = sub i64 %factor, %10
  %21 = sub i64 %factor, %6
  store i64 %21, ptr %11, align 8, !tbaa !5
  store i64 %19, ptr %13, align 8, !tbaa !5
  store i64 %20, ptr %15, align 8, !tbaa !5
  %22 = sub nsw i64 %8, %6
  %23 = sub nsw i64 %10, %8
  %24 = icmp eq i64 %22, %23
  br i1 %24, label %50, label %25

25:                                               ; preds = %.preheader.preheader
  %26 = sub nsw i64 %21, %8
  %27 = icmp eq i64 %22, %26
  br i1 %27, label %28, label %33

28:                                               ; preds = %25
  %29 = srem i64 %21, %10
  %30 = sdiv i64 %21, %10
  %31 = icmp eq i64 %29, 0
  %32 = icmp sgt i64 %30, 0
  %or.cond = and i1 %31, %32
  br i1 %or.cond, label %50, label %33

33:                                               ; preds = %28, %25
  %34 = sub nsw i64 %19, %6
  %35 = sub nsw i64 %10, %19
  %36 = icmp eq i64 %34, %35
  br i1 %36, label %37, label %42

37:                                               ; preds = %33
  %38 = srem i64 %19, %8
  %39 = sdiv i64 %19, %8
  %40 = icmp eq i64 %38, 0
  %41 = icmp sgt i64 %39, 0
  %or.cond71 = and i1 %40, %41
  br i1 %or.cond71, label %50, label %42

42:                                               ; preds = %37, %33
  %43 = sub nsw i64 %8, %20
  %44 = icmp eq i64 %43, %23
  br i1 %44, label %45, label %.critedge

45:                                               ; preds = %42
  %46 = srem i64 %20, %6
  %47 = sdiv i64 %20, %6
  %48 = icmp eq i64 %46, 0
  %49 = icmp sgt i64 %47, 0
  %or.cond72 = and i1 %48, %49
  br i1 %or.cond72, label %50, label %.critedge

.critedge:                                        ; preds = %45, %42
  br label %50

50:                                               ; preds = %45, %37, %28, %.preheader.preheader, %.critedge
  %.str.sink = phi ptr [ @.str.2, %.critedge ], [ @.str, %.preheader.preheader ], [ @.str, %28 ], [ @.str, %37 ], [ @.str, %45 ]
  %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.sink)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @.str.1)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %0) #3
  ret void
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 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: 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 #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 = { 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 #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: BDCEPass,DSEPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass