; LLVM IR from jrl-umi3218/tvm :: src/internal (MatrixProperties)

; 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.tvm::internal::MatrixProperties::Arguments" = type <{ i32, i32, %"struct.tvm::internal::MatrixProperties::Constness", %"struct.tvm::internal::MatrixProperties::Invertibility", [2 x i8] }>
%"struct.tvm::internal::MatrixProperties::Constness" = type { i8 }
%"struct.tvm::internal::MatrixProperties::Invertibility" = type { i8 }
%"struct.std::pair" = type { i8, i8 }
%"class.tvm::internal::MatrixProperties" = type { i8, i8, i32, i8, i32 }

@.str = external hidden unnamed_addr constant [48 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3tvm8internal16MatrixProperties5buildERKNS1_9ArgumentsERKSt4pairIbbE(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(10) %1, ptr noundef nonnull align 1 dereferenceable(2) %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %10, i32 0, i32 0
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = icmp eq i32 %12, 7
  br i1 %13, label %14, label %19

14:                                               ; preds = %3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 4, !tbaa !16
  %18 = icmp eq i32 %17, 2
  br i1 %18, label %79, label %19

19:                                               ; preds = %14, %3
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 7
  br i1 %23, label %24, label %29

24:                                               ; preds = %19
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !16
  %28 = icmp eq i32 %27, 4
  br i1 %28, label %79, label %29

29:                                               ; preds = %24, %19
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp eq i32 %32, 7
  br i1 %33, label %34, label %39

34:                                               ; preds = %29
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !16
  %38 = icmp eq i32 %37, 6
  br i1 %38, label %79, label %39

39:                                               ; preds = %34, %29
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 5
  br i1 %43, label %44, label %49

44:                                               ; preds = %39
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %48 = icmp eq i32 %47, 3
  br i1 %48, label %79, label %49

49:                                               ; preds = %44, %39
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 5
  br i1 %53, label %54, label %59

54:                                               ; preds = %49
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !16
  %58 = icmp eq i32 %57, 4
  br i1 %58, label %79, label %59

59:                                               ; preds = %54, %49
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 6
  br i1 %63, label %64, label %69

64:                                               ; preds = %59
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !16
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %79, label %69

69:                                               ; preds = %64, %59
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 6
  br i1 %73, label %74, label %86

74:                                               ; preds = %69
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !16
  %78 = icmp eq i32 %77, 2
  br i1 %78, label %79, label %86

79:                                               ; preds = %74, %64, %54, %44, %34, %24, %14
  %80 = call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef @.str)
          to label %81 unwind label %82

81:                                               ; preds = %79
  call void @__cxa_throw(ptr %80, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

82:                                               ; preds = %79
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %8, align 4
  call void @__cxa_free_exception(ptr %80) #4
  br label %204

86:                                               ; preds = %74, %69
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.std::pair", ptr %87, i32 0, i32 0
  %89 = load i8, ptr %88, align 1, !tbaa !17, !range !19, !noundef !20
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %107

91:                                               ; preds = %86
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %92, i32 0, i32 2
  %94 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties9ConstnesscvbEv(ptr noundef nonnull align 1 dereferenceable(1) %93)
  br i1 %94, label %107, label %95

95:                                               ; preds = %91
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = call noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef %98)
  br i1 %99, label %100, label %107

100:                                              ; preds = %95
  %101 = call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef @.str.1)
          to label %102 unwind label %103

102:                                              ; preds = %100
  call void @__cxa_throw(ptr %101, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

103:                                              ; preds = %100
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @__cxa_free_exception(ptr %101) #4
  br label %204

107:                                              ; preds = %95, %91, %86
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.std::pair", ptr %108, i32 0, i32 1
  %110 = load i8, ptr %109, align 1, !tbaa !21, !range !19, !noundef !20
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %148

112:                                              ; preds = %107
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %113, i32 0, i32 3
  %115 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %114)
  br i1 %115, label %131, label %116

116:                                              ; preds = %112
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %120, i32 0, i32 1
  %122 = load i32, ptr %121, align 4, !tbaa !16
  %123 = call noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %119, i32 noundef %122)
  br i1 %123, label %124, label %131

124:                                              ; preds = %116
  %125 = call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %125, ptr noundef @.str.2)
          to label %126 unwind label %127

126:                                              ; preds = %124
  call void @__cxa_throw(ptr %125, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

127:                                              ; preds = %124
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %7, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %8, align 4
  call void @__cxa_free_exception(ptr %125) #4
  br label %204

131:                                              ; preds = %116, %112
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %132, i32 0, i32 3
  %134 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %133)
  br i1 %134, label %135, label %147

135:                                              ; preds = %131
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = icmp eq i32 %138, 7
  br i1 %139, label %140, label %147

140:                                              ; preds = %135
  %141 = call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef @.str.3)
          to label %142 unwind label %143

142:                                              ; preds = %140
  call void @__cxa_throw(ptr %141, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

143:                                              ; preds = %140
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %7, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %8, align 4
  call void @__cxa_free_exception(ptr %141) #4
  br label %204

147:                                              ; preds = %135, %131
  br label %148

148:                                              ; preds = %147, %107
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %149, i32 0, i32 2
  %151 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties9ConstnesscvbEv(ptr noundef nonnull align 1 dereferenceable(1) %150)
  br i1 %151, label %157, label %152

152:                                              ; preds = %148
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = call noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef %155)
  br label %157

157:                                              ; preds = %152, %148
  %158 = phi i1 [ true, %148 ], [ %156, %152 ]
  %159 = getelementptr inbounds %"class.tvm::internal::MatrixProperties", ptr %9, i32 0, i32 0
  %160 = zext i1 %158 to i8
  store i8 %160, ptr %159, align 4, !tbaa !22
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %161, i32 0, i32 3
  %163 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %162)
  br i1 %163, label %172, label %164

164:                                              ; preds = %157
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %165, i32 0, i32 0
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %168, i32 0, i32 1
  %170 = load i32, ptr %169, align 4, !tbaa !16
  %171 = call noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %167, i32 noundef %170)
  br label %172

172:                                              ; preds = %164, %157
  %173 = phi i1 [ true, %157 ], [ %171, %164 ]
  %174 = getelementptr inbounds %"class.tvm::internal::MatrixProperties", ptr %9, i32 0, i32 1
  %175 = zext i1 %173 to i8
  store i8 %175, ptr %174, align 1, !tbaa !24
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !16
  %182 = call noundef i32 @_ZN12_GLOBAL__N_111deduceShapeEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %178, i32 noundef %181)
  %183 = getelementptr inbounds %"class.tvm::internal::MatrixProperties", ptr %9, i32 0, i32 2
  store i32 %182, ptr %183, align 4, !tbaa !25
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %184, i32 0, i32 0
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !16
  %190 = call noundef zeroext i1 @_ZN12_GLOBAL__N_114deduceSymmetryEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %186, i32 noundef %189)
  %191 = getelementptr inbounds %"class.tvm::internal::MatrixProperties", ptr %9, i32 0, i32 3
  %192 = zext i1 %190 to i8
  store i8 %192, ptr %191, align 4, !tbaa !26
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %193, i32 0, i32 0
  %195 = load i32, ptr %194, align 4, !tbaa !9
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 4, !tbaa !16
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.tvm::internal::MatrixProperties::Arguments", ptr %199, i32 0, i32 3
  %201 = call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %200)
  %202 = call noundef i32 @_ZN12_GLOBAL__N_118deducePositivenessEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessEb(i32 noundef %195, i32 noundef %198, i1 noundef zeroext %201)
  %203 = getelementptr inbounds %"class.tvm::internal::MatrixProperties", ptr %9, i32 0, i32 4
  store i32 %202, ptr %203, align 4, !tbaa !27
  ret void

204:                                              ; preds = %143, %127, %103, %82
  %205 = load ptr, ptr %7, align 8
  %206 = load i32, ptr %8, align 4
  %207 = insertvalue { ptr, i32 } poison, ptr %205, 0
  %208 = insertvalue { ptr, i32 } %207, i32 %206, 1
  resume { ptr, i32 } %208
}

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_111deduceShapeEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_114deduceSymmetryEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_118deducePositivenessEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessEb(i32 noundef, i32 noundef, i1 noundef zeroext) #0

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 = { "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 = { 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 = { 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 = { nounwind }
attributes #5 = { noreturn }

!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, !11, i64 0}
!10 = !{!"_ZTSN3tvm8internal16MatrixProperties9ArgumentsE", !11, i64 0, !12, i64 4, !13, i64 8, !15, i64 9}
!11 = !{!"_ZTSN3tvm8internal16MatrixProperties5ShapeE", !7, i64 0}
!12 = !{!"_ZTSN3tvm8internal16MatrixProperties12PositivenessE", !7, i64 0}
!13 = !{!"_ZTSN3tvm8internal16MatrixProperties9ConstnessE", !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN3tvm8internal16MatrixProperties13InvertibilityE", !14, i64 0}
!16 = !{!10, !12, i64 4}
!17 = !{!18, !14, i64 0}
!18 = !{!"_ZTSSt4pairIbbE", !14, i64 0, !14, i64 1}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!18, !14, i64 1}
!22 = !{!23, !14, i64 0}
!23 = !{!"_ZTSN3tvm8internal16MatrixPropertiesE", !14, i64 0, !14, i64 1, !11, i64 4, !14, i64 8, !12, i64 12}
!24 = !{!23, !14, i64 1}
!25 = !{!23, !11, i64 4}
!26 = !{!23, !14, i64 8}
!27 = !{!23, !12, i64 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"

@.str = external hidden unnamed_addr constant [48 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3tvm8internal16MatrixProperties5buildERKNS1_9ArgumentsERKSt4pairIbbE(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(10) %1, ptr nocapture noundef nonnull readonly align 1 dereferenceable(2) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 7
  %6 = getelementptr inbounds i8, ptr %1, i64 4
  %7 = load i32, ptr %6, align 4
  %8 = icmp eq i32 %7, 2
  %or.cond = select i1 %5, i1 %8, i1 false
  br i1 %or.cond, label %20, label %9

9:                                                ; preds = %3
  %10 = and i32 %7, -3
  %11 = icmp eq i32 %10, 4
  %or.cond61 = select i1 %5, i1 %11, i1 false
  br i1 %or.cond61, label %20, label %12

12:                                               ; preds = %9
  %13 = icmp eq i32 %4, 5
  %14 = add i32 %7, -3
  %15 = icmp ult i32 %14, 2
  %or.cond62 = select i1 %13, i1 %15, i1 false
  br i1 %or.cond62, label %20, label %16

16:                                               ; preds = %12
  %17 = icmp eq i32 %4, 6
  %18 = add i32 %7, -1
  %19 = icmp ult i32 %18, 2
  %or.cond63 = select i1 %17, i1 %19, i1 false
  br i1 %or.cond63, label %20, label %25

20:                                               ; preds = %16, %12, %9, %3
  %21 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull @.str)
          to label %22 unwind label %23

22:                                               ; preds = %20
  tail call void @__cxa_throw(ptr nonnull %21, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #5
  unreachable

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %97

25:                                               ; preds = %16
  %26 = load i8, ptr %2, align 1, !tbaa !14, !range !16, !noundef !17
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %39

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  %30 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties9ConstnesscvbEv(ptr noundef nonnull align 1 dereferenceable(1) %29)
  br i1 %30, label %39, label %31

31:                                               ; preds = %28
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef %32)
  br i1 %33, label %34, label %39

34:                                               ; preds = %31
  %35 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull @.str.1)
          to label %36 unwind label %37

36:                                               ; preds = %34
  tail call void @__cxa_throw(ptr nonnull %35, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #5
  unreachable

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %97

39:                                               ; preds = %31, %28, %25
  %40 = getelementptr inbounds i8, ptr %2, i64 1
  %41 = load i8, ptr %40, align 1, !tbaa !18, !range !16, !noundef !17
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %43, label %64

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %1, i64 9
  %45 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %44)
  br i1 %45, label %55, label %46

46:                                               ; preds = %43
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = load i32, ptr %6, align 4, !tbaa !19
  %49 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %47, i32 noundef %48)
  br i1 %49, label %50, label %55

50:                                               ; preds = %46
  %51 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull @.str.2)
          to label %52 unwind label %53

52:                                               ; preds = %50
  tail call void @__cxa_throw(ptr nonnull %51, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #5
  unreachable

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %97

55:                                               ; preds = %46, %43
  %56 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %44)
  %57 = load i32, ptr %1, align 4
  %58 = icmp eq i32 %57, 7
  %or.cond60 = select i1 %56, i1 %58, i1 false
  br i1 %or.cond60, label %59, label %64

59:                                               ; preds = %55
  %60 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull @.str.3)
          to label %61 unwind label %62

61:                                               ; preds = %59
  tail call void @__cxa_throw(ptr nonnull %60, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #5
  unreachable

62:                                               ; preds = %59
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %97

64:                                               ; preds = %55, %39
  %65 = getelementptr inbounds i8, ptr %1, i64 8
  %66 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties9ConstnesscvbEv(ptr noundef nonnull align 1 dereferenceable(1) %65)
  br i1 %66, label %71, label %67

67:                                               ; preds = %64
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef %68)
  %70 = zext i1 %69 to i8
  br label %71

71:                                               ; preds = %67, %64
  %72 = phi i8 [ 1, %64 ], [ %70, %67 ]
  store i8 %72, ptr %0, align 4, !tbaa !20
  %73 = getelementptr inbounds i8, ptr %1, i64 9
  %74 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %73)
  br i1 %74, label %80, label %75

75:                                               ; preds = %71
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = load i32, ptr %6, align 4, !tbaa !19
  %78 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %76, i32 noundef %77)
  %79 = zext i1 %78 to i8
  br label %80

80:                                               ; preds = %75, %71
  %81 = phi i8 [ 1, %71 ], [ %79, %75 ]
  %82 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 %81, ptr %82, align 1, !tbaa !22
  %83 = load i32, ptr %1, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !19
  %85 = tail call noundef i32 @_ZN12_GLOBAL__N_111deduceShapeEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %83, i32 noundef %84)
  %86 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %85, ptr %86, align 4, !tbaa !23
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !19
  %89 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_114deduceSymmetryEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef %87, i32 noundef %88)
  %90 = getelementptr inbounds i8, ptr %0, i64 8
  %91 = zext i1 %89 to i8
  store i8 %91, ptr %90, align 4, !tbaa !24
  %92 = load i32, ptr %1, align 4, !tbaa !5
  %93 = load i32, ptr %6, align 4, !tbaa !19
  %94 = tail call noundef zeroext i1 @_ZNK3tvm8internal16MatrixProperties13InvertibilitycvbEv(ptr noundef nonnull align 1 dereferenceable(1) %73)
  %95 = tail call noundef i32 @_ZN12_GLOBAL__N_118deducePositivenessEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessEb(i32 noundef %92, i32 noundef %93, i1 noundef zeroext %94)
  %96 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %95, ptr %96, align 4, !tbaa !25
  ret void

97:                                               ; preds = %62, %53, %37, %23
  %.sink = phi ptr [ %60, %62 ], [ %51, %53 ], [ %35, %37 ], [ %21, %23 ]
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %54, %53 ], [ %38, %37 ], [ %24, %23 ]
  tail call void @__cxa_free_exception(ptr %.sink) #4
  resume { ptr, i32 } %.pn
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_115deduceConstanceEN3tvm8internal16MatrixProperties5ShapeE(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_119deduceInvertibilityEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_111deduceShapeEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_114deduceSymmetryEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessE(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_118deducePositivenessEN3tvm8internal16MatrixProperties5ShapeENS2_12PositivenessEb(i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #0

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 = { "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 = { 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 = { 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 = { nounwind }
attributes #5 = { noreturn }

!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 0}
!6 = !{!"_ZTSN3tvm8internal16MatrixProperties9ArgumentsE", !7, i64 0, !10, i64 4, !11, i64 8, !13, i64 9}
!7 = !{!"_ZTSN3tvm8internal16MatrixProperties5ShapeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3tvm8internal16MatrixProperties12PositivenessE", !8, i64 0}
!11 = !{!"_ZTSN3tvm8internal16MatrixProperties9ConstnessE", !12, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTSN3tvm8internal16MatrixProperties13InvertibilityE", !12, i64 0}
!14 = !{!15, !12, i64 0}
!15 = !{!"_ZTSSt4pairIbbE", !12, i64 0, !12, i64 1}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!15, !12, i64 1}
!19 = !{!6, !10, i64 4}
!20 = !{!21, !12, i64 0}
!21 = !{!"_ZTSN3tvm8internal16MatrixPropertiesE", !12, i64 0, !12, i64 1, !7, i64 4, !12, i64 8, !10, i64 12}
!22 = !{!21, !12, i64 1}
!23 = !{!21, !7, i64 4}
!24 = !{!21, !12, i64 8}
!25 = !{!21, !10, i64 12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass