; LLVM IR from kazunetakahashi/atcoder :: 2018/0415_s8pc-5/D.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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@F = external dso_local global [50 x [50 x i8]], align 16
@_ZL2dx = external hidden constant [4 x i32], align 16
@_ZL2dy = external hidden constant [4 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solvev() #0 {
  %1 = alloca i1, align 1
  %2 = alloca %"class.std::tuple", align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::tuple", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::tuple", align 4
  %13 = alloca %"class.std::tuple", align 4
  %14 = load i32, ptr @H, align 4, !tbaa !5
  %15 = sub nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %16
  %18 = load i32, ptr @W, align 4, !tbaa !5
  %19 = sub nsw i32 %18, 2
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [50 x i8], ptr %17, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !9, !range !11, !noundef !12
  %23 = trunc i8 %22 to i1
  br i1 %23, label %38, label %24

24:                                               ; preds = %0
  %25 = load i32, ptr @H, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %27, label %43

27:                                               ; preds = %24
  %28 = load i32, ptr @H, align 4, !tbaa !5
  %29 = sub nsw i32 %28, 2
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %30
  %32 = load i32, ptr @W, align 4, !tbaa !5
  %33 = sub nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [50 x i8], ptr %31, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %37 = trunc i8 %36 to i1
  br i1 %37, label %38, label %43

38:                                               ; preds = %27, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %39 = load i32, ptr @H, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %41 = load i32, ptr @W, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  store i32 %42, ptr %4, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %5, ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  store i1 true, ptr %1, align 1
  br label %164

43:                                               ; preds = %27, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %157, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr @H, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 2, ptr %7, align 4
  br label %160

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %151, %49
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = load i32, ptr @W, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 5, ptr %7, align 4
  br label %154

55:                                               ; preds = %50
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr @H, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 2
  %59 = icmp eq i32 %56, %58
  br i1 %59, label %60, label %65

60:                                               ; preds = %55
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = load i32, ptr @W, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = icmp eq i32 %61, %63
  br i1 %64, label %75, label %65

65:                                               ; preds = %60, %55
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = load i32, ptr @H, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = icmp eq i32 %66, %68
  br i1 %69, label %70, label %76

70:                                               ; preds = %65
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = load i32, ptr @W, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 2
  %74 = icmp eq i32 %71, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %70, %60
  br label %151

76:                                               ; preds = %70, %65
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %78
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [50 x i8], ptr %79, i64 0, i64 %81
  %83 = load i8, ptr %82, align 1, !tbaa !9, !range !11, !noundef !12
  %84 = trunc i8 %83 to i1
  br i1 %84, label %150, label %85

85:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %144, %85
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = icmp slt i32 %87, 4
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  store i32 8, ptr %7, align 4
  br label %147

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %91, %95
  store i32 %96, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add nsw i32 %97, %101
  store i32 %102, ptr %11, align 4, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = icmp sle i32 0, %103
  br i1 %104, label %105, label %140

105:                                              ; preds = %90
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = load i32, ptr @H, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %140

109:                                              ; preds = %105
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = icmp sle i32 0, %110
  br i1 %111, label %112, label %140

112:                                              ; preds = %109
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = load i32, ptr @W, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %116, label %140

116:                                              ; preds = %112
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %118
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [50 x i8], ptr %119, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !9, !range !11, !noundef !12
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %140

125:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8) #4
  call void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %12, ptr noundef %13)
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %127
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [50 x i8], ptr %128, i64 0, i64 %130
  store i8 1, ptr %131, align 1, !tbaa !9
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %12) #4
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %134
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %12) #4
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [50 x i8], ptr %135, i64 0, i64 %138
  store i8 1, ptr %139, align 1, !tbaa !9
  store i1 false, ptr %1, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %141

140:                                              ; preds = %116, %112, %109, %105, %90
  store i32 0, ptr %7, align 4
  br label %141

141:                                              ; preds = %140, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %142 = load i32, ptr %7, align 4
  switch i32 %142, label %147 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %9, align 4, !tbaa !5
  br label %86, !llvm.loop !13

147:                                              ; preds = %141, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %148 = load i32, ptr %7, align 4
  switch i32 %148, label %154 [
    i32 8, label %149
  ]

149:                                              ; preds = %147
  br label %150

150:                                              ; preds = %149, %76
  br label %151

151:                                              ; preds = %150, %75
  %152 = load i32, ptr %8, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %8, align 4, !tbaa !5
  br label %50, !llvm.loop !15

154:                                              ; preds = %147, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %155 = load i32, ptr %7, align 4
  switch i32 %155, label %160 [
    i32 5, label %156
  ]

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %6, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !16

160:                                              ; preds = %154, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %161 = load i32, ptr %7, align 4
  switch i32 %161, label %166 [
    i32 2, label %162
    i32 1, label %164
  ]

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 146, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #5
  unreachable

164:                                              ; preds = %160, %38
  %165 = load i1, ptr %1, align 1
  ret i1 %165

166:                                              ; preds = %160
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }

@H = external dso_local local_unnamed_addr global i32, align 4
@W = external dso_local local_unnamed_addr global i32, align 4
@F = external dso_local local_unnamed_addr global [50 x [50 x i8]], align 16
@_ZL2dx = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZL2dy = external hidden local_unnamed_addr constant [4 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca %"class.std::tuple", align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::tuple", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::tuple", align 4
  %8 = alloca %"class.std::tuple", align 4
  %9 = load i32, ptr @H, align 4
  %10 = add i32 %9, -1
  %11 = sext i32 %10 to i64
  %12 = load i32, ptr @W, align 4
  %13 = add nsw i32 %12, -2
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %11, i64 %14
  %16 = load i8, ptr %15, align 1, !tbaa !5, !range !9, !noundef !10
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %._crit_edge, label %18

._crit_edge:                                      ; preds = %0
  %.pre = add nsw i32 %12, -1
  br label %28

18:                                               ; preds = %0
  %19 = icmp sgt i32 %9, 1
  br i1 %19, label %20, label %29

20:                                               ; preds = %18
  %21 = add nsw i32 %9, -2
  %22 = zext nneg i32 %21 to i64
  %23 = add nsw i32 %12, -1
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %22, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !5, !range !9, !noundef !10
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %.thread

.thread:                                          ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %.old = icmp sgt i32 %12, 0
  br i1 %.old, label %.lr.ph.us.preheader, label %._crit_edge52

28:                                               ; preds = %._crit_edge, %20
  %.pre-phi = phi i32 [ %.pre, %._crit_edge ], [ %23, %20 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 %10, ptr %2, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 %.pre-phi, ptr %3, align 4, !tbaa !11
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %4, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  br label %178

29:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %30 = icmp eq i32 %9, 1
  %31 = icmp sgt i32 %12, 0
  %or.cond119 = and i1 %30, %31
  br i1 %or.cond119, label %.lr.ph.us.preheader, label %._crit_edge52

.lr.ph.us.preheader:                              ; preds = %29, %.thread
  %32 = add nsw i32 %12, -1
  %33 = add nsw i32 %9, -2
  %34 = zext i32 %13 to i64
  %35 = zext nneg i32 %32 to i64
  %36 = zext i32 %33 to i64
  %37 = zext nneg i32 %10 to i64
  %wide.trip.count96 = zext nneg i32 %9 to i64
  %wide.trip.count = zext nneg i32 %12 to i64
  %38 = load i32, ptr @_ZL2dx, align 16
  %39 = load i32, ptr @_ZL2dy, align 16
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  %wide.trip.count91 = zext nneg i32 %12 to i64
  %46 = load i32, ptr @_ZL2dx, align 16
  %47 = load i32, ptr @_ZL2dy, align 16
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv93 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next94, %._crit_edge.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %54 = icmp eq i64 %indvars.iv93, %36
  %55 = icmp eq i64 %indvars.iv93, %37
  %.fr.us = freeze i1 %54
  %56 = trunc nuw nsw i64 %indvars.iv93 to i32
  br i1 %.fr.us, label %.lr.ph.split.us63.preheader, label %.lr.ph.split.us.us.preheader

.lr.ph.split.us.us.preheader:                     ; preds = %.lr.ph.us
  %57 = add nsw i32 %38, %56
  %58 = icmp sgt i32 %57, -1
  %59 = icmp slt i32 %57, %9
  %60 = zext nneg i32 %57 to i64
  %61 = add nsw i32 %40, %56
  %62 = icmp sgt i32 %61, -1
  %63 = icmp slt i32 %61, %9
  %64 = zext nneg i32 %61 to i64
  %65 = add nsw i32 %42, %56
  %66 = icmp sgt i32 %65, -1
  %67 = icmp slt i32 %65, %9
  %68 = zext nneg i32 %65 to i64
  %69 = add nsw i32 %44, %56
  %70 = icmp sgt i32 %69, -1
  %71 = icmp slt i32 %69, %9
  %72 = zext nneg i32 %69 to i64
  %73 = and i1 %58, %59
  %74 = and i1 %62, %63
  %75 = and i1 %66, %67
  %76 = and i1 %70, %71
  br label %.lr.ph.split.us.us

.lr.ph.split.us63.preheader:                      ; preds = %.lr.ph.us
  %77 = add nsw i32 %46, %56
  %78 = icmp sgt i32 %77, -1
  %79 = icmp slt i32 %77, %9
  %80 = zext nneg i32 %77 to i64
  %81 = add nsw i32 %48, %56
  %82 = icmp sgt i32 %81, -1
  %83 = icmp slt i32 %81, %9
  %84 = zext nneg i32 %81 to i64
  %85 = add nsw i32 %50, %56
  %86 = icmp sgt i32 %85, -1
  %87 = icmp slt i32 %85, %9
  %88 = zext nneg i32 %85 to i64
  %89 = add nsw i32 %52, %56
  %90 = icmp sgt i32 %89, -1
  %91 = icmp slt i32 %89, %9
  %92 = zext nneg i32 %89 to i64
  %93 = and i1 %78, %79
  %94 = and i1 %82, %83
  %95 = and i1 %86, %87
  %96 = and i1 %90, %91
  br label %.lr.ph.split.us63

.lr.ph.split.us63:                                ; preds = %.lr.ph.split.us63.preheader, %.thread.us58
  %indvars.iv88 = phi i64 [ 0, %.lr.ph.split.us63.preheader ], [ %indvars.iv.next89, %.thread.us58 ]
  %97 = icmp eq i64 %indvars.iv88, %35
  %98 = icmp eq i64 %indvars.iv88, %34
  %or.cond41.us55 = and i1 %55, %98
  %or.cond = or i1 %97, %or.cond41.us55
  br i1 %or.cond, label %.thread.us58, label %99

99:                                               ; preds = %.lr.ph.split.us63
  %100 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %indvars.iv93, i64 %indvars.iv88
  %101 = load i8, ptr %100, align 1, !tbaa !5, !range !9, !noundef !10
  %102 = trunc nuw i8 %101 to i1
  br i1 %102, label %.thread.us58, label %.preheader.us59.preheader

.preheader.us59.preheader:                        ; preds = %99
  %103 = trunc nuw nsw i64 %indvars.iv88 to i32
  %104 = add nsw i32 %47, %103
  %105 = icmp ult i32 %104, %12
  %or.cond104 = select i1 %93, i1 %105, i1 false
  br i1 %or.cond104, label %106, label %.preheader.us59.1

106:                                              ; preds = %.preheader.us59.preheader
  %107 = zext nneg i32 %104 to i64
  %108 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %80, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !5, !range !9, !noundef !10
  %110 = trunc nuw i8 %109 to i1
  br i1 %110, label %.split.us, label %.preheader.us59.1

.preheader.us59.1:                                ; preds = %106, %.preheader.us59.preheader
  %111 = add nsw i32 %49, %103
  %112 = icmp ult i32 %111, %12
  %or.cond105 = select i1 %94, i1 %112, i1 false
  br i1 %or.cond105, label %113, label %.preheader.us59.2

113:                                              ; preds = %.preheader.us59.1
  %114 = zext nneg i32 %111 to i64
  %115 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %84, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !5, !range !9, !noundef !10
  %117 = trunc nuw i8 %116 to i1
  br i1 %117, label %.split.us, label %.preheader.us59.2

.preheader.us59.2:                                ; preds = %113, %.preheader.us59.1
  %118 = add nsw i32 %51, %103
  %119 = icmp ult i32 %118, %12
  %or.cond106 = select i1 %95, i1 %119, i1 false
  br i1 %or.cond106, label %120, label %.preheader.us59.3

120:                                              ; preds = %.preheader.us59.2
  %121 = zext nneg i32 %118 to i64
  %122 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %88, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !5, !range !9, !noundef !10
  %124 = trunc nuw i8 %123 to i1
  br i1 %124, label %.split.us, label %.preheader.us59.3

.preheader.us59.3:                                ; preds = %120, %.preheader.us59.2
  %125 = add nsw i32 %53, %103
  %126 = icmp ult i32 %125, %12
  %or.cond107 = select i1 %96, i1 %126, i1 false
  br i1 %or.cond107, label %127, label %.thread.us58

127:                                              ; preds = %.preheader.us59.3
  %128 = zext nneg i32 %125 to i64
  %129 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %92, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !5, !range !9, !noundef !10
  %131 = trunc nuw i8 %130 to i1
  br i1 %131, label %.split.us, label %.thread.us58

.thread.us58:                                     ; preds = %.preheader.us59.3, %127, %99, %.lr.ph.split.us63
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge.us, label %.lr.ph.split.us63, !llvm.loop !13

._crit_edge.us:                                   ; preds = %.thread.us.us, %.thread.us58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge52, label %.lr.ph.us, !llvm.loop !15

.lr.ph.split.us.us:                               ; preds = %.lr.ph.split.us.us.preheader, %.thread.us.us
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.us.us.preheader ], [ %indvars.iv.next, %.thread.us.us ]
  %132 = icmp eq i64 %indvars.iv, %34
  %or.cond41.us.us = and i1 %55, %132
  br i1 %or.cond41.us.us, label %.thread.us.us, label %133

133:                                              ; preds = %.lr.ph.split.us.us
  %134 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %indvars.iv93, i64 %indvars.iv
  %135 = load i8, ptr %134, align 1, !tbaa !5, !range !9, !noundef !10
  %136 = trunc nuw i8 %135 to i1
  br i1 %136, label %.thread.us.us, label %.preheader.us.us.preheader

.preheader.us.us.preheader:                       ; preds = %133
  %137 = trunc nuw nsw i64 %indvars.iv to i32
  %138 = add nsw i32 %39, %137
  %139 = icmp ult i32 %138, %12
  %or.cond108 = select i1 %73, i1 %139, i1 false
  br i1 %or.cond108, label %140, label %.preheader.us.us.1

140:                                              ; preds = %.preheader.us.us.preheader
  %141 = zext nneg i32 %138 to i64
  %142 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %60, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !5, !range !9, !noundef !10
  %144 = trunc nuw i8 %143 to i1
  br i1 %144, label %.split.us, label %.preheader.us.us.1

.preheader.us.us.1:                               ; preds = %140, %.preheader.us.us.preheader
  %145 = add nsw i32 %41, %137
  %146 = icmp ult i32 %145, %12
  %or.cond109 = select i1 %74, i1 %146, i1 false
  br i1 %or.cond109, label %147, label %.preheader.us.us.2

147:                                              ; preds = %.preheader.us.us.1
  %148 = zext nneg i32 %145 to i64
  %149 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %64, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !5, !range !9, !noundef !10
  %151 = trunc nuw i8 %150 to i1
  br i1 %151, label %.split.us, label %.preheader.us.us.2

.preheader.us.us.2:                               ; preds = %147, %.preheader.us.us.1
  %152 = add nsw i32 %43, %137
  %153 = icmp ult i32 %152, %12
  %or.cond110 = select i1 %75, i1 %153, i1 false
  br i1 %or.cond110, label %154, label %.preheader.us.us.3

154:                                              ; preds = %.preheader.us.us.2
  %155 = zext nneg i32 %152 to i64
  %156 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %68, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !5, !range !9, !noundef !10
  %158 = trunc nuw i8 %157 to i1
  br i1 %158, label %.split.us, label %.preheader.us.us.3

.preheader.us.us.3:                               ; preds = %154, %.preheader.us.us.2
  %159 = add nsw i32 %45, %137
  %160 = icmp ult i32 %159, %12
  %or.cond111 = select i1 %76, i1 %160, i1 false
  br i1 %or.cond111, label %161, label %.thread.us.us

161:                                              ; preds = %.preheader.us.us.3
  %162 = zext nneg i32 %159 to i64
  %163 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %72, i64 %162
  %164 = load i8, ptr %163, align 1, !tbaa !5, !range !9, !noundef !10
  %165 = trunc nuw i8 %164 to i1
  br i1 %165, label %.split.us, label %.thread.us.us

.thread.us.us:                                    ; preds = %.preheader.us.us.3, %161, %133, %.lr.ph.split.us.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond83.not, label %._crit_edge.us, label %.lr.ph.split.us.us, !llvm.loop !13

.split.us:                                        ; preds = %140, %147, %154, %161, %106, %113, %120, %127
  %.us-phi = phi i32 [ %103, %127 ], [ %103, %120 ], [ %103, %113 ], [ %103, %106 ], [ %137, %161 ], [ %137, %154 ], [ %137, %147 ], [ %137, %140 ]
  store i32 %56, ptr %5, align 4, !tbaa !11
  store i32 %.us-phi, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #4
  call void @_Z3saySt5tupleIJiiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %7, ptr noundef nonnull %8)
  %166 = load i32, ptr %5, align 4, !tbaa !11
  %167 = sext i32 %166 to i64
  %168 = load i32, ptr %6, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %167, i64 %169
  store i8 1, ptr %170, align 1, !tbaa !5
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %7) #4
  %172 = load i32, ptr %171, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %7) #4
  %175 = load i32, ptr %174, align 4, !tbaa !11
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [50 x [50 x i8]], ptr @F, i64 0, i64 %173, i64 %176
  store i8 1, ptr %177, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %178

._crit_edge52:                                    ; preds = %._crit_edge.us, %.thread, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 146, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #5
  unreachable

178:                                              ; preds = %.split.us, %28
  %.8 = phi i1 [ true, %28 ], [ false, %.split.us ]
  ret i1 %.8
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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