; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/general (transpose)

; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17transpose_general10TensorDescPjPKvS0_S_S0_Pv(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef byval(%struct.TensorDesc) align 8 %4, ptr noundef %5, ptr noundef %6) #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.TensorDesc, align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  store ptr %6, ptr %12, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = icmp eq ptr null, %34
  br i1 %35, label %42, label %36

36:                                               ; preds = %7
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = icmp eq ptr null, %37
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = icmp eq ptr null, %40
  br i1 %41, label %42, label %58

42:                                               ; preds = %39, %36, %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 1, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %57

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %46 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %47 = trunc i64 %46 to i32
  store i32 %47, ptr %14, align 4, !tbaa !11
  %48 = load i32, ptr %14, align 4, !tbaa !11
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %48)
  %50 = load ptr, ptr @stdout, align 8, !tbaa !5
  %51 = call i32 @fflush(ptr noundef %50)
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = call ptr @ee2str(i32 noundef %52)
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %53)
  %55 = load ptr, ptr @stdout, align 8, !tbaa !5
  %56 = call i32 @fflush(ptr noundef %55)
  call void @exit(i32 noundef 1) #10
  unreachable

57:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %58

58:                                               ; preds = %57, %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %59 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !13
  store i32 %60, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %61 = getelementptr inbounds %struct.TensorDesc, ptr %4, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !13
  store i32 %62, ptr %16, align 4, !tbaa !11
  %63 = load i32, ptr %15, align 4, !tbaa !11
  %64 = load i32, ptr %16, align 4, !tbaa !11
  %65 = icmp uge i32 %63, %64
  br i1 %65, label %76, label %66

66:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %67 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %17, align 4, !tbaa !11
  %69 = load i32, ptr %17, align 4, !tbaa !11
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %69)
  %71 = load ptr, ptr @stdout, align 8, !tbaa !5
  %72 = call i32 @fflush(ptr noundef %71)
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %74 = load ptr, ptr @stdout, align 8, !tbaa !5
  %75 = call i32 @fflush(ptr noundef %74)
  call void @exit(i32 noundef 1) #10
  unreachable

76:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !17
  %77 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %19)
  store i32 %77, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #9
  %78 = load i32, ptr %15, align 4, !tbaa !11
  %79 = zext i32 %78 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #9
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  invoke void @_ZNSt6vectorIjSaIjEEC2EmRKjRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %79, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %80 unwind label %88

80:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %81, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %82, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !11
  br label %83

83:                                               ; preds = %184, %80
  %84 = load i32, ptr %27, align 4, !tbaa !11
  %85 = load i32, ptr %18, align 4, !tbaa !11
  %86 = icmp ult i32 %84, %85
  br i1 %86, label %92, label %87

87:                                               ; preds = %83
  store i32 2, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %191

88:                                               ; preds = %76
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %23, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %24, align 4
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %192

92:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %93 = load i32, ptr %27, align 4, !tbaa !11
  store i32 %93, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %128, %92
  %95 = load i32, ptr %30, align 4, !tbaa !11
  %96 = load i32, ptr %16, align 4, !tbaa !11
  %97 = icmp ult i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 5, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %131

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %100 = load i32, ptr %29, align 4, !tbaa !11
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = load i32, ptr %30, align 4, !tbaa !11
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = urem i32 %100, %105
  store i32 %106, ptr %31, align 4, !tbaa !11
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load i32, ptr %30, align 4, !tbaa !11
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %107, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = load i32, ptr %29, align 4, !tbaa !11
  %113 = udiv i32 %112, %111
  store i32 %113, ptr %29, align 4, !tbaa !11
  %114 = load i32, ptr %31, align 4, !tbaa !11
  %115 = load i32, ptr %15, align 4, !tbaa !11
  %116 = sub i32 %115, 1
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load i32, ptr %16, align 4, !tbaa !11
  %119 = sub i32 %118, 1
  %120 = load i32, ptr %30, align 4, !tbaa !11
  %121 = sub i32 %119, %120
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %117, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !11
  %125 = sub i32 %116, %124
  %126 = zext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %126) #9
  store i32 %114, ptr %127, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %128

128:                                              ; preds = %99
  %129 = load i32, ptr %30, align 4, !tbaa !11
  %130 = add i32 %129, 1
  store i32 %130, ptr %30, align 4, !tbaa !11
  br label %94, !llvm.loop !21

131:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 0, ptr %32, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %132 = load i32, ptr %15, align 4, !tbaa !11
  %133 = sub i32 %132, 1
  store i32 %133, ptr %33, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %152, %131
  %135 = load i32, ptr %33, align 4, !tbaa !11
  %136 = icmp ugt i32 %135, 0
  br i1 %136, label %138, label %137

137:                                              ; preds = %134
  store i32 8, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %155

138:                                              ; preds = %134
  %139 = load i32, ptr %32, align 4, !tbaa !11
  %140 = load i32, ptr %33, align 4, !tbaa !11
  %141 = zext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %141) #9
  %143 = load i32, ptr %142, align 4, !tbaa !11
  %144 = add i32 %139, %143
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = load i32, ptr %33, align 4, !tbaa !11
  %147 = sub i32 %146, 1
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %145, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !11
  %151 = mul i32 %144, %150
  store i32 %151, ptr %32, align 4, !tbaa !11
  br label %152

152:                                              ; preds = %138
  %153 = load i32, ptr %33, align 4, !tbaa !11
  %154 = add i32 %153, -1
  store i32 %154, ptr %33, align 4, !tbaa !11
  br label %134, !llvm.loop !23

155:                                              ; preds = %137
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 0) #9
  %157 = load i32, ptr %156, align 4, !tbaa !11
  %158 = load i32, ptr %32, align 4, !tbaa !11
  %159 = add i32 %158, %157
  store i32 %159, ptr %32, align 4, !tbaa !11
  %160 = load ptr, ptr %26, align 8, !tbaa !5
  %161 = load i32, ptr %27, align 4, !tbaa !11
  %162 = getelementptr inbounds %struct.TensorDesc, ptr %4, i32 0, i32 0
  %163 = load i32, ptr %162, align 8, !tbaa !24
  %164 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %163)
          to label %165 unwind label %187

165:                                              ; preds = %155
  %166 = mul i32 %161, %164
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds i8, ptr %160, i64 %167
  %169 = load ptr, ptr %25, align 8, !tbaa !5
  %170 = load i32, ptr %32, align 4, !tbaa !11
  %171 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !24
  %173 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %172)
          to label %174 unwind label %187

174:                                              ; preds = %165
  %175 = mul i32 %170, %173
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds i8, ptr %169, i64 %176
  %178 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 0
  %179 = load i32, ptr %178, align 8, !tbaa !24
  %180 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %179)
          to label %181 unwind label %187

181:                                              ; preds = %174
  %182 = zext i32 %180 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %168, ptr noundef %177, i64 noundef %182)
          to label %183 unwind label %187

183:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %27, align 4, !tbaa !11
  %186 = add i32 %185, 1
  store i32 %186, ptr %27, align 4, !tbaa !11
  br label %83, !llvm.loop !25

187:                                              ; preds = %181, %174, %165, %155
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %23, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #9
  br label %192

191:                                              ; preds = %87
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  ret i32 0

192:                                              ; preds = %187, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %23, align 8
  %195 = load i32, ptr %24, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #2

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

declare i32 @fflush(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #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) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7bytesOf8DataType(i32 noundef) #8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"_ZTS2EE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS10TensorDesc", !15, i64 0, !16, i64 4, !12, i64 8, !7, i64 12}
!15 = !{!"_ZTS8DataType", !7, i64 0}
!16 = !{!"_ZTS10DataFormat", !7, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !19, i64 8, i64 4, !11, i64 12, i64 80, !20}
!18 = !{!15, !15, i64 0}
!19 = !{!16, !16, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!14, !15, i64 0}
!25 = distinct !{!25, !22}


; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17transpose_general10TensorDescPjPKvS0_S_S0_Pv(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef readonly %3, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %4, ptr nocapture noundef readonly %5, ptr noundef %6) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator", align 1
  %11 = icmp eq ptr %2, null
  %12 = icmp eq ptr %6, null
  %or.cond = or i1 %11, %12
  %13 = icmp eq ptr %3, null
  %or.cond3 = or i1 %13, %or.cond
  br i1 %or.cond3, label %14, label %24

14:                                               ; preds = %7
  %15 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %16 = trunc i64 %15 to i32
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %16)
  %18 = load ptr, ptr @stdout, align 8, !tbaa !5
  %19 = tail call i32 @fflush(ptr noundef %18)
  %20 = tail call ptr @ee2str(i32 noundef 1)
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %20)
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = tail call i32 @fflush(ptr noundef %22)
  tail call void @exit(i32 noundef 1) #9
  unreachable

24:                                               ; preds = %7
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %.fr = freeze i32 %26
  %27 = getelementptr inbounds i8, ptr %4, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !9
  %.not = icmp ult i32 %.fr, %28
  br i1 %.not, label %29, label %38

29:                                               ; preds = %24
  %30 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %31 = trunc i64 %30 to i32
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %31)
  %33 = load ptr, ptr @stdout, align 8, !tbaa !5
  %34 = tail call i32 @fflush(ptr noundef %33)
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %36 = load ptr, ptr @stdout, align 8, !tbaa !5
  %37 = tail call i32 @fflush(ptr noundef %36)
  tail call void @exit(i32 noundef 1) #9
  unreachable

38:                                               ; preds = %24
  %39 = tail call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  %40 = zext i32 %.fr to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 0, ptr %9, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt6vectorIjSaIjEEC2EmRKjRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %40, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %41 unwind label %141

41:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %.not72 = icmp eq i32 %39, 0
  br i1 %.not72, label %._crit_edge66, label %.preheader56.lr.ph

.preheader56.lr.ph:                               ; preds = %41
  %.not73 = icmp eq i32 %28, 0
  %.059 = add i32 %.fr, -1
  %.not5460 = icmp eq i32 %.059, 0
  %42 = load i32, ptr %4, align 8
  %43 = load i32, ptr %0, align 8
  br i1 %.not73, label %.preheader56.lr.ph.split, label %.preheader56.lr.ph.split.us

.preheader56.lr.ph.split.us:                      ; preds = %.preheader56.lr.ph
  br i1 %.not5460, label %.preheader56.us.us.preheader, label %.preheader56.us.preheader

.preheader56.us.preheader:                        ; preds = %.preheader56.lr.ph.split.us
  %44 = zext i32 %.059 to i64
  %wide.trip.count = zext i32 %28 to i64
  br label %.preheader56.us

.preheader56.us.us.preheader:                     ; preds = %.preheader56.lr.ph.split.us
  %wide.trip.count87 = zext i32 %28 to i64
  br label %.preheader56.us.us

.preheader56.us.us:                               ; preds = %.preheader56.us.us.preheader, %57
  %.05065.us.us = phi i32 [ %58, %57 ], [ 0, %.preheader56.us.us.preheader ]
  br label %59

45:                                               ; preds = %..preheader_crit_edge.us.us
  %46 = mul i32 %76, %.05065.us.us
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %6, i64 %47
  %49 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %50 unwind label %.split.us.split.us

50:                                               ; preds = %45
  %51 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %52 unwind label %.split.us.split.us

52:                                               ; preds = %50
  %53 = mul i32 %49, %75
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %2, i64 %54
  %56 = zext i32 %51 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %48, ptr noundef %55, i64 noundef %56)
          to label %57 unwind label %.split.us.split.us

57:                                               ; preds = %52
  %58 = add nuw i32 %.05065.us.us, 1
  %exitcond89.not = icmp eq i32 %58, %39
  br i1 %exitcond89.not, label %._crit_edge66, label %.preheader56.us.us, !llvm.loop !15

59:                                               ; preds = %59, %.preheader56.us.us
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %59 ], [ 0, %.preheader56.us.us ]
  %.04957.us.us = phi i32 [ %63, %59 ], [ %.05065.us.us, %.preheader56.us.us ]
  %60 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv83
  %61 = load i32, ptr %60, align 4, !tbaa !14
  %62 = urem i32 %.04957.us.us, %61
  %63 = udiv i32 %.04957.us.us, %61
  %64 = trunc nuw i64 %indvars.iv83 to i32
  %65 = xor i32 %64, -1
  %66 = add i32 %28, %65
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %3, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !14
  %70 = xor i32 %69, -1
  %71 = add i32 %.fr, %70
  %72 = zext i32 %71 to i64
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %72) #8
  store i32 %62, ptr %73, align 4, !tbaa !14
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count87
  br i1 %exitcond88.not, label %..preheader_crit_edge.us.us, label %59, !llvm.loop !17

..preheader_crit_edge.us.us:                      ; preds = %59
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #8
  %75 = load i32, ptr %74, align 4, !tbaa !14
  %76 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %42)
          to label %45 unwind label %.split.us.split.us

.split.us.split.us:                               ; preds = %52, %50, %45, %..preheader_crit_edge.us.us
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.preheader56.us:                                  ; preds = %.preheader56.us.preheader, %100
  %.05065.us = phi i32 [ %101, %100 ], [ 0, %.preheader56.us.preheader ]
  br label %102

..preheader_crit_edge.us:                         ; preds = %102, %..preheader_crit_edge.us
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %..preheader_crit_edge.us ], [ %44, %102 ]
  %.0.in62.us = phi i32 [ %87, %..preheader_crit_edge.us ], [ %.fr, %102 ]
  %.04661.us = phi i32 [ %85, %..preheader_crit_edge.us ], [ 0, %102 ]
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv79) #8
  %79 = load i32, ptr %78, align 4, !tbaa !14
  %80 = add i32 %79, %.04661.us
  %81 = add i32 %.0.in62.us, -2
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %1, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !14
  %85 = mul i32 %80, %84
  %indvars.iv.next80 = add nsw i64 %indvars.iv79, -1
  %86 = and i64 %indvars.iv.next80, 4294967295
  %.not54.us = icmp eq i64 %86, 0
  %87 = trunc nuw i64 %indvars.iv79 to i32
  br i1 %.not54.us, label %._crit_edge.us, label %..preheader_crit_edge.us, !llvm.loop !18

88:                                               ; preds = %._crit_edge.us
  %89 = mul i32 %120, %.05065.us
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %6, i64 %90
  %92 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %93 unwind label %.split.us.split

93:                                               ; preds = %88
  %94 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %95 unwind label %.split.us.split

95:                                               ; preds = %93
  %96 = mul i32 %92, %119
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %2, i64 %97
  %99 = zext i32 %94 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %91, ptr noundef %98, i64 noundef %99)
          to label %100 unwind label %.split.us.split

100:                                              ; preds = %95
  %101 = add nuw i32 %.05065.us, 1
  %exitcond82.not = icmp eq i32 %101, %39
  br i1 %exitcond82.not, label %._crit_edge66, label %.preheader56.us, !llvm.loop !15

102:                                              ; preds = %.preheader56.us, %102
  %indvars.iv = phi i64 [ 0, %.preheader56.us ], [ %indvars.iv.next, %102 ]
  %.04957.us = phi i32 [ %.05065.us, %.preheader56.us ], [ %106, %102 ]
  %103 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv
  %104 = load i32, ptr %103, align 4, !tbaa !14
  %105 = urem i32 %.04957.us, %104
  %106 = udiv i32 %.04957.us, %104
  %107 = trunc nuw i64 %indvars.iv to i32
  %108 = xor i32 %107, -1
  %109 = add i32 %28, %108
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds i32, ptr %3, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !14
  %113 = xor i32 %112, -1
  %114 = add i32 %.fr, %113
  %115 = zext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %115) #8
  store i32 %105, ptr %116, align 4, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %..preheader_crit_edge.us, label %102, !llvm.loop !17

._crit_edge.us:                                   ; preds = %..preheader_crit_edge.us
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #8
  %118 = load i32, ptr %117, align 4, !tbaa !14
  %119 = add i32 %118, %85
  %120 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %42)
          to label %88 unwind label %.split.us.split

.split.us.split:                                  ; preds = %95, %93, %88, %._crit_edge.us
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.preheader56.lr.ph.split:                         ; preds = %.preheader56.lr.ph
  br i1 %.not5460, label %.preheader56.us67, label %.preheader56.preheader

.preheader56.preheader:                           ; preds = %.preheader56.lr.ph.split
  %122 = zext i32 %.059 to i64
  br label %.preheader56

.preheader56.us67:                                ; preds = %.preheader56.lr.ph.split, %138
  %.05065.us68 = phi i32 [ %139, %138 ], [ 0, %.preheader56.lr.ph.split ]
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #8
  %124 = load i32, ptr %123, align 4, !tbaa !14
  %125 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %42)
          to label %126 unwind label %.split.split.us

126:                                              ; preds = %.preheader56.us67
  %127 = mul i32 %125, %.05065.us68
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %6, i64 %128
  %130 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %131 unwind label %.split.split.us

131:                                              ; preds = %126
  %132 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %133 unwind label %.split.split.us

133:                                              ; preds = %131
  %134 = mul i32 %130, %124
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %2, i64 %135
  %137 = zext i32 %132 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %129, ptr noundef %136, i64 noundef %137)
          to label %138 unwind label %.split.split.us

138:                                              ; preds = %133
  %139 = add nuw i32 %.05065.us68, 1
  %exitcond95.not = icmp eq i32 %139, %39
  br i1 %exitcond95.not, label %._crit_edge66, label %.preheader56.us67, !llvm.loop !15

.split.split.us:                                  ; preds = %133, %131, %126, %.preheader56.us67
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.preheader56:                                     ; preds = %.preheader56.preheader, %170
  %.05065 = phi i32 [ %171, %170 ], [ 0, %.preheader56.preheader ]
  br label %147

._crit_edge66:                                    ; preds = %100, %57, %170, %138, %41
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  ret i32 0

141:                                              ; preds = %38
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %173

._crit_edge:                                      ; preds = %147
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #8
  %144 = load i32, ptr %143, align 4, !tbaa !14
  %145 = add i32 %144, %155
  %146 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %42)
          to label %158 unwind label %.split.split

147:                                              ; preds = %.preheader56, %147
  %indvars.iv90 = phi i64 [ %122, %.preheader56 ], [ %indvars.iv.next91, %147 ]
  %.0.in62 = phi i32 [ %.fr, %.preheader56 ], [ %157, %147 ]
  %.04661 = phi i32 [ 0, %.preheader56 ], [ %155, %147 ]
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv90) #8
  %149 = load i32, ptr %148, align 4, !tbaa !14
  %150 = add i32 %149, %.04661
  %151 = add i32 %.0.in62, -2
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %1, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !14
  %155 = mul i32 %150, %154
  %indvars.iv.next91 = add nsw i64 %indvars.iv90, -1
  %156 = and i64 %indvars.iv.next91, 4294967295
  %.not54 = icmp eq i64 %156, 0
  %157 = trunc nuw i64 %indvars.iv90 to i32
  br i1 %.not54, label %._crit_edge, label %147, !llvm.loop !18

158:                                              ; preds = %._crit_edge
  %159 = mul i32 %146, %.05065
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds i8, ptr %6, i64 %160
  %162 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %163 unwind label %.split.split

163:                                              ; preds = %158
  %164 = invoke noundef i32 @_Z7bytesOf8DataType(i32 noundef %43)
          to label %165 unwind label %.split.split

165:                                              ; preds = %163
  %166 = mul i32 %162, %145
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds i8, ptr %2, i64 %167
  %169 = zext i32 %164 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %161, ptr noundef %168, i64 noundef %169)
          to label %170 unwind label %.split.split

170:                                              ; preds = %165
  %171 = add nuw i32 %.05065, 1
  %exitcond94.not = icmp eq i32 %171, %39
  br i1 %exitcond94.not, label %._crit_edge66, label %.preheader56, !llvm.loop !15

.split.split:                                     ; preds = %165, %163, %158, %._crit_edge
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.split.us:                                        ; preds = %.split.split, %.split.split.us, %.split.us.split, %.split.us.split.us
  %.us-phi = phi { ptr, i32 } [ %121, %.split.us.split ], [ %77, %.split.us.split.us ], [ %172, %.split.split ], [ %140, %.split.split.us ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  br label %173

173:                                              ; preds = %.split.us, %141
  %.pn = phi { ptr, i32 } [ %.us-phi, %.split.us ], [ %142, %141 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7bytesOf8DataType(i32 noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

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


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