; LLVM IR from ShahjalalShohag/code-library :: Math (Basis Vector Reduced Row Echelon Form)

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

%struct.Basis = type { [30 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }

@t = external dso_local global %struct.Basis, align 4
@g = external dso_local global [100009 x %"class.std::vector"], align 16
@a = external dso_local global [100009 x i32], align 16
@p = external dso_local global [100009 x i32], align 16
@cnt = external dso_local global [30 x [100009 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %29

29:                                               ; preds = %44, %0
  %30 = load i32, ptr %5, align 4, !tbaa !8
  %31 = load i32, ptr %3, align 4, !tbaa !8
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %47

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %38 = load i32, ptr %6, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @g, i64 0, i64 %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %41 = load i32, ptr %7, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @g, i64 0, i64 %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %44

44:                                               ; preds = %34
  %45 = load i32, ptr %5, align 4, !tbaa !8
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !8
  br label %29, !llvm.loop !11

47:                                               ; preds = %33
  call void @_Z3dfsi(i32 noundef 1)
  call void @_ZN5Basis24reduced_row_echelon_formEv(ptr noundef nonnull align 4 dereferenceable(120) @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %98, %47
  %49 = load i32, ptr %11, align 4, !tbaa !8
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %101

53:                                               ; preds = %48
  %54 = load i32, ptr %11, align 4, !tbaa !8
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = load i32, ptr %11, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100009 x i32], ptr @a, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !8
  %63 = xor i32 %58, %62
  %64 = load i32, ptr %11, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %65
  store i32 %63, ptr %66, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %67

67:                                               ; preds = %94, %53
  %68 = load i32, ptr %13, align 4, !tbaa !8
  %69 = icmp slt i32 %68, 30
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %97

71:                                               ; preds = %67
  %72 = load i32, ptr %13, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %73
  %75 = load i32, ptr %11, align 4, !tbaa !8
  %76 = sub nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100009 x i32], ptr %74, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = load i32, ptr %11, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100009 x i32], ptr @a, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !8
  %84 = load i32, ptr %13, align 4, !tbaa !8
  %85 = ashr i32 %83, %84
  %86 = and i32 %85, 1
  %87 = add nsw i32 %79, %86
  %88 = load i32, ptr %13, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %89
  %91 = load i32, ptr %11, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100009 x i32], ptr %90, i64 0, i64 %92
  store i32 %87, ptr %93, align 4, !tbaa !8
  br label %94

94:                                               ; preds = %71
  %95 = load i32, ptr %13, align 4, !tbaa !8
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %13, align 4, !tbaa !8
  br label %67, !llvm.loop !13

97:                                               ; preds = %70
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %11, align 4, !tbaa !8
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %11, align 4, !tbaa !8
  br label %48, !llvm.loop !14

101:                                              ; preds = %52
  br label %102

102:                                              ; preds = %188, %101
  %103 = load i32, ptr %4, align 4, !tbaa !8
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %4, align 4, !tbaa !8
  %105 = icmp ne i32 %103, 0
  br i1 %105, label %106, label %192

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %109 = load i32, ptr %15, align 4, !tbaa !8
  %110 = load i32, ptr %14, align 4, !tbaa !8
  %111 = sub nsw i32 %109, %110
  %112 = srem i32 %111, 2
  %113 = load i32, ptr %15, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = load i32, ptr %14, align 4, !tbaa !8
  %118 = sub nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !8
  %122 = xor i32 %116, %121
  %123 = mul nsw i32 %112, %122
  store i32 %123, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %124

124:                                              ; preds = %185, %106
  %125 = load i32, ptr %17, align 4, !tbaa !8
  %126 = icmp slt i32 %125, 30
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %188

128:                                              ; preds = %124
  %129 = load i32, ptr %17, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [30 x i32], ptr @t, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !8
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %184

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %135 = load i32, ptr %17, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %136
  %138 = load i32, ptr %15, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100009 x i32], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !8
  %142 = load i32, ptr %17, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %143
  %145 = load i32, ptr %14, align 4, !tbaa !8
  %146 = sub nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [100009 x i32], ptr %144, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !8
  %150 = sub nsw i32 %141, %149
  store i32 %150, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %151 = load i32, ptr %15, align 4, !tbaa !8
  %152 = load i32, ptr %14, align 4, !tbaa !8
  %153 = sub nsw i32 %151, %152
  %154 = add nsw i32 %153, 1
  %155 = load i32, ptr %18, align 4, !tbaa !8
  %156 = sub nsw i32 %154, %155
  store i32 %156, ptr %19, align 4, !tbaa !8
  %157 = load i32, ptr %18, align 4, !tbaa !8
  %158 = sext i32 %157 to i64
  %159 = mul nsw i64 1, %158
  %160 = load i32, ptr %18, align 4, !tbaa !8
  %161 = sub nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = mul nsw i64 %159, %162
  %164 = sdiv i64 %163, 2
  %165 = load i32, ptr %19, align 4, !tbaa !8
  %166 = sext i32 %165 to i64
  %167 = mul nsw i64 1, %166
  %168 = load i32, ptr %19, align 4, !tbaa !8
  %169 = sub nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = mul nsw i64 %167, %170
  %172 = sdiv i64 %171, 2
  %173 = add nsw i64 %164, %172
  %174 = and i64 %173, 1
  %175 = icmp ne i64 %174, 0
  br i1 %175, label %176, label %183

176:                                              ; preds = %134
  %177 = load i32, ptr %17, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [30 x i32], ptr @t, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !8
  %181 = load i32, ptr %16, align 4, !tbaa !8
  %182 = xor i32 %181, %180
  store i32 %182, ptr %16, align 4, !tbaa !8
  br label %183

183:                                              ; preds = %176, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %184

184:                                              ; preds = %183, %128
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %17, align 4, !tbaa !8
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %17, align 4, !tbaa !8
  br label %124, !llvm.loop !15

188:                                              ; preds = %127
  %189 = load i32, ptr %16, align 4, !tbaa !8
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %189)
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %190, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %102, !llvm.loop !16

192:                                              ; preds = %102
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %193 = load i32, ptr %1, align 4
  ret i32 %193
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Basis24reduced_row_echelon_formEv(ptr noundef nonnull align 4 dereferenceable(120)) #4 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Basis = type { [30 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }

@t = external dso_local global %struct.Basis, align 4
@g = external dso_local global [100009 x %"class.std::vector"], align 16
@a = external dso_local local_unnamed_addr global [100009 x i32], align 16
@p = external dso_local local_unnamed_addr global [100009 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [30 x [100009 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %20 = load i32, ptr %2, align 4, !tbaa !8
  %.not40 = icmp slt i32 %20, 1
  br i1 %.not40, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @_Z3dfsi(i32 noundef 1)
  call void @_ZN5Basis24reduced_row_echelon_formEv(ptr noundef nonnull align 4 dereferenceable(120) @t)
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %.not3443 = icmp slt i32 %21, 1
  br i1 %.not3443, label %.preheader, label %.lr.ph46.preheader

.lr.ph46.preheader:                               ; preds = %._crit_edge
  %22 = add nuw i32 %21, 1
  %wide.trip.count = zext i32 %22 to i64
  br label %.lr.ph46

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.041 = phi i32 [ %32, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %26 = load i32, ptr %4, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @g, i64 0, i64 %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %29 = load i32, ptr %5, align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @g, i64 0, i64 %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %32 = add nuw nsw i32 %.041, 1
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.041, %33
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph46, %._crit_edge
  %34 = load i32, ptr %3, align 4, !tbaa !8
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr %3, align 4, !tbaa !8
  %.not3549 = icmp eq i32 %34, 0
  br i1 %.not3549, label %._crit_edge51, label %.lr.ph50

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %.lr.ph46
  %indvars.iv = phi i64 [ 1, %.lr.ph46.preheader ], [ %indvars.iv.next, %.lr.ph46 ]
  %36 = add nsw i64 %indvars.iv, -1
  %37 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !8
  %39 = getelementptr inbounds [100009 x i32], ptr @a, i64 0, i64 %indvars.iv
  %40 = load i32, ptr %39, align 4, !tbaa !8
  %41 = xor i32 %40, %38
  %42 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %indvars.iv
  store i32 %41, ptr %42, align 4, !tbaa !8
  %43 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 0, i64 %36
  %44 = load i32, ptr %43, align 4, !tbaa !8
  %45 = and i32 %40, 1
  %46 = add nsw i32 %44, %45
  %47 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 0, i64 %indvars.iv
  store i32 %46, ptr %47, align 4, !tbaa !8
  %48 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 1, i64 %36
  %49 = load i32, ptr %48, align 4, !tbaa !8
  %50 = lshr i32 %40, 1
  %51 = and i32 %50, 1
  %52 = add nsw i32 %49, %51
  %53 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 1, i64 %indvars.iv
  store i32 %52, ptr %53, align 4, !tbaa !8
  %54 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 2, i64 %36
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = lshr i32 %40, 2
  %57 = and i32 %56, 1
  %58 = add nsw i32 %55, %57
  %59 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 2, i64 %indvars.iv
  store i32 %58, ptr %59, align 4, !tbaa !8
  %60 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 3, i64 %36
  %61 = load i32, ptr %60, align 4, !tbaa !8
  %62 = lshr i32 %40, 3
  %63 = and i32 %62, 1
  %64 = add nsw i32 %61, %63
  %65 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 3, i64 %indvars.iv
  store i32 %64, ptr %65, align 4, !tbaa !8
  %66 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 4, i64 %36
  %67 = load i32, ptr %66, align 4, !tbaa !8
  %68 = lshr i32 %40, 4
  %69 = and i32 %68, 1
  %70 = add nsw i32 %67, %69
  %71 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 4, i64 %indvars.iv
  store i32 %70, ptr %71, align 4, !tbaa !8
  %72 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 5, i64 %36
  %73 = load i32, ptr %72, align 4, !tbaa !8
  %74 = lshr i32 %40, 5
  %75 = and i32 %74, 1
  %76 = add nsw i32 %73, %75
  %77 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 5, i64 %indvars.iv
  store i32 %76, ptr %77, align 4, !tbaa !8
  %78 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 6, i64 %36
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = lshr i32 %40, 6
  %81 = and i32 %80, 1
  %82 = add nsw i32 %79, %81
  %83 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 6, i64 %indvars.iv
  store i32 %82, ptr %83, align 4, !tbaa !8
  %84 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 7, i64 %36
  %85 = load i32, ptr %84, align 4, !tbaa !8
  %86 = lshr i32 %40, 7
  %87 = and i32 %86, 1
  %88 = add nsw i32 %85, %87
  %89 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 7, i64 %indvars.iv
  store i32 %88, ptr %89, align 4, !tbaa !8
  %90 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 8, i64 %36
  %91 = load i32, ptr %90, align 4, !tbaa !8
  %92 = lshr i32 %40, 8
  %93 = and i32 %92, 1
  %94 = add nsw i32 %91, %93
  %95 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 8, i64 %indvars.iv
  store i32 %94, ptr %95, align 4, !tbaa !8
  %96 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 9, i64 %36
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = lshr i32 %40, 9
  %99 = and i32 %98, 1
  %100 = add nsw i32 %97, %99
  %101 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 9, i64 %indvars.iv
  store i32 %100, ptr %101, align 4, !tbaa !8
  %102 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 10, i64 %36
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = lshr i32 %40, 10
  %105 = and i32 %104, 1
  %106 = add nsw i32 %103, %105
  %107 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 10, i64 %indvars.iv
  store i32 %106, ptr %107, align 4, !tbaa !8
  %108 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 11, i64 %36
  %109 = load i32, ptr %108, align 4, !tbaa !8
  %110 = lshr i32 %40, 11
  %111 = and i32 %110, 1
  %112 = add nsw i32 %109, %111
  %113 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 11, i64 %indvars.iv
  store i32 %112, ptr %113, align 4, !tbaa !8
  %114 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 12, i64 %36
  %115 = load i32, ptr %114, align 4, !tbaa !8
  %116 = lshr i32 %40, 12
  %117 = and i32 %116, 1
  %118 = add nsw i32 %115, %117
  %119 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 12, i64 %indvars.iv
  store i32 %118, ptr %119, align 4, !tbaa !8
  %120 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 13, i64 %36
  %121 = load i32, ptr %120, align 4, !tbaa !8
  %122 = lshr i32 %40, 13
  %123 = and i32 %122, 1
  %124 = add nsw i32 %121, %123
  %125 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 13, i64 %indvars.iv
  store i32 %124, ptr %125, align 4, !tbaa !8
  %126 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 14, i64 %36
  %127 = load i32, ptr %126, align 4, !tbaa !8
  %128 = lshr i32 %40, 14
  %129 = and i32 %128, 1
  %130 = add nsw i32 %127, %129
  %131 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 14, i64 %indvars.iv
  store i32 %130, ptr %131, align 4, !tbaa !8
  %132 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 15, i64 %36
  %133 = load i32, ptr %132, align 4, !tbaa !8
  %134 = lshr i32 %40, 15
  %135 = and i32 %134, 1
  %136 = add nsw i32 %133, %135
  %137 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 15, i64 %indvars.iv
  store i32 %136, ptr %137, align 4, !tbaa !8
  %138 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 16, i64 %36
  %139 = load i32, ptr %138, align 4, !tbaa !8
  %140 = lshr i32 %40, 16
  %141 = and i32 %140, 1
  %142 = add nsw i32 %139, %141
  %143 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 16, i64 %indvars.iv
  store i32 %142, ptr %143, align 4, !tbaa !8
  %144 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 17, i64 %36
  %145 = load i32, ptr %144, align 4, !tbaa !8
  %146 = lshr i32 %40, 17
  %147 = and i32 %146, 1
  %148 = add nsw i32 %145, %147
  %149 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 17, i64 %indvars.iv
  store i32 %148, ptr %149, align 4, !tbaa !8
  %150 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 18, i64 %36
  %151 = load i32, ptr %150, align 4, !tbaa !8
  %152 = lshr i32 %40, 18
  %153 = and i32 %152, 1
  %154 = add nsw i32 %151, %153
  %155 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 18, i64 %indvars.iv
  store i32 %154, ptr %155, align 4, !tbaa !8
  %156 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 19, i64 %36
  %157 = load i32, ptr %156, align 4, !tbaa !8
  %158 = lshr i32 %40, 19
  %159 = and i32 %158, 1
  %160 = add nsw i32 %157, %159
  %161 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 19, i64 %indvars.iv
  store i32 %160, ptr %161, align 4, !tbaa !8
  %162 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 20, i64 %36
  %163 = load i32, ptr %162, align 4, !tbaa !8
  %164 = lshr i32 %40, 20
  %165 = and i32 %164, 1
  %166 = add nsw i32 %163, %165
  %167 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 20, i64 %indvars.iv
  store i32 %166, ptr %167, align 4, !tbaa !8
  %168 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 21, i64 %36
  %169 = load i32, ptr %168, align 4, !tbaa !8
  %170 = lshr i32 %40, 21
  %171 = and i32 %170, 1
  %172 = add nsw i32 %169, %171
  %173 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 21, i64 %indvars.iv
  store i32 %172, ptr %173, align 4, !tbaa !8
  %174 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 22, i64 %36
  %175 = load i32, ptr %174, align 4, !tbaa !8
  %176 = lshr i32 %40, 22
  %177 = and i32 %176, 1
  %178 = add nsw i32 %175, %177
  %179 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 22, i64 %indvars.iv
  store i32 %178, ptr %179, align 4, !tbaa !8
  %180 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 23, i64 %36
  %181 = load i32, ptr %180, align 4, !tbaa !8
  %182 = lshr i32 %40, 23
  %183 = and i32 %182, 1
  %184 = add nsw i32 %181, %183
  %185 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 23, i64 %indvars.iv
  store i32 %184, ptr %185, align 4, !tbaa !8
  %186 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 24, i64 %36
  %187 = load i32, ptr %186, align 4, !tbaa !8
  %188 = lshr i32 %40, 24
  %189 = and i32 %188, 1
  %190 = add nsw i32 %187, %189
  %191 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 24, i64 %indvars.iv
  store i32 %190, ptr %191, align 4, !tbaa !8
  %192 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 25, i64 %36
  %193 = load i32, ptr %192, align 4, !tbaa !8
  %194 = lshr i32 %40, 25
  %195 = and i32 %194, 1
  %196 = add nsw i32 %193, %195
  %197 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 25, i64 %indvars.iv
  store i32 %196, ptr %197, align 4, !tbaa !8
  %198 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 26, i64 %36
  %199 = load i32, ptr %198, align 4, !tbaa !8
  %200 = lshr i32 %40, 26
  %201 = and i32 %200, 1
  %202 = add nsw i32 %199, %201
  %203 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 26, i64 %indvars.iv
  store i32 %202, ptr %203, align 4, !tbaa !8
  %204 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 27, i64 %36
  %205 = load i32, ptr %204, align 4, !tbaa !8
  %206 = lshr i32 %40, 27
  %207 = and i32 %206, 1
  %208 = add nsw i32 %205, %207
  %209 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 27, i64 %indvars.iv
  store i32 %208, ptr %209, align 4, !tbaa !8
  %210 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 28, i64 %36
  %211 = load i32, ptr %210, align 4, !tbaa !8
  %212 = lshr i32 %40, 28
  %213 = and i32 %212, 1
  %214 = add nsw i32 %211, %213
  %215 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 28, i64 %indvars.iv
  store i32 %214, ptr %215, align 4, !tbaa !8
  %216 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 29, i64 %36
  %217 = load i32, ptr %216, align 4, !tbaa !8
  %218 = lshr i32 %40, 29
  %219 = and i32 %218, 1
  %220 = add nsw i32 %217, %219
  %221 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 29, i64 %indvars.iv
  store i32 %220, ptr %221, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph46, !llvm.loop !13

.lr.ph50:                                         ; preds = %.preheader, %237
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %222 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %223 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %222, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %224 = load i32, ptr %10, align 4, !tbaa !8
  %225 = load i32, ptr %9, align 4, !tbaa !8
  %226 = sub nsw i32 %224, %225
  %227 = srem i32 %226, 2
  %228 = sext i32 %224 to i64
  %229 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !8
  %231 = add nsw i32 %225, -1
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !8
  %235 = xor i32 %234, %230
  %236 = mul nsw i32 %235, %227
  %.neg39 = add i32 %224, 1
  br label %242

237:                                              ; preds = %266
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.2)
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %238, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %240 = load i32, ptr %3, align 4, !tbaa !8
  %241 = add nsw i32 %240, -1
  store i32 %241, ptr %3, align 4, !tbaa !8
  %.not35 = icmp eq i32 %240, 0
  br i1 %.not35, label %._crit_edge51, label %.lr.ph50, !llvm.loop !14

242:                                              ; preds = %.lr.ph50, %266
  %indvars.iv54 = phi i64 [ 0, %.lr.ph50 ], [ %indvars.iv.next55, %266 ]
  %.03047 = phi i32 [ %236, %.lr.ph50 ], [ %.2, %266 ]
  %243 = getelementptr inbounds [30 x i32], ptr @t, i64 0, i64 %indvars.iv54
  %244 = load i32, ptr %243, align 4, !tbaa !8
  %.not36 = icmp eq i32 %244, 0
  br i1 %.not36, label %266, label %245

245:                                              ; preds = %242
  %246 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %indvars.iv54, i64 %228
  %247 = load i32, ptr %246, align 4, !tbaa !8
  %248 = getelementptr inbounds [30 x [100009 x i32]], ptr @cnt, i64 0, i64 %indvars.iv54, i64 %232
  %249 = load i32, ptr %248, align 4, !tbaa !8
  %250 = sub nsw i32 %247, %249
  %251 = add i32 %225, %250
  %252 = sub i32 %.neg39, %251
  %253 = sext i32 %250 to i64
  %254 = add nsw i32 %250, -1
  %255 = sext i32 %254 to i64
  %256 = mul nsw i64 %255, %253
  %257 = sdiv i64 %256, 2
  %258 = sext i32 %252 to i64
  %259 = add nsw i32 %252, -1
  %260 = sext i32 %259 to i64
  %261 = mul nsw i64 %260, %258
  %262 = sdiv i64 %261, 2
  %263 = add nsw i64 %262, %257
  %264 = and i64 %263, 1
  %.not37 = icmp eq i64 %264, 0
  %265 = select i1 %.not37, i32 0, i32 %244
  %spec.select = xor i32 %265, %.03047
  br label %266

266:                                              ; preds = %242, %245
  %.2 = phi i32 [ %spec.select, %245 ], [ %.03047, %242 ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next55, 30
  br i1 %exitcond57.not, label %237, label %242, !llvm.loop !15

._crit_edge51:                                    ; preds = %237, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Basis24reduced_row_echelon_formEv(ptr noundef nonnull align 4 dereferenceable(120)) local_unnamed_addr #4 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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