; LLVM IR from kazunetakahashi/atcoder :: 2019/0601_m-solutions2019 (F2)

; 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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }
%"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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::bitset<2010>::reference" = type { ptr, i64 }

@dp_L = external dso_local global [2010 x %"class.std::bitset"], align 16
@dp_R = external dso_local global [2010 x %"class.std::bitset"], align 16
@W = external dso_local global [2010 x %"class.std::bitset"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::bitset<2010>::reference", align 8
  %10 = alloca %"class.std::bitset<2010>::reference", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::bitset<2010>::reference", align 8
  %13 = alloca %"class.std::bitset<2010>::reference", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::bitset", align 8
  %18 = alloca %"class.std::bitset", align 8
  %19 = alloca %"class.std::bitset<2010>::reference", align 8
  %20 = alloca %"class.std::bitset", align 8
  %21 = alloca %"class.std::bitset", align 8
  %22 = alloca %"class.std::bitset<2010>::reference", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::bitset", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %85, %0
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %89

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %33 unwind label %39

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

34:                                               ; preds = %80, %33
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %43, label %38

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

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  br label %88

43:                                               ; preds = %34
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %45)
          to label %47 unwind label %59

47:                                               ; preds = %43
  %48 = load i8, ptr %46, align 1, !tbaa !9
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 48
  br i1 %50, label %51, label %67

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %53
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  invoke void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %9, ptr noundef nonnull align 8 dereferenceable(256) %54, i64 noundef %56)
          to label %57 unwind label %63

57:                                               ; preds = %51
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %79

59:                                               ; preds = %43
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  br label %83

63:                                               ; preds = %51
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %83

67:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %69
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  invoke void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %10, ptr noundef nonnull align 8 dereferenceable(256) %70, i64 noundef %72)
          to label %73 unwind label %75

73:                                               ; preds = %67
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %79

75:                                               ; preds = %67
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %83

79:                                               ; preds = %73, %57
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %8, align 4, !tbaa !5
  br label %34, !llvm.loop !10

83:                                               ; preds = %75, %63, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %88

84:                                               ; preds = %38
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !12

88:                                               ; preds = %83, %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %185

89:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %108, %89
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = load i32, ptr %2, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %111

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %97
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(256) %98, i64 noundef %100)
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %103
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %13, ptr noundef nonnull align 8 dereferenceable(256) %104, i64 noundef %106)
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %108

108:                                              ; preds = %95
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %11, align 4, !tbaa !5
  br label %90, !llvm.loop !13

111:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %171, %111
  %113 = load i32, ptr %14, align 4, !tbaa !5
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %174

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %167, %117
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = add nsw i32 %119, %120
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %118
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %170

125:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = add nsw i32 %126, %127
  store i32 %128, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr %18) #7
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %131
  %133 = load i32, ptr %16, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %134
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %18, ptr noundef nonnull align 8 dereferenceable(256) %132, ptr noundef nonnull align 8 dereferenceable(256) %135) #7
  %136 = load i32, ptr %15, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %137
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %17, ptr noundef nonnull align 8 dereferenceable(256) %18, ptr noundef nonnull align 8 dereferenceable(256) %138) #7
  %139 = call noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256) %17) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #7
  br i1 %139, label %140, label %147

140:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %141 = load i32, ptr %16, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %142
  %144 = load i32, ptr %15, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %19, ptr noundef nonnull align 8 dereferenceable(256) %143, i64 noundef %145)
  %146 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %147

147:                                              ; preds = %140, %125
  call void @llvm.lifetime.start.p0(i64 256, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr %21) #7
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %149
  %151 = load i32, ptr %16, align 4, !tbaa !5
  %152 = sub nsw i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %153
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %21, ptr noundef nonnull align 8 dereferenceable(256) %150, ptr noundef nonnull align 8 dereferenceable(256) %154) #7
  %155 = load i32, ptr %16, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %156
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %20, ptr noundef nonnull align 8 dereferenceable(256) %21, ptr noundef nonnull align 8 dereferenceable(256) %157) #7
  %158 = call noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256) %20) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %20) #7
  br i1 %158, label %159, label %166

159:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %160 = load i32, ptr %15, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %161
  %163 = load i32, ptr %16, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<2010>::reference") align 8 %22, ptr noundef nonnull align 8 dereferenceable(256) %162, i64 noundef %164)
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %22, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %166

166:                                              ; preds = %159, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %167

167:                                              ; preds = %166
  %168 = load i32, ptr %15, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %15, align 4, !tbaa !5
  br label %118, !llvm.loop !14

170:                                              ; preds = %124
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %14, align 4, !tbaa !5
  br label %112, !llvm.loop !15

174:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr %24) #7
  %175 = load i32, ptr %2, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %177
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %24, ptr noundef nonnull align 8 dereferenceable(256) @dp_R, ptr noundef nonnull align 8 dereferenceable(256) %178) #7
  %179 = call noundef i64 @_ZNKSt6bitsetILm2010EE5countEv(ptr noundef nonnull align 8 dereferenceable(256) %24) #7
  %180 = trunc i64 %179 to i32
  call void @llvm.lifetime.end.p0(i64 256, ptr %24) #7
  store i32 %180, ptr %23, align 4, !tbaa !5
  %181 = load i32, ptr %23, align 4, !tbaa !5
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %181)
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %184 = load i32, ptr %1, align 4
  ret i32 %184

185:                                              ; preds = %88
  %186 = load ptr, ptr %6, align 8
  %187 = load i32, ptr %7, align 4
  %188 = insertvalue { ptr, i32 } poison, ptr %186, 0
  %189 = insertvalue { ptr, i32 } %188, i32 %187, 1
  resume { ptr, i32 } %189
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<2010>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm2010EE5countEv(ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}


; 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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }
%"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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::bitset<2010>::reference" = type { ptr, i64 }

@dp_L = external dso_local global [2010 x %"class.std::bitset"], align 16
@dp_R = external dso_local global [2010 x %"class.std::bitset"], align 16
@W = external dso_local global [2010 x %"class.std::bitset"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::bitset<2010>::reference", align 8
  %4 = alloca %"class.std::bitset<2010>::reference", align 8
  %5 = alloca %"class.std::bitset<2010>::reference", align 8
  %6 = alloca %"class.std::bitset<2010>::reference", align 8
  %7 = alloca %"class.std::bitset", align 8
  %8 = alloca %"class.std::bitset", align 8
  %9 = alloca %"class.std::bitset<2010>::reference", align 8
  %10 = alloca %"class.std::bitset", align 8
  %11 = alloca %"class.std::bitset", align 8
  %12 = alloca %"class.std::bitset<2010>::reference", align 8
  %13 = alloca %"class.std::bitset", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 1
  br i1 %16, label %.lr.ph, label %.preheader42

.preheader42:                                     ; preds = %21, %0
  %17 = phi i32 [ %15, %0 ], [ %22, %21 ]
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph47, label %._crit_edge51

.lr.ph:                                           ; preds = %0, %21
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %21 ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %.preheader43 unwind label %25

.preheader43:                                     ; preds = %.lr.ph
  %20 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %indvars.iv54
  br label %27

21:                                               ; preds = %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next55, %23
  br i1 %24, label %.lr.ph, label %.preheader42, !llvm.loop !9

25:                                               ; preds = %.lr.ph
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %26

27:                                               ; preds = %.preheader43, %36
  %indvars.iv = phi i64 [ 0, %.preheader43 ], [ %indvars.iv.next, %36 ]
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv)
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = icmp eq i8 %29, 48
  br i1 %30, label %31, label %34

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %32 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %indvars.iv
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %3, ptr noundef nonnull align 8 dereferenceable(256) %32, i64 noundef %indvars.iv54)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %3, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %36

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %4, ptr noundef nonnull align 8 dereferenceable(256) %20, i64 noundef %indvars.iv)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %36

36:                                               ; preds = %31, %34
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv54
  br i1 %exitcond.not, label %21, label %27, !llvm.loop !12

.preheader41:                                     ; preds = %.lr.ph47
  %37 = icmp sgt i32 %42, 1
  br i1 %37, label %.preheader, label %._crit_edge51

.lr.ph47:                                         ; preds = %.preheader42, %.lr.ph47
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %.lr.ph47 ], [ 0, %.preheader42 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %38 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %indvars.iv57
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %5, ptr noundef nonnull align 8 dereferenceable(256) %38, i64 noundef %indvars.iv57)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %40 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %indvars.iv57
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %6, ptr noundef nonnull align 8 dereferenceable(256) %40, i64 noundef %indvars.iv57)
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next58, %43
  br i1 %44, label %.lr.ph47, label %.preheader41, !llvm.loop !13

.preheader:                                       ; preds = %.preheader41, %._crit_edge
  %45 = phi i32 [ %55, %._crit_edge ], [ %42, %.preheader41 ]
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %._crit_edge ], [ 1, %.preheader41 ]
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv63, %46
  br i1 %47, label %.lr.ph49, label %._crit_edge

._crit_edge51:                                    ; preds = %._crit_edge, %.preheader42, %.preheader41
  %.lcssa = phi i32 [ %42, %.preheader41 ], [ %17, %.preheader42 ], [ %55, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %13) #7
  %48 = add nsw i32 %.lcssa, -1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %49
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %13, ptr noundef nonnull align 8 dereferenceable(256) @dp_R, ptr noundef nonnull align 8 dereferenceable(256) %50) #7
  %51 = call noundef i64 @_ZNKSt6bitsetILm2010EE5countEv(ptr noundef nonnull align 8 dereferenceable(256) %13) #7
  %52 = trunc i64 %51 to i32
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %13) #7
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

._crit_edge:                                      ; preds = %72, %.preheader
  %.pre-phi = phi i64 [ %46, %.preheader ], [ %75, %72 ]
  %55 = phi i32 [ %45, %.preheader ], [ %74, %72 ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %56 = icmp slt i64 %indvars.iv.next64, %.pre-phi
  br i1 %56, label %.preheader, label %._crit_edge51, !llvm.loop !14

.lr.ph49:                                         ; preds = %.preheader, %72
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %72 ], [ 0, %.preheader ]
  %57 = add nuw nsw i64 %indvars.iv60, %indvars.iv63
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #7
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %58 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %indvars.iv.next61
  %59 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %57
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %8, ptr noundef nonnull align 8 dereferenceable(256) %58, ptr noundef nonnull align 8 dereferenceable(256) %59) #7
  %60 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %indvars.iv60
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %7, ptr noundef nonnull align 8 dereferenceable(256) %8, ptr noundef nonnull align 8 dereferenceable(256) %60) #7
  %61 = call noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256) %7) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #7
  br i1 %61, label %62, label %64

62:                                               ; preds = %.lr.ph49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %9, ptr noundef nonnull align 8 dereferenceable(256) %59, i64 noundef %indvars.iv60)
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %64

64:                                               ; preds = %62, %.lr.ph49
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #7
  %65 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_R, i64 0, i64 %indvars.iv60
  %66 = add nsw i64 %57, -1
  %67 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @dp_L, i64 0, i64 %66
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %11, ptr noundef nonnull align 8 dereferenceable(256) %65, ptr noundef nonnull align 8 dereferenceable(256) %67) #7
  %68 = getelementptr inbounds [2010 x %"class.std::bitset"], ptr @W, i64 0, i64 %57
  call void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %10, ptr noundef nonnull align 8 dereferenceable(256) %11, ptr noundef nonnull align 8 dereferenceable(256) %68) #7
  %69 = call noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256) %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %10) #7
  br i1 %69, label %70, label %72

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<2010>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(256) %65, i64 noundef %57)
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #7
  call void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %72

72:                                               ; preds = %70, %64
  %73 = add nuw nsw i64 %indvars.iv.next61, %indvars.iv63
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %73, %75
  br i1 %76, label %.lr.ph49, label %._crit_edge, !llvm.loop !15
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm2010EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<2010>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm2010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm2010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZStanILm2010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2010EE3anyEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm2010EE5countEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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