; LLVM IR from tangjz/acm-icpc :: lydsy (3286)

; 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.Matrix = type { i64, i64, i64, i64, i64, i64 }

@A = external dso_local global [11 x %struct.Matrix], align 16
@B = external dso_local global [11 x %struct.Matrix], align 16
@SA = external dso_local global %struct.Matrix, align 8
@SB = external dso_local global %struct.Matrix, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@c = external dso_local global i64, align 8
@d = external dso_local global i64, align 8
@e = external dso_local global i64, align 8
@f = external dso_local global i64, align 8
@n = external dso_local global [1000010 x i8], align 16
@m = external dso_local global [1000010 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.Matrix, align 8
  %6 = alloca %struct.Matrix, align 8
  %7 = alloca %struct.Matrix, align 8
  %8 = alloca %struct.Matrix, align 8
  %9 = alloca %struct.Matrix, align 8
  %10 = alloca %struct.Matrix, align 8
  %11 = alloca %struct.Matrix, align 8
  %12 = alloca %struct.Matrix, align 8
  %13 = alloca %struct.Matrix, align 8
  %14 = alloca %struct.Matrix, align 8
  store i32 0, ptr %1, align 4
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @a)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @b)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @c)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @d)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @e)
  call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @f)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %16 = call i64 @strlen(ptr noundef @n) #9
  %17 = trunc i64 %16 to i32
  store i32 %17, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %18 = call i64 @strlen(ptr noundef @m) #9
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sub nsw i32 %20, 1
  store i32 %21, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = add i8 %25, -1
  store i8 %26, ptr %24, align 1, !tbaa !9
  br label %27

27:                                               ; preds = %52, %0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp sge i32 %28, 0
  br i1 %29, label %30, label %61

30:                                               ; preds = %27
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = sext i8 %34 to i32
  %36 = icmp slt i32 %35, 48
  br i1 %36, label %37, label %51

37:                                               ; preds = %30
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = add i8 %42, -1
  store i8 %43, ptr %41, align 1, !tbaa !9
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !9
  %48 = sext i8 %47 to i32
  %49 = add nsw i32 %48, 10
  %50 = trunc i32 %49 to i8
  store i8 %50, ptr %46, align 1, !tbaa !9
  br label %51

51:                                               ; preds = %37, %30
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %53 to i64
  %56 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = sext i8 %57 to i32
  %59 = sub nsw i32 %58, 48
  %60 = trunc i32 %59 to i8
  store i8 %60, ptr %56, align 1, !tbaa !9
  br label %27, !llvm.loop !10

61:                                               ; preds = %27
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  store i32 %63, ptr %2, align 4, !tbaa !5
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !9
  %68 = sext i8 %67 to i32
  %69 = sub nsw i32 %68, 2
  %70 = trunc i32 %69 to i8
  store i8 %70, ptr %66, align 1, !tbaa !9
  br label %71

71:                                               ; preds = %96, %61
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = icmp sge i32 %72, 0
  br i1 %73, label %74, label %105

74:                                               ; preds = %71
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !9
  %79 = sext i8 %78 to i32
  %80 = icmp slt i32 %79, 48
  br i1 %80, label %81, label %95

81:                                               ; preds = %74
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !9
  %87 = add i8 %86, -1
  store i8 %87, ptr %85, align 1, !tbaa !9
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !9
  %92 = sext i8 %91 to i32
  %93 = add nsw i32 %92, 10
  %94 = trunc i32 %93 to i8
  store i8 %94, ptr %90, align 1, !tbaa !9
  br label %95

95:                                               ; preds = %81, %74
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %2, align 4, !tbaa !5
  %99 = sext i32 %97 to i64
  %100 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !9
  %102 = sext i8 %101 to i32
  %103 = sub nsw i32 %102, 48
  %104 = trunc i32 %103 to i8
  store i8 %104, ptr %100, align 1, !tbaa !9
  br label %71, !llvm.loop !12

105:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #8
  %106 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 0
  store i64 1, ptr %106, align 8, !tbaa !13
  %107 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 1
  store i64 0, ptr %107, align 8, !tbaa !16
  %108 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 2
  store i64 0, ptr %108, align 8, !tbaa !17
  %109 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 3
  store i64 0, ptr %109, align 8, !tbaa !18
  %110 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 4
  store i64 1, ptr %110, align 8, !tbaa !19
  %111 = getelementptr inbounds %struct.Matrix, ptr %5, i32 0, i32 5
  store i64 0, ptr %111, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @SB, ptr align 8 %5, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @SA, ptr align 8 @SB, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @B, ptr align 8 @SA, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @A, ptr align 8 @B, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #8
  %112 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 0
  store i64 0, ptr %112, align 8, !tbaa !13
  %113 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 1
  store i64 1, ptr %113, align 8, !tbaa !16
  %114 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 2
  store i64 0, ptr %114, align 8, !tbaa !17
  %115 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 3
  %116 = load i64, ptr @a, align 8, !tbaa !22
  store i64 %116, ptr %115, align 8, !tbaa !18
  %117 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 4
  %118 = load i64, ptr @b, align 8, !tbaa !22
  store i64 %118, ptr %117, align 8, !tbaa !19
  %119 = getelementptr inbounds %struct.Matrix, ptr %6, i32 0, i32 5
  %120 = load i64, ptr @c, align 8, !tbaa !22
  store i64 %120, ptr %119, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([11 x %struct.Matrix], ptr @A, i64 0, i64 1), ptr align 8 %6, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %132, %105
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 10
  br i1 %123, label %124, label %135

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #8
  %125 = load i32, ptr %2, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [11 x %struct.Matrix], ptr @A, i64 0, i64 %127
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds ([11 x %struct.Matrix], ptr @A, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(48) %128)
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [11 x %struct.Matrix], ptr @A, i64 0, i64 %130
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %131, ptr align 8 %7, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #8
  br label %132

132:                                              ; preds = %124
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %2, align 4, !tbaa !5
  br label %121, !llvm.loop !23

135:                                              ; preds = %121
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %148, %135
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %140, label %151

140:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #8
  call void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) @SA)
  %141 = load i32, ptr %2, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %142
  %144 = load i8, ptr %143, align 1, !tbaa !9
  %145 = sext i8 %144 to i32
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [11 x %struct.Matrix], ptr @A, i64 0, i64 %146
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %8, ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(48) %147)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @SA, ptr align 8 %8, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %148

148:                                              ; preds = %140
  %149 = load i32, ptr %2, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %2, align 4, !tbaa !5
  br label %136, !llvm.loop !24

151:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #8
  %152 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 0
  store i64 0, ptr %152, align 8, !tbaa !13
  %153 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 1
  store i64 1, ptr %153, align 8, !tbaa !16
  %154 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 2
  store i64 0, ptr %154, align 8, !tbaa !17
  %155 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 3
  %156 = load i64, ptr @d, align 8, !tbaa !22
  store i64 %156, ptr %155, align 8, !tbaa !18
  %157 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 4
  %158 = load i64, ptr @e, align 8, !tbaa !22
  store i64 %158, ptr %157, align 8, !tbaa !19
  %159 = getelementptr inbounds %struct.Matrix, ptr %10, i32 0, i32 5
  %160 = load i64, ptr @f, align 8, !tbaa !22
  store i64 %160, ptr %159, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([11 x %struct.Matrix], ptr @B, i64 0, i64 1), ptr align 8 %10, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #8
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %11, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds ([11 x %struct.Matrix], ptr @B, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(48) @SA)
  call void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds ([11 x %struct.Matrix], ptr @B, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(48) %11)
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #8
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %172, %151
  %162 = load i32, ptr %2, align 4, !tbaa !5
  %163 = icmp slt i32 %162, 10
  br i1 %163, label %164, label %175

164:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #8
  %165 = load i32, ptr %2, align 4, !tbaa !5
  %166 = sub nsw i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [11 x %struct.Matrix], ptr @B, i64 0, i64 %167
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %12, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds ([11 x %struct.Matrix], ptr @B, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(48) %168)
  %169 = load i32, ptr %2, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [11 x %struct.Matrix], ptr @B, i64 0, i64 %170
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %171, ptr align 8 %12, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #8
  br label %172

172:                                              ; preds = %164
  %173 = load i32, ptr %2, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %2, align 4, !tbaa !5
  br label %161, !llvm.loop !25

175:                                              ; preds = %161
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %188, %175
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = load i32, ptr %3, align 4, !tbaa !5
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %180, label %191

180:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #8
  call void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %14, ptr noundef nonnull align 8 dereferenceable(48) @SB)
  %181 = load i32, ptr %2, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %182
  %184 = load i8, ptr %183, align 1, !tbaa !9
  %185 = sext i8 %184 to i32
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [11 x %struct.Matrix], ptr @B, i64 0, i64 %186
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(48) %187)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @SB, ptr align 8 %13, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  br label %188

188:                                              ; preds = %180
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %2, align 4, !tbaa !5
  br label %176, !llvm.loop !26

191:                                              ; preds = %176
  call void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48) @SA, ptr noundef nonnull align 8 dereferenceable(48) @SB)
  %192 = load i64, ptr getelementptr inbounds (%struct.Matrix, ptr @SA, i32 0, i32 3), align 8, !tbaa !18
  %193 = load i64, ptr getelementptr inbounds (%struct.Matrix, ptr @SA, i32 0, i32 4), align 8, !tbaa !19
  %194 = add nsw i64 %192, %193
  %195 = load i64, ptr getelementptr inbounds (%struct.Matrix, ptr @SA, i32 0, i32 5), align 8, !tbaa !20
  %196 = add nsw i64 %194, %195
  %197 = srem i64 %196, 2012182013
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %197)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %199 = load i32, ptr %1, align 4
  ret i32 %199
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(48)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #6 align 2

declare i32 @printf(ptr noundef, ...) #1

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

!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 = !{!14, !15, i64 0}
!14 = !{!"_ZTS6Matrix", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40}
!15 = !{!"long long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!14, !15, i64 16}
!18 = !{!14, !15, i64 24}
!19 = !{!14, !15, i64 32}
!20 = !{!14, !15, i64 40}
!21 = !{i64 0, i64 8, !22, i64 8, i64 8, !22, i64 16, i64 8, !22, i64 24, i64 8, !22, i64 32, i64 8, !22, i64 40, i64 8, !22}
!22 = !{!15, !15, i64 0}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !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"

%struct.Matrix = type { i64, i64, i64, i64, i64, i64 }

@A = external dso_local global [11 x %struct.Matrix], align 16
@B = external dso_local global [11 x %struct.Matrix], align 16
@SA = external dso_local global %struct.Matrix, align 8
@SB = external dso_local global %struct.Matrix, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@c = external dso_local global i64, align 8
@d = external dso_local global i64, align 8
@e = external dso_local global i64, align 8
@f = external dso_local global i64, align 8
@n = external dso_local global [1000010 x i8], align 16
@m = external dso_local global [1000010 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.Matrix, align 8
  %2 = alloca %struct.Matrix, align 8
  %3 = alloca %struct.Matrix, align 8
  %4 = alloca %struct.Matrix, align 8
  %5 = alloca %struct.Matrix, align 8
  %6 = alloca %struct.Matrix, align 8
  %7 = alloca %struct.Matrix, align 8
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @a)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @b)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @c)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @d)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @e)
  tail call void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8) @f)
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @n) #9
  %10 = trunc i64 %9 to i32
  %11 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @m) #9
  %12 = trunc i64 %11 to i32
  %13 = shl i64 %9, 32
  %sext = add i64 %13, -4294967296
  %14 = ashr exact i64 %sext, 32
  %15 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %14
  %16 = load i8, ptr %15, align 1, !tbaa !5
  %17 = add i8 %16, -1
  store i8 %17, ptr %15, align 1, !tbaa !5
  %18 = icmp sgt i32 %10, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %19 = and i64 %9, 2147483647
  %20 = add nsw i64 %19, -1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph._crit_edge
  %indvars.iv = phi i64 [ %20, %.lr.ph.preheader ], [ %24, %.lr.ph._crit_edge ]
  %21 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %indvars.iv
  %22 = load i8, ptr %21, align 1, !tbaa !5
  %23 = icmp slt i8 %22, 48
  %24 = add nsw i64 %indvars.iv, -1
  br i1 %23, label %25, label %.lr.ph._crit_edge

25:                                               ; preds = %.lr.ph
  %26 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %24
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %28 = add i8 %27, -1
  store i8 %28, ptr %26, align 1, !tbaa !5
  %29 = add nsw i8 %22, 10
  br label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph, %25
  %30 = phi i8 [ %29, %25 ], [ %22, %.lr.ph ]
  %31 = add i8 %30, -48
  store i8 %31, ptr %21, align 1, !tbaa !5
  %32 = icmp sgt i64 %indvars.iv, 0
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !8

._crit_edge:                                      ; preds = %.lr.ph._crit_edge, %0
  %33 = shl i64 %11, 32
  %sext77 = add i64 %33, -4294967296
  %34 = ashr exact i64 %sext77, 32
  %35 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !5
  %37 = add i8 %36, -2
  store i8 %37, ptr %35, align 1, !tbaa !5
  %38 = icmp sgt i32 %12, 0
  br i1 %38, label %.lr.ph47.preheader, label %._crit_edge48

.lr.ph47.preheader:                               ; preds = %._crit_edge
  %39 = and i64 %11, 2147483647
  %40 = add nsw i64 %39, -1
  br label %.lr.ph47

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %.lr.ph47._crit_edge
  %indvars.iv58 = phi i64 [ %40, %.lr.ph47.preheader ], [ %44, %.lr.ph47._crit_edge ]
  %41 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %indvars.iv58
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %43 = icmp slt i8 %42, 48
  %44 = add nsw i64 %indvars.iv58, -1
  br i1 %43, label %45, label %.lr.ph47._crit_edge

45:                                               ; preds = %.lr.ph47
  %46 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %44
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = add i8 %47, -1
  store i8 %48, ptr %46, align 1, !tbaa !5
  %49 = add nsw i8 %42, 10
  br label %.lr.ph47._crit_edge

.lr.ph47._crit_edge:                              ; preds = %.lr.ph47, %45
  %50 = phi i8 [ %49, %45 ], [ %42, %.lr.ph47 ]
  %51 = add i8 %50, -48
  store i8 %51, ptr %41, align 1, !tbaa !5
  %52 = icmp sgt i64 %indvars.iv58, 0
  br i1 %52, label %.lr.ph47, label %._crit_edge48, !llvm.loop !10

._crit_edge48:                                    ; preds = %.lr.ph47._crit_edge, %._crit_edge
  store i64 1, ptr @SB, align 8, !tbaa !11
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @SB, i64 8), i8 0, i64 24, i1 false)
  store i64 1, ptr getelementptr inbounds (i8, ptr @SB, i64 32), align 8, !tbaa !11
  store i64 0, ptr getelementptr inbounds (i8, ptr @SB, i64 40), align 8, !tbaa !11
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) @SA, ptr noundef nonnull align 8 dereferenceable(48) @SB, i64 48, i1 false), !tbaa.struct !13
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) @B, ptr noundef nonnull align 8 dereferenceable(48) @SB, i64 48, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) @A, ptr noundef nonnull align 8 dereferenceable(48) @SB, i64 48, i1 false)
  %53 = load i64, ptr @a, align 8, !tbaa !11
  %54 = load i64, ptr @b, align 8, !tbaa !11
  %55 = load i64, ptr @c, align 8, !tbaa !11
  store i64 0, ptr getelementptr inbounds (i8, ptr @A, i64 48), align 16, !tbaa !11
  store i64 1, ptr getelementptr inbounds (i8, ptr @A, i64 56), align 8, !tbaa !11
  store i64 0, ptr getelementptr inbounds (i8, ptr @A, i64 64), align 16, !tbaa !11
  store i64 %53, ptr getelementptr inbounds (i8, ptr @A, i64 72), align 8, !tbaa !11
  store i64 %54, ptr getelementptr inbounds (i8, ptr @A, i64 80), align 16, !tbaa !11
  store i64 %55, ptr getelementptr inbounds (i8, ptr @A, i64 88), align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 96), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 96))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 144), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 144))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 192), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 192))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 240), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 240))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 288), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 288))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 336), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 336))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 384), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 384))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @A, i64 432), ptr noundef nonnull align 8 dereferenceable(48) %1, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #10
  br i1 %38, label %.lr.ph51.preheader, label %._crit_edge52

.lr.ph51.preheader:                               ; preds = %._crit_edge48
  %wide.trip.count = and i64 %11, 2147483647
  br label %.lr.ph51

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %.lr.ph51
  %indvars.iv64 = phi i64 [ 0, %.lr.ph51.preheader ], [ %indvars.iv.next65, %.lr.ph51 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #10
  call void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %3, ptr noundef nonnull align 8 dereferenceable(48) @SA)
  %56 = getelementptr inbounds [1000010 x i8], ptr @m, i64 0, i64 %indvars.iv64
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = sext i8 %57 to i64
  %59 = getelementptr inbounds [11 x %struct.Matrix], ptr @A, i64 0, i64 %58
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %2, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %59)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) @SA, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #10
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next65, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !14

._crit_edge52:                                    ; preds = %.lr.ph51, %._crit_edge48
  %60 = load i64, ptr @d, align 8, !tbaa !11
  %61 = load i64, ptr @e, align 8, !tbaa !11
  %62 = load i64, ptr @f, align 8, !tbaa !11
  store i64 0, ptr getelementptr inbounds (i8, ptr @B, i64 48), align 16, !tbaa !11
  store i64 1, ptr getelementptr inbounds (i8, ptr @B, i64 56), align 8, !tbaa !11
  store i64 0, ptr getelementptr inbounds (i8, ptr @B, i64 64), align 16, !tbaa !11
  store i64 %60, ptr getelementptr inbounds (i8, ptr @B, i64 72), align 8, !tbaa !11
  store i64 %61, ptr getelementptr inbounds (i8, ptr @B, i64 80), align 16, !tbaa !11
  store i64 %62, ptr getelementptr inbounds (i8, ptr @B, i64 88), align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) @SA)
  call void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) %4)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 96), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 96))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 144), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 144))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 192), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 192))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 240), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 240))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 288), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 288))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 336), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 336))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 384), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #10
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 48), ptr noundef nonnull align 8 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 384))
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) getelementptr inbounds (i8, ptr @B, i64 432), ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #10
  br i1 %18, label %.lr.ph55.preheader, label %._crit_edge56

.lr.ph55.preheader:                               ; preds = %._crit_edge52
  %wide.trip.count74 = and i64 %9, 2147483647
  br label %.lr.ph55

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %.lr.ph55
  %indvars.iv71 = phi i64 [ 0, %.lr.ph55.preheader ], [ %indvars.iv.next72, %.lr.ph55 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #10
  call void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) @SB)
  %63 = getelementptr inbounds [1000010 x i8], ptr @n, i64 0, i64 %indvars.iv71
  %64 = load i8, ptr %63, align 1, !tbaa !5
  %65 = sext i8 %64 to i64
  %66 = getelementptr inbounds [11 x %struct.Matrix], ptr @B, i64 0, i64 %65
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %66)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) @SB, ptr noundef nonnull align 8 dereferenceable(48) %6, i64 48, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #10
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge56, label %.lr.ph55, !llvm.loop !15

._crit_edge56:                                    ; preds = %.lr.ph55, %._crit_edge52
  call void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48) @SA, ptr noundef nonnull align 8 dereferenceable(48) @SB)
  %67 = load i64, ptr getelementptr inbounds (i8, ptr @SA, i64 24), align 8, !tbaa !16
  %68 = load i64, ptr getelementptr inbounds (i8, ptr @SA, i64 32), align 8, !tbaa !18
  %69 = add nsw i64 %68, %67
  %70 = load i64, ptr getelementptr inbounds (i8, ptr @SA, i64 40), align 8, !tbaa !19
  %71 = add nsw i64 %69, %70
  %72 = srem i64 %71, 2012182013
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %72)
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanRx(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Matrix5pow10Ev(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6MatrixmLERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

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


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