; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1015_KUPC_2012_practice/D.ll (Z16AB_is_equal_to_C6matrixS_S_i)

; 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 { i32, i32, %"class.std::valarray" }
%"class.std::valarray" = type { i64, ptr }
%"class.std::random_device" = type { %union.anon.0 }
%union.anon.0 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8multiply6matrixS_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrixC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z16AB_is_equal_to_C6matrixS_S_i(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::random_device", align 8
  %11 = alloca %"class.std::mersenne_twister_engine", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.matrix, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.matrix, align 8
  %19 = alloca %struct.matrix, align 8
  %20 = alloca %struct.matrix, align 8
  %21 = alloca %struct.matrix, align 8
  %22 = alloca %struct.matrix, align 8
  %23 = alloca %struct.matrix, align 8
  %24 = alloca %struct.matrix, align 8
  %25 = alloca %struct.matrix, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %26 = getelementptr inbounds %struct.matrix, ptr %0, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !15
  %30 = icmp eq i32 %27, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %4
  br label %34

32:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

33:                                               ; No predecessors!
  br label %34

34:                                               ; preds = %33, %31
  %35 = getelementptr inbounds %struct.matrix, ptr %0, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !15
  %39 = icmp eq i32 %36, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %34
  br label %43

41:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 97, ptr noundef @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = icmp eq i32 %45, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  br label %52

50:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %49
  call void @llvm.lifetime.start.p0(i64 5000, ptr %10) #7
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10)
  call void @llvm.lifetime.start.p0(i64 5000, ptr %11) #7
  %53 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %10)
          to label %54 unwind label %65

54:                                               ; preds = %52
  %55 = zext i32 %53 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %11, i64 noundef %55)
          to label %56 unwind label %65

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %57 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !11
  invoke void @_ZN6matrixC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %58, i32 noundef 1)
          to label %59 unwind label %69

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %152, %59
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %73, label %64

64:                                               ; preds = %60
  store i32 2, ptr %16, align 4
  br label %155

65:                                               ; preds = %54, %52
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %12, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %13, align 4
  br label %162

69:                                               ; preds = %56
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %12, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %13, align 4
  br label %161

73:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %88, %73
  %75 = load i32, ptr %17, align 4, !tbaa !9
  %76 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = icmp slt i32 %75, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %74
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %95

80:                                               ; preds = %74
  %81 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %82 unwind label %91

82:                                               ; preds = %80
  %83 = urem i64 %81, 10000
  %84 = getelementptr inbounds %struct.matrix, ptr %14, i32 0, i32 2
  %85 = load i32, ptr %17, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %84, i64 noundef %86) #7
  store i64 %83, ptr %87, align 8, !tbaa !16
  br label %88

88:                                               ; preds = %82
  %89 = load i32, ptr %17, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %17, align 4, !tbaa !9
  br label %74, !llvm.loop !18

91:                                               ; preds = %80
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %12, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %157

95:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %96 unwind label %107

96:                                               ; preds = %95
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %97 unwind label %111

97:                                               ; preds = %96
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %98 unwind label %115

98:                                               ; preds = %97
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind writable sret(%struct.matrix) align 8 %20, ptr noundef %21, ptr noundef %22)
          to label %99 unwind label %119

99:                                               ; preds = %98
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind writable sret(%struct.matrix) align 8 %18, ptr noundef %19, ptr noundef %20)
          to label %100 unwind label %123

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %101 unwind label %127

101:                                              ; preds = %100
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %102 unwind label %131

102:                                              ; preds = %101
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind writable sret(%struct.matrix) align 8 %23, ptr noundef %24, ptr noundef %25)
          to label %103 unwind label %135

103:                                              ; preds = %102
  %104 = invoke noundef zeroext i1 @_ZNK6matrixeqERKS_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %105 unwind label %139

105:                                              ; preds = %103
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br i1 %104, label %106, label %151

106:                                              ; preds = %105
  br label %152

107:                                              ; preds = %95
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  br label %150

111:                                              ; preds = %96
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %12, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %13, align 4
  br label %149

115:                                              ; preds = %97
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %12, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %13, align 4
  br label %148

119:                                              ; preds = %98
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %12, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %13, align 4
  br label %147

123:                                              ; preds = %99
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %12, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %13, align 4
  br label %146

127:                                              ; preds = %100
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %12, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %13, align 4
  br label %145

131:                                              ; preds = %101
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %12, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %13, align 4
  br label %144

135:                                              ; preds = %102
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %12, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %13, align 4
  br label %143

139:                                              ; preds = %103
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %12, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %13, align 4
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  br label %143

143:                                              ; preds = %139, %135
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  br label %144

144:                                              ; preds = %143, %131
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  br label %145

145:                                              ; preds = %144, %127
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  br label %146

146:                                              ; preds = %145, %123
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %147

147:                                              ; preds = %146, %119
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  br label %148

148:                                              ; preds = %147, %115
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  br label %149

149:                                              ; preds = %148, %111
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  br label %150

150:                                              ; preds = %149, %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br label %157

151:                                              ; preds = %105
  store i1 false, ptr %5, align 1
  store i32 1, ptr %16, align 4
  br label %155

152:                                              ; preds = %106
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %15, align 4, !tbaa !9
  br label %60, !llvm.loop !20

155:                                              ; preds = %151, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %156 = load i32, ptr %16, align 4
  switch i32 %156, label %159 [
    i32 2, label %158
  ]

157:                                              ; preds = %150, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %161

158:                                              ; preds = %155
  store i1 true, ptr %5, align 1
  store i32 1, ptr %16, align 4
  br label %159

159:                                              ; preds = %158, %155
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #7
  %160 = load i1, ptr %5, align 1
  ret i1 %160

161:                                              ; preds = %157, %69
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %162

162:                                              ; preds = %161, %65
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #7
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %12, align 8
  %165 = load i32, ptr %13, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6matrixeqERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #5 align 2

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

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

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


; 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 { i32, i32, %"class.std::valarray" }
%"class.std::valarray" = type { i64, ptr }
%"class.std::random_device" = type { %union.anon.0 }
%union.anon.0 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8multiply6matrixS_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrixC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z16AB_is_equal_to_C6matrixS_S_i(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::random_device", align 8
  %6 = alloca %"class.std::mersenne_twister_engine", 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
  %15 = alloca %struct.matrix, align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 8, !tbaa !13
  %19 = icmp eq i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

21:                                               ; preds = %4
  %22 = load i32, ptr %0, align 8, !tbaa !13
  %23 = load i32, ptr %2, align 8, !tbaa !13
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 97, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %1, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %2, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = icmp eq i32 %28, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16AB_is_equal_to_C6matrixS_S_i) #6
  unreachable

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %5) #7
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %6) #7
  %34 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %5)
          to label %35 unwind label %44

35:                                               ; preds = %33
  %36 = zext i32 %34 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %6, i64 noundef %36)
          to label %37 unwind label %44

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %38 = load i32, ptr %27, align 4, !tbaa !5
  invoke void @_ZN6matrixC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %38, i32 noundef 1)
          to label %.preheader35 unwind label %46

.preheader35:                                     ; preds = %37
  %.not46 = icmp slt i32 %3, 1
  br i1 %.not46, label %.critedge, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader35
  %39 = getelementptr inbounds i8, ptr %7, i64 8
  br label %.preheader

40:                                               ; preds = %64
  %41 = add nuw nsw i32 %.01047, 1
  %.not = icmp sge i32 %41, %3
  %exitcond = icmp eq i32 %41, %3
  br i1 %exitcond, label %.critedge, label %.preheader, !llvm.loop !14

.preheader:                                       ; preds = %.preheader.lr.ph, %40
  %.not48 = phi i1 [ false, %.preheader.lr.ph ], [ %.not, %40 ]
  %.01047 = phi i32 [ 0, %.preheader.lr.ph ], [ %41, %40 ]
  %42 = load i32, ptr %27, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph, label %._crit_edge

44:                                               ; preds = %35, %33
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %91

46:                                               ; preds = %37
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %90

._crit_edge:                                      ; preds = %49, %.preheader
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %57 unwind label %66

.lr.ph:                                           ; preds = %.preheader, %49
  %indvars.iv = phi i64 [ %indvars.iv.next, %49 ], [ 0, %.preheader ]
  %48 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %49 unwind label %55

49:                                               ; preds = %.lr.ph
  %50 = urem i64 %48, 10000
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %39, i64 noundef %indvars.iv) #7
  store i64 %50, ptr %51, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %27, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next, %53
  br i1 %54, label %.lr.ph, label %._crit_edge, !llvm.loop !18

55:                                               ; preds = %.lr.ph
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %89

57:                                               ; preds = %._crit_edge
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %58 unwind label %68

58:                                               ; preds = %57
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %59 unwind label %70

59:                                               ; preds = %58
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 8 %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
          to label %60 unwind label %72

60:                                               ; preds = %59
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 8 %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %61 unwind label %74

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %62 unwind label %76

62:                                               ; preds = %61
  invoke void @_ZN6matrixC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %63 unwind label %78

63:                                               ; preds = %62
  invoke void @_Z8multiply6matrixS_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 8 %13, ptr noundef nonnull %14, ptr noundef nonnull %15)
          to label %64 unwind label %80

64:                                               ; preds = %63
  %65 = call noundef zeroext i1 @_ZNK6matrixeqERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br i1 %65, label %40, label %.critedge

66:                                               ; preds = %._crit_edge
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %88

68:                                               ; preds = %57
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %87

70:                                               ; preds = %58
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %86

72:                                               ; preds = %59
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %85

74:                                               ; preds = %60
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %84

76:                                               ; preds = %61
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %83

78:                                               ; preds = %62
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %82

80:                                               ; preds = %63
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  br label %82

82:                                               ; preds = %80, %78
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %83

83:                                               ; preds = %82, %76
  %.pn.pn = phi { ptr, i32 } [ %.pn, %82 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %84

84:                                               ; preds = %83, %74
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %83 ], [ %75, %74 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %85

85:                                               ; preds = %84, %72
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %84 ], [ %73, %72 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  br label %86

86:                                               ; preds = %85, %70
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %85 ], [ %71, %70 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %87

87:                                               ; preds = %86, %68
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %86 ], [ %69, %68 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %88

88:                                               ; preds = %87, %66
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %87 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %89

89:                                               ; preds = %88, %55
  %.pn31 = phi { ptr, i32 } [ %56, %55 ], [ %.pn.pn.pn.pn.pn.pn.pn, %88 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %90

.critedge:                                        ; preds = %40, %64, %.preheader35
  %.not.lcssa = phi i1 [ true, %.preheader35 ], [ %.not48, %64 ], [ %.not, %40 ]
  call void @_ZN6matrixD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #7
  ret i1 %.not.lcssa

90:                                               ; preds = %89, %46
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %89 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %91

91:                                               ; preds = %90, %44
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %90 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn31.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #5 align 2

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

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

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


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