; LLVM IR from huawei-noah/bolt :: compute/tensor/tests/test_softmax.ll (Z11softmaxTestiPPc8DataType)

; 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.ArchInfo = type { i32, ptr }
%struct.SoftmaxParamSpec = type { i32 }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZL15UT_CPU_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZL18UT_SERIAL_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11softmaxTestiPPc8DataType(i32 noundef %0, ptr noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.SoftmaxParamSpec, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.TensorDesc, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %class.Tensor, align 8
  %13 = alloca %struct.TensorDesc, align 8
  %14 = alloca %class.Tensor, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.TensorDesc, align 8
  %18 = alloca %class.Tensor, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.SoftmaxParamSpec, align 4
  %21 = alloca i32, align 4
  %22 = alloca %class.Tensor, align 8
  %23 = alloca %struct.TensorDesc, align 8
  %24 = alloca %class.Tensor, align 8
  %25 = alloca i32, align 4
  %26 = alloca %class.Tensor, align 8
  %27 = alloca %struct.SoftmaxParamSpec, align 4
  %28 = alloca %class.Tensor, align 8
  %29 = alloca %class.Tensor, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %class.Tensor, align 8
  %33 = alloca %struct.SoftmaxParamSpec, align 4
  %34 = alloca %class.Tensor, align 8
  %35 = alloca %class.Tensor, align 8
  %36 = alloca i32, align 4
  %37 = alloca %class.Tensor, align 8
  %38 = alloca %class.Tensor, align 8
  %39 = alloca double, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca %class.Tensor, align 8
  %43 = alloca %struct.SoftmaxParamSpec, align 4
  %44 = alloca %class.Tensor, align 8
  %45 = alloca %class.Tensor, align 8
  %46 = alloca i32, align 4
  %47 = alloca double, align 8
  %48 = alloca double, align 8
  %49 = alloca [150 x i8], align 16
  %50 = alloca [120 x i8], align 16
  %51 = alloca double, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %64, label %54

54:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %55 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %56 = trunc i64 %55 to i32
  store i32 %56, ptr %7, align 4, !tbaa !5
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %57)
  %59 = load ptr, ptr @stdout, align 8, !tbaa !9
  %60 = call i32 @fflush(ptr noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %62 = load ptr, ptr @stdout, align 8, !tbaa !9
  %63 = call i32 @fflush(ptr noundef %62)
  call void @exit(i32 noundef 1) #10
  unreachable

64:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %65 = load ptr, ptr %5, align 8, !tbaa !9
  %66 = getelementptr inbounds ptr, ptr %65, i64 1
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = call i32 @atoi(ptr noundef %67) #11
  store i32 %68, ptr %9, align 4, !tbaa !5
  %69 = getelementptr inbounds %struct.SoftmaxParamSpec, ptr %8, i32 0, i32 0
  store i32 1, ptr %69, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 92, ptr %10) #9
  %70 = load i32, ptr %6, align 4, !tbaa !11
  %71 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %10, i32 noundef %70, i32 noundef 14, i32 noundef 1, i32 noundef %71)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !11
  %74 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %72, i32 noundef %73, i32 noundef 0)
  store ptr %74, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !15
  call void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %12, ptr noundef byval(%struct.TensorDesc) align 8 %13)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  %75 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %14, i32 noundef 1)
          to label %76 unwind label %106

76:                                               ; preds = %64
  %77 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !15
  %78 = invoke noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %17)
          to label %79 unwind label %106

79:                                               ; preds = %76
  %80 = zext i32 %78 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %75, ptr noundef %77, i64 noundef %80)
          to label %81 unwind label %106

81:                                               ; preds = %79
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #9
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef 1)
          to label %82 unwind label %110

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !19
  %83 = getelementptr inbounds %struct.SoftmaxParamSpec, ptr %20, i32 0, i32 0
  %84 = load i32, ptr %83, align 4
  %85 = invoke noundef i32 @_Z25softmax_infer_output_sizeP6Tensor16SoftmaxParamSpecS0_P8ArchInfo(ptr noundef %12, i32 %84, ptr noundef %18, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %86 unwind label %114

86:                                               ; preds = %82
  store i32 %85, ptr %19, align 4, !tbaa !20
  %87 = load i32, ptr %19, align 4, !tbaa !20
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %122

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %90 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %21, align 4, !tbaa !5
  %92 = load i32, ptr %21, align 4, !tbaa !5
  %93 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %92)
          to label %94 unwind label %118

94:                                               ; preds = %89
  %95 = load ptr, ptr @stdout, align 8, !tbaa !9
  %96 = invoke i32 @fflush(ptr noundef %95)
          to label %97 unwind label %118

97:                                               ; preds = %94
  %98 = load i32, ptr %19, align 4, !tbaa !20
  %99 = invoke ptr @ee2str(i32 noundef %98)
          to label %100 unwind label %118

100:                                              ; preds = %97
  %101 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %99)
          to label %102 unwind label %118

102:                                              ; preds = %100
  %103 = load ptr, ptr @stdout, align 8, !tbaa !9
  %104 = invoke i32 @fflush(ptr noundef %103)
          to label %105 unwind label %118

105:                                              ; preds = %102
  call void @exit(i32 noundef 1) #10
  unreachable

106:                                              ; preds = %79, %76, %64
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %15, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  br label %308

110:                                              ; preds = %81
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %15, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %16, align 4
  br label %307

114:                                              ; preds = %82
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %15, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %16, align 4
  br label %150

118:                                              ; preds = %102, %100, %97, %94, %89
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %15, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %150

122:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %123 unwind label %151

123:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #9
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %23, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %124 unwind label %155

124:                                              ; preds = %123
  invoke void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %22, ptr noundef byval(%struct.TensorDesc) align 8 %23)
          to label %125 unwind label %155

125:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #9
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef 1)
          to label %126 unwind label %159

126:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !19
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  %127 = getelementptr inbounds %struct.SoftmaxParamSpec, ptr %27, i32 0, i32 0
  %128 = load i32, ptr %127, align 4
  %129 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef %26, i32 %128, ptr noundef %28, ptr noundef %29, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %130 unwind label %163

130:                                              ; preds = %126
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  store i32 %129, ptr %25, align 4, !tbaa !20
  %131 = load i32, ptr %25, align 4, !tbaa !20
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %171

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %134 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %30, align 4, !tbaa !5
  %136 = load i32, ptr %30, align 4, !tbaa !5
  %137 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %136)
          to label %138 unwind label %167

138:                                              ; preds = %133
  %139 = load ptr, ptr @stdout, align 8, !tbaa !9
  %140 = invoke i32 @fflush(ptr noundef %139)
          to label %141 unwind label %167

141:                                              ; preds = %138
  %142 = load i32, ptr %25, align 4, !tbaa !20
  %143 = invoke ptr @ee2str(i32 noundef %142)
          to label %144 unwind label %167

144:                                              ; preds = %141
  %145 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %143)
          to label %146 unwind label %167

146:                                              ; preds = %144
  %147 = load ptr, ptr @stdout, align 8, !tbaa !9
  %148 = invoke i32 @fflush(ptr noundef %147)
          to label %149 unwind label %167

149:                                              ; preds = %146
  call void @exit(i32 noundef 1) #10
  unreachable

150:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %306

151:                                              ; preds = %122
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %15, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %16, align 4
  br label %306

155:                                              ; preds = %124, %123
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %15, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %16, align 4
  br label %305

159:                                              ; preds = %125
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %15, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %16, align 4
  br label %304

163:                                              ; preds = %126
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %15, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  br label %195

167:                                              ; preds = %146, %144, %141, %138, %133
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %15, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %195

171:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !19
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  %172 = getelementptr inbounds %struct.SoftmaxParamSpec, ptr %33, i32 0, i32 0
  %173 = load i32, ptr %172, align 4
  %174 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef %32, i32 %173, ptr noundef %34, ptr noundef %35, ptr noundef @_ZL18UT_SERIAL_ARCHINFO)
          to label %175 unwind label %196

175:                                              ; preds = %171
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  store i32 %174, ptr %31, align 4, !tbaa !20
  %176 = load i32, ptr %31, align 4, !tbaa !20
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %204

178:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %179 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %180 = trunc i64 %179 to i32
  store i32 %180, ptr %36, align 4, !tbaa !5
  %181 = load i32, ptr %36, align 4, !tbaa !5
  %182 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %181)
          to label %183 unwind label %200

183:                                              ; preds = %178
  %184 = load ptr, ptr @stdout, align 8, !tbaa !9
  %185 = invoke i32 @fflush(ptr noundef %184)
          to label %186 unwind label %200

186:                                              ; preds = %183
  %187 = load i32, ptr %31, align 4, !tbaa !20
  %188 = invoke ptr @ee2str(i32 noundef %187)
          to label %189 unwind label %200

189:                                              ; preds = %186
  %190 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %188)
          to label %191 unwind label %200

191:                                              ; preds = %189
  %192 = load ptr, ptr @stdout, align 8, !tbaa !9
  %193 = invoke i32 @fflush(ptr noundef %192)
          to label %194 unwind label %200

194:                                              ; preds = %191
  call void @exit(i32 noundef 1) #10
  unreachable

195:                                              ; preds = %167, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %303

196:                                              ; preds = %171
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %15, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  br label %219

200:                                              ; preds = %191, %189, %186, %183, %178
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %15, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %219

204:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  %205 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %37, i32 noundef 1)
          to label %206 unwind label %220

206:                                              ; preds = %204
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  %207 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %38, i32 noundef 1)
          to label %208 unwind label %224

208:                                              ; preds = %206
  %209 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %210 unwind label %224

210:                                              ; preds = %208
  %211 = load i32, ptr %6, align 4, !tbaa !11
  invoke void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef %205, ptr noundef %207, i32 noundef %209, i32 noundef %211, float noundef 0x3FB99999A0000000)
          to label %212 unwind label %224

212:                                              ; preds = %210
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %213 = invoke noundef double @_Z10ut_time_msv()
          to label %214 unwind label %229

214:                                              ; preds = %212
  store double %213, ptr %39, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %266, %214
  %216 = load i32, ptr %40, align 4, !tbaa !5
  %217 = icmp slt i32 %216, 6
  br i1 %217, label %233, label %218

218:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %270

219:                                              ; preds = %200, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %303

220:                                              ; preds = %204
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %15, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %16, align 4
  br label %228

224:                                              ; preds = %210, %208, %206
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %15, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  br label %228

228:                                              ; preds = %224, %220
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #9
  br label %303

229:                                              ; preds = %212
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %15, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %16, align 4
  br label %302

233:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !19
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  %234 = getelementptr inbounds %struct.SoftmaxParamSpec, ptr %43, i32 0, i32 0
  %235 = load i32, ptr %234, align 4
  %236 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef %42, i32 %235, ptr noundef %44, ptr noundef %45, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %237 unwind label %257

237:                                              ; preds = %233
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  store i32 %236, ptr %41, align 4, !tbaa !20
  %238 = load i32, ptr %41, align 4, !tbaa !20
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %265

240:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  %241 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %242 = trunc i64 %241 to i32
  store i32 %242, ptr %46, align 4, !tbaa !5
  %243 = load i32, ptr %46, align 4, !tbaa !5
  %244 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %243)
          to label %245 unwind label %261

245:                                              ; preds = %240
  %246 = load ptr, ptr @stdout, align 8, !tbaa !9
  %247 = invoke i32 @fflush(ptr noundef %246)
          to label %248 unwind label %261

248:                                              ; preds = %245
  %249 = load i32, ptr %41, align 4, !tbaa !20
  %250 = invoke ptr @ee2str(i32 noundef %249)
          to label %251 unwind label %261

251:                                              ; preds = %248
  %252 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %250)
          to label %253 unwind label %261

253:                                              ; preds = %251
  %254 = load ptr, ptr @stdout, align 8, !tbaa !9
  %255 = invoke i32 @fflush(ptr noundef %254)
          to label %256 unwind label %261

256:                                              ; preds = %253
  call void @exit(i32 noundef 1) #10
  unreachable

257:                                              ; preds = %233
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %15, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  br label %269

261:                                              ; preds = %253, %251, %248, %245, %240
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %15, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %269

265:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  br label %266

266:                                              ; preds = %265
  %267 = load i32, ptr %40, align 4, !tbaa !5
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %40, align 4, !tbaa !5
  br label %215, !llvm.loop !24

269:                                              ; preds = %261, %257
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %302

270:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  %271 = invoke noundef double @_Z10ut_time_msv()
          to label %272 unwind label %293

272:                                              ; preds = %270
  store double %271, ptr %47, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #9
  %273 = load double, ptr %47, align 8, !tbaa !22
  %274 = load double, ptr %39, align 8, !tbaa !22
  %275 = fsub double %273, %274
  %276 = fdiv double %275, 6.000000e+00
  store double %276, ptr %48, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 150, ptr %49) #9
  call void @llvm.lifetime.start.p0(i64 120, ptr %50) #9
  %277 = getelementptr inbounds [120 x i8], ptr %50, i64 0, i64 0
  %278 = load i32, ptr %9, align 4, !tbaa !5
  %279 = load i32, ptr %9, align 4, !tbaa !5
  %280 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %277, ptr noundef @.str.3, i32 noundef %278, i32 noundef %279) #9
  %281 = getelementptr inbounds [150 x i8], ptr %49, i64 0, i64 0
  %282 = getelementptr inbounds [120 x i8], ptr %50, i64 0, i64 0
  %283 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %281, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %282) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #9
  %284 = load i32, ptr %9, align 4, !tbaa !5
  %285 = uitofp i32 %284 to double
  %286 = fmul double 4.000000e+00, %285
  store double %286, ptr %51, align 8, !tbaa !22
  %287 = load i32, ptr %6, align 4, !tbaa !11
  %288 = getelementptr inbounds [150 x i8], ptr %49, i64 0, i64 0
  %289 = load double, ptr %51, align 8, !tbaa !22
  %290 = load double, ptr %48, align 8, !tbaa !22
  invoke void @_Z6ut_log8DataTypePcdd(i32 noundef %287, ptr noundef %288, double noundef %289, double noundef %290)
          to label %291 unwind label %297

291:                                              ; preds = %272
  %292 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %292) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 150, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  ret i32 0

293:                                              ; preds = %270
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %15, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %16, align 4
  br label %301

297:                                              ; preds = %272
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %15, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 150, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  br label %301

301:                                              ; preds = %297, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  br label %302

302:                                              ; preds = %301, %269, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %303

303:                                              ; preds = %302, %228, %219, %195
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  br label %304

304:                                              ; preds = %303, %159
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  br label %305

305:                                              ; preds = %304, %155
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #9
  br label %306

306:                                              ; preds = %305, %151, %150
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  br label %307

307:                                              ; preds = %306, %110
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  br label %308

308:                                              ; preds = %307, %106
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %309

309:                                              ; preds = %308
  %310 = load ptr, ptr %15, align 8
  %311 = load i32, ptr %16, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313
}

; 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: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef, i32 noundef, i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind noalias writable sret(%class.Tensor) align 8, ptr noundef byval(%struct.TensorDesc) align 8) #0 align 2

; 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) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #8 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare noundef i32 @_Z25softmax_infer_output_sizeP6Tensor16SoftmaxParamSpecS0_P8ArchInfo(ptr noundef, i32, ptr noundef, ptr noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

declare noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef, i32, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

declare noundef double @_Z10ut_time_msv() #3

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z6ut_log8DataTypePcdd(i32 noundef, ptr noundef, double noundef, double noundef) #6

; Function Attrs: nounwind
declare void @free(ptr noundef) #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 = { 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 #5 = { inlinehint mustprogress nounwind willreturn memory(read) 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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind willreturn memory(read) }

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

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


; 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.ArchInfo = type { i32, ptr }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

@.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 [23 x i8], align 1
@_ZL15UT_CPU_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZL18UT_SERIAL_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11softmaxTestiPPc8DataType(i32 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.TensorDesc, align 8
  %5 = alloca %class.Tensor, align 8
  %6 = alloca %class.Tensor, align 8
  %7 = alloca %class.Tensor, align 8
  %8 = alloca %class.Tensor, align 8
  %9 = alloca %struct.TensorDesc, align 8
  %10 = alloca %class.Tensor, align 8
  %11 = alloca %class.Tensor, align 8
  %12 = alloca %class.Tensor, align 8
  %13 = alloca %class.Tensor, align 8
  %14 = alloca %class.Tensor, align 8
  %15 = alloca %class.Tensor, align 8
  %16 = alloca %class.Tensor, align 8
  %17 = alloca %class.Tensor, align 8
  %18 = alloca %class.Tensor, align 8
  %19 = alloca %class.Tensor, align 8
  %20 = alloca %class.Tensor, align 8
  %21 = alloca %class.Tensor, align 8
  %22 = alloca [150 x i8], align 16
  %23 = alloca [120 x i8], align 16
  %24 = icmp eq i32 %0, 2
  br i1 %24, label %34, label %25

25:                                               ; preds = %3
  %26 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %27 = trunc i64 %26 to i32
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %27)
  %29 = load ptr, ptr @stdout, align 8, !tbaa !5
  %30 = tail call i32 @fflush(ptr noundef %29)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %32 = load ptr, ptr @stdout, align 8, !tbaa !5
  %33 = tail call i32 @fflush(ptr noundef %32)
  tail call void @exit(i32 noundef 1) #11
  unreachable

34:                                               ; preds = %3
  %35 = getelementptr inbounds i8, ptr %1, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = tail call i32 @atoi(ptr nocapture noundef %36) #12
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %4) #10
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %4, i32 noundef %2, i32 noundef 14, i32 noundef 1, i32 noundef %37)
  %38 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %37, i32 noundef %2, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %5, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  %39 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %6, i32 noundef 1)
          to label %40 unwind label %58

40:                                               ; preds = %34
  %41 = invoke noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
          to label %42 unwind label %58

42:                                               ; preds = %40
  %43 = zext i32 %41 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %39, ptr noundef %38, i64 noundef %43)
          to label %44 unwind label %58

44:                                               ; preds = %42
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 1)
          to label %45 unwind label %60

45:                                               ; preds = %44
  %46 = invoke noundef i32 @_Z25softmax_infer_output_sizeP6Tensor16SoftmaxParamSpecS0_P8ArchInfo(ptr noundef nonnull %5, i32 1, ptr noundef nonnull %7, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %47 unwind label %62

47:                                               ; preds = %45
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %64, label %48

48:                                               ; preds = %47
  %49 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %50 = trunc i64 %49 to i32
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %50)
  %52 = load ptr, ptr @stdout, align 8, !tbaa !5
  %53 = call i32 @fflush(ptr noundef %52)
  %54 = call ptr @ee2str(i32 noundef %46)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %54)
  %56 = load ptr, ptr @stdout, align 8, !tbaa !5
  %57 = call i32 @fflush(ptr noundef %56)
  call void @exit(i32 noundef 1) #11
  unreachable

58:                                               ; preds = %42, %40, %34
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %163

60:                                               ; preds = %44
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %162

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

64:                                               ; preds = %47
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %65 unwind label %81

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %66 unwind label %83

66:                                               ; preds = %65
  invoke void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %8, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9)
          to label %67 unwind label %83

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
          to label %68 unwind label %85

68:                                               ; preds = %67
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %69 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %11, i32 1, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %70 unwind label %87

70:                                               ; preds = %68
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  %.not54 = icmp eq i32 %69, 0
  br i1 %.not54, label %89, label %71

71:                                               ; preds = %70
  %72 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %73 = trunc i64 %72 to i32
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %73)
  %75 = load ptr, ptr @stdout, align 8, !tbaa !5
  %76 = call i32 @fflush(ptr noundef %75)
  %77 = call ptr @ee2str(i32 noundef %69)
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %77)
  %79 = load ptr, ptr @stdout, align 8, !tbaa !5
  %80 = call i32 @fflush(ptr noundef %79)
  call void @exit(i32 noundef 1) #11
  unreachable

81:                                               ; preds = %64
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %161

83:                                               ; preds = %66, %65
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %160

85:                                               ; preds = %67
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %159

87:                                               ; preds = %68
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  br label %158

89:                                               ; preds = %70
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  %90 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %14, i32 1, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull @_ZL18UT_SERIAL_ARCHINFO)
          to label %91 unwind label %102

91:                                               ; preds = %89
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  %.not55 = icmp eq i32 %90, 0
  br i1 %.not55, label %104, label %92

92:                                               ; preds = %91
  %93 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %94 = trunc i64 %93 to i32
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %94)
  %96 = load ptr, ptr @stdout, align 8, !tbaa !5
  %97 = call i32 @fflush(ptr noundef %96)
  %98 = call ptr @ee2str(i32 noundef %90)
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %98)
  %100 = load ptr, ptr @stdout, align 8, !tbaa !5
  %101 = call i32 @fflush(ptr noundef %100)
  call void @exit(i32 noundef 1) #11
  unreachable

102:                                              ; preds = %89
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %158

104:                                              ; preds = %91
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %105 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %17, i32 noundef 1)
          to label %106 unwind label %126

106:                                              ; preds = %104
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  %107 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %18, i32 noundef 1)
          to label %108 unwind label %128

108:                                              ; preds = %106
  %109 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %110 unwind label %128

110:                                              ; preds = %108
  invoke void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef %105, ptr noundef %107, i32 noundef %109, i32 noundef %2, float noundef 0x3FB99999A0000000)
          to label %111 unwind label %128

111:                                              ; preds = %110
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  %112 = invoke noundef double @_Z10ut_time_msv()
          to label %.preheader.preheader unwind label %131

.preheader.preheader:                             ; preds = %111
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %113 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %133 unwind label %144

.preheader.1:                                     ; preds = %133
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %114 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %115 unwind label %144

115:                                              ; preds = %.preheader.1
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67.1 = icmp eq i32 %114, 0
  br i1 %.not67.1, label %.preheader.2, label %134

.preheader.2:                                     ; preds = %115
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %116 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %117 unwind label %144

117:                                              ; preds = %.preheader.2
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67.2 = icmp eq i32 %116, 0
  br i1 %.not67.2, label %.preheader.3, label %134

.preheader.3:                                     ; preds = %117
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %118 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %119 unwind label %144

119:                                              ; preds = %.preheader.3
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67.3 = icmp eq i32 %118, 0
  br i1 %.not67.3, label %.preheader.4, label %134

.preheader.4:                                     ; preds = %119
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %120 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %121 unwind label %144

121:                                              ; preds = %.preheader.4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67.4 = icmp eq i32 %120, 0
  br i1 %.not67.4, label %.preheader.5, label %134

.preheader.5:                                     ; preds = %121
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %122 = invoke noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef nonnull %19, i32 1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %123 unwind label %144

123:                                              ; preds = %.preheader.5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67.5 = icmp eq i32 %122, 0
  br i1 %.not67.5, label %124, label %134

124:                                              ; preds = %123
  %125 = invoke noundef double @_Z10ut_time_msv()
          to label %146 unwind label %154

126:                                              ; preds = %104
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %130

128:                                              ; preds = %110, %108, %106
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #10
  br label %130

130:                                              ; preds = %128, %126
  %.pn = phi { ptr, i32 } [ %129, %128 ], [ %127, %126 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  br label %158

131:                                              ; preds = %111
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %158

133:                                              ; preds = %.preheader.preheader
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  %.not67 = icmp eq i32 %113, 0
  br i1 %.not67, label %.preheader.1, label %134

134:                                              ; preds = %123, %121, %119, %117, %115, %133
  %.lcssa = phi i32 [ %113, %133 ], [ %114, %115 ], [ %116, %117 ], [ %118, %119 ], [ %120, %121 ], [ %122, %123 ]
  %135 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %136 = trunc i64 %135 to i32
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %136)
  %138 = load ptr, ptr @stdout, align 8, !tbaa !5
  %139 = call i32 @fflush(ptr noundef %138)
  %140 = call ptr @ee2str(i32 noundef %.lcssa)
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %140)
  %142 = load ptr, ptr @stdout, align 8, !tbaa !5
  %143 = call i32 @fflush(ptr noundef %142)
  call void @exit(i32 noundef 1) #11
  unreachable

144:                                              ; preds = %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  br label %158

146:                                              ; preds = %124
  %147 = fsub double %125, %112
  %148 = fdiv double %147, 6.000000e+00
  call void @llvm.lifetime.start.p0(i64 150, ptr nonnull %22) #10
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %23) #10
  %149 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %23, ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %37, i32 noundef %37) #10
  %150 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %22, ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull %23) #10
  %151 = uitofp i32 %37 to double
  %152 = fmul double %151, 4.000000e+00
  invoke void @_Z6ut_log8DataTypePcdd(i32 noundef %2, ptr noundef nonnull %22, double noundef %152, double noundef %148)
          to label %153 unwind label %156

153:                                              ; preds = %146
  call void @free(ptr noundef %38) #10
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 150, ptr nonnull %22) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %4) #10
  ret i32 0

154:                                              ; preds = %124
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %158

156:                                              ; preds = %146
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 150, ptr nonnull %22) #10
  br label %158

158:                                              ; preds = %131, %144, %156, %154, %130, %102, %87
  %.pn59.pn = phi { ptr, i32 } [ %.pn, %130 ], [ %103, %102 ], [ %88, %87 ], [ %145, %144 ], [ %132, %131 ], [ %157, %156 ], [ %155, %154 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %159

159:                                              ; preds = %158, %85
  %.pn59.pn.pn = phi { ptr, i32 } [ %.pn59.pn, %158 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  br label %160

160:                                              ; preds = %159, %83
  %.pn59.pn.pn.pn = phi { ptr, i32 } [ %.pn59.pn.pn, %159 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %161

161:                                              ; preds = %160, %81, %62
  %.pn59.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn59.pn.pn.pn, %160 ], [ %82, %81 ], [ %63, %62 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %162

162:                                              ; preds = %161, %60
  %.pn59.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn59.pn.pn.pn.pn, %161 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  br label %163

163:                                              ; preds = %162, %58
  %.pn59.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn59.pn.pn.pn.pn.pn, %162 ], [ %59, %58 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn59.pn.pn.pn.pn.pn.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: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind noalias writable sret(%class.Tensor) align 8, ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare noundef i32 @_Z25softmax_infer_output_sizeP6Tensor16SoftmaxParamSpecS0_P8ArchInfo(ptr noundef, i32, ptr noundef, ptr noundef) local_unnamed_addr #8

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

declare noundef i32 @_Z7softmax6Tensor16SoftmaxParamSpecS_S_P8ArchInfo(ptr noundef, i32, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

declare noundef double @_Z10ut_time_msv() local_unnamed_addr #8

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z6ut_log8DataTypePcdd(i32 noundef, ptr noundef, double noundef, double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9

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 = { 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 #5 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { 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 #7 = { 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 #8 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass