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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13attentionTestiPPc8DataType(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.AttentionParamSpec, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.TensorDesc, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.TensorDesc, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %class.Tensor, align 8
  %16 = alloca %struct.TensorDesc, align 8
  %17 = alloca %class.Tensor, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.AttentionParamSpec, align 4
  %22 = alloca { i64, i32 }, align 4
  %23 = alloca i32, align 4
  %24 = alloca %class.Tensor, align 8
  %25 = alloca %struct.TensorDesc, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %class.Tensor, align 8
  %32 = alloca %struct.TensorDesc, align 8
  %33 = alloca i32, align 4
  %34 = alloca %class.Tensor, align 8
  %35 = alloca %class.Tensor, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca %class.Tensor, align 8
  %39 = alloca %class.Tensor, align 8
  %40 = alloca i32, align 4
  %41 = alloca %class.Tensor, align 8
  %42 = alloca %class.Tensor, align 8
  %43 = alloca double, align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca %class.Tensor, align 8
  %47 = alloca %class.Tensor, align 8
  %48 = alloca i32, align 4
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca [150 x i8], align 16
  %52 = alloca [120 x i8], align 16
  %53 = 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
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 5
  br i1 %55, label %66, label %56

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

66:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %67 = load ptr, ptr %5, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 1
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = call i32 @atoi(ptr noundef %69) #11
  store i32 %70, ptr %9, align 4, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 2
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = call i32 @atoi(ptr noundef %73) #11
  %75 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 0
  store i32 %74, ptr %75, align 4, !tbaa !13
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 3
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call i32 @atoi(ptr noundef %78) #11
  %80 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 1
  store i32 %79, ptr %80, align 4, !tbaa !15
  %81 = load ptr, ptr %5, align 8, !tbaa !9
  %82 = getelementptr inbounds ptr, ptr %81, i64 4
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = call i32 @atoi(ptr noundef %83) #11
  %85 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 2
  store i32 %84, ptr %85, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 14, ptr %10, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 92, ptr %11) #9
  %86 = load i32, ptr %6, align 4, !tbaa !11
  %87 = load i32, ptr %10, align 4, !tbaa !17
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 2
  %90 = load i32, ptr %89, align 4, !tbaa !16
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %11, i32 noundef %86, i32 noundef %87, i32 noundef %88, i32 noundef %90)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %11, i64 92, i1 false), !tbaa.struct !19
  %91 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %13)
  store i32 %91, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = load i32, ptr %6, align 4, !tbaa !11
  %94 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %92, i32 noundef %93, i32 noundef 3)
  store ptr %94, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %11, i64 92, i1 false), !tbaa.struct !19
  call void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %15, ptr noundef byval(%struct.TensorDesc) align 8 %16)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef 1)
          to label %95 unwind label %121

95:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %21, i64 12, i1 false)
  %96 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 0
  %97 = load i64, ptr %96, align 4
  %98 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 1
  %99 = load i32, ptr %98, align 4
  %100 = invoke noundef i32 @_Z27attention_infer_output_sizeP6Tensor18AttentionParamSpecS0_(ptr noundef %15, i64 %97, i32 %99, ptr noundef %17)
          to label %101 unwind label %125

101:                                              ; preds = %95
  store i32 %100, ptr %20, align 4, !tbaa !22
  %102 = load i32, ptr %20, align 4, !tbaa !22
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %133

104:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %105 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %106 = trunc i64 %105 to i32
  store i32 %106, ptr %23, align 4, !tbaa !5
  %107 = load i32, ptr %23, align 4, !tbaa !5
  %108 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %107)
          to label %109 unwind label %129

109:                                              ; preds = %104
  %110 = load ptr, ptr @stdout, align 8, !tbaa !9
  %111 = invoke i32 @fflush(ptr noundef %110)
          to label %112 unwind label %129

112:                                              ; preds = %109
  %113 = load i32, ptr %20, align 4, !tbaa !22
  %114 = invoke ptr @ee2str(i32 noundef %113)
          to label %115 unwind label %129

115:                                              ; preds = %112
  %116 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %114)
          to label %117 unwind label %129

117:                                              ; preds = %115
  %118 = load ptr, ptr @stdout, align 8, !tbaa !9
  %119 = invoke i32 @fflush(ptr noundef %118)
          to label %120 unwind label %129

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

121:                                              ; preds = %66
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %18, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %19, align 4
  br label %365

125:                                              ; preds = %95
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %18, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %19, align 4
  br label %144

129:                                              ; preds = %117, %115, %112, %109, %104
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %18, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %144

133:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %134 unwind label %145

134:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #9
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %25, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %135 unwind label %149

135:                                              ; preds = %134
  invoke void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %24, ptr noundef byval(%struct.TensorDesc) align 8 %25)
          to label %136 unwind label %149

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %137 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %138 unwind label %153

138:                                              ; preds = %136
  store i32 %137, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %182, %138
  %140 = load i32, ptr %27, align 4, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = icmp ult i32 %140, %141
  br i1 %142, label %157, label %143

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

144:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %364

145:                                              ; preds = %133
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %18, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %19, align 4
  br label %364

149:                                              ; preds = %135, %134
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %18, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %19, align 4
  br label %363

153:                                              ; preds = %136
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %18, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %19, align 4
  br label %362

157:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %158 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 2
  %159 = load i32, ptr %158, align 4, !tbaa !16
  %160 = udiv i32 %159, 2
  %161 = load i32, ptr %27, align 4, !tbaa !5
  %162 = add i32 %160, %161
  store i32 %162, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %178, %157
  %164 = load i32, ptr %30, align 4, !tbaa !5
  %165 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 2
  %166 = load i32, ptr %165, align 4, !tbaa !16
  %167 = icmp ult i32 %164, %166
  br i1 %167, label %169, label %168

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

169:                                              ; preds = %163
  %170 = load i32, ptr %30, align 4, !tbaa !5
  %171 = load i32, ptr %29, align 4, !tbaa !5
  %172 = icmp ult i32 %170, %171
  br i1 %172, label %173, label %177

173:                                              ; preds = %169
  %174 = load i32, ptr %6, align 4, !tbaa !11
  switch i32 %174, label %175 [
  ]

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176, %169
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %30, align 4, !tbaa !5
  %180 = add i32 %179, 1
  store i32 %180, ptr %30, align 4, !tbaa !5
  br label %163, !llvm.loop !24

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

182:                                              ; preds = %181
  %183 = load i32, ptr %27, align 4, !tbaa !5
  %184 = add i32 %183, 1
  store i32 %184, ptr %27, align 4, !tbaa !5
  br label %139, !llvm.loop !26

185:                                              ; preds = %143
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  %186 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %31, i32 noundef 1)
          to label %187 unwind label %214

187:                                              ; preds = %185
  %188 = load ptr, ptr %14, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %11, i64 92, i1 false), !tbaa.struct !19
  %189 = invoke noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %32)
          to label %190 unwind label %214

190:                                              ; preds = %187
  %191 = zext i32 %189 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %186, ptr noundef %188, i64 noundef %191)
          to label %192 unwind label %214

192:                                              ; preds = %190
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  %193 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef %34, ptr noundef %35, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %194 unwind label %218

194:                                              ; preds = %192
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  store i32 %193, ptr %33, align 4, !tbaa !22
  %195 = load i32, ptr %33, align 4, !tbaa !22
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %226

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %198 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %199 = trunc i64 %198 to i32
  store i32 %199, ptr %36, align 4, !tbaa !5
  %200 = load i32, ptr %36, align 4, !tbaa !5
  %201 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %200)
          to label %202 unwind label %222

202:                                              ; preds = %197
  %203 = load ptr, ptr @stdout, align 8, !tbaa !9
  %204 = invoke i32 @fflush(ptr noundef %203)
          to label %205 unwind label %222

205:                                              ; preds = %202
  %206 = load i32, ptr %33, align 4, !tbaa !22
  %207 = invoke ptr @ee2str(i32 noundef %206)
          to label %208 unwind label %222

208:                                              ; preds = %205
  %209 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %207)
          to label %210 unwind label %222

210:                                              ; preds = %208
  %211 = load ptr, ptr @stdout, align 8, !tbaa !9
  %212 = invoke i32 @fflush(ptr noundef %211)
          to label %213 unwind label %222

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

214:                                              ; preds = %190, %187, %185
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %18, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %19, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  br label %362

218:                                              ; preds = %192
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %18, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %19, 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
  br label %248

222:                                              ; preds = %210, %208, %205, %202, %197
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %18, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %248

226:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  %227 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef %38, ptr noundef %39, ptr noundef @_ZL18UT_SERIAL_ARCHINFO)
          to label %228 unwind label %249

228:                                              ; preds = %226
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  store i32 %227, ptr %37, align 4, !tbaa !22
  %229 = load i32, ptr %37, align 4, !tbaa !22
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %257

231:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %232 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %233 = trunc i64 %232 to i32
  store i32 %233, ptr %40, align 4, !tbaa !5
  %234 = load i32, ptr %40, align 4, !tbaa !5
  %235 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %234)
          to label %236 unwind label %253

236:                                              ; preds = %231
  %237 = load ptr, ptr @stdout, align 8, !tbaa !9
  %238 = invoke i32 @fflush(ptr noundef %237)
          to label %239 unwind label %253

239:                                              ; preds = %236
  %240 = load i32, ptr %37, align 4, !tbaa !22
  %241 = invoke ptr @ee2str(i32 noundef %240)
          to label %242 unwind label %253

242:                                              ; preds = %239
  %243 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %241)
          to label %244 unwind label %253

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

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

248:                                              ; preds = %222, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %362

249:                                              ; preds = %226
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %18, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %19, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  br label %271

253:                                              ; preds = %244, %242, %239, %236, %231
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %18, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %271

257:                                              ; preds = %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  %258 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %41, i32 noundef 1)
          to label %259 unwind label %272

259:                                              ; preds = %257
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  %260 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %42, i32 noundef 1)
          to label %261 unwind label %276

261:                                              ; preds = %259
  %262 = load i32, ptr %26, align 4, !tbaa !5
  %263 = load i32, ptr %6, align 4, !tbaa !11
  invoke void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef %258, ptr noundef %260, i32 noundef %262, i32 noundef %263, float noundef 0.000000e+00)
          to label %264 unwind label %276

264:                                              ; preds = %261
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %265 = invoke noundef double @_Z10ut_time_msv()
          to label %266 unwind label %281

266:                                              ; preds = %264
  store double %265, ptr %43, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  store i32 0, ptr %44, align 4, !tbaa !5
  br label %267

267:                                              ; preds = %316, %266
  %268 = load i32, ptr %44, align 4, !tbaa !5
  %269 = icmp slt i32 %268, 6
  br i1 %269, label %285, label %270

270:                                              ; preds = %267
  store i32 9, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %320

271:                                              ; preds = %253, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %362

272:                                              ; preds = %257
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %18, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %19, align 4
  br label %280

276:                                              ; preds = %261, %259
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %18, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %19, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  br label %280

280:                                              ; preds = %276, %272
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #9
  br label %362

281:                                              ; preds = %264
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %18, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %19, align 4
  br label %361

285:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  %286 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef %46, ptr noundef %47, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %287 unwind label %307

287:                                              ; preds = %285
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  store i32 %286, ptr %45, align 4, !tbaa !22
  %288 = load i32, ptr %45, align 4, !tbaa !22
  %289 = icmp ne i32 %288, 0
  br i1 %289, label %290, label %315

290:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  %291 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %292 = trunc i64 %291 to i32
  store i32 %292, ptr %48, align 4, !tbaa !5
  %293 = load i32, ptr %48, align 4, !tbaa !5
  %294 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %293)
          to label %295 unwind label %311

295:                                              ; preds = %290
  %296 = load ptr, ptr @stdout, align 8, !tbaa !9
  %297 = invoke i32 @fflush(ptr noundef %296)
          to label %298 unwind label %311

298:                                              ; preds = %295
  %299 = load i32, ptr %45, align 4, !tbaa !22
  %300 = invoke ptr @ee2str(i32 noundef %299)
          to label %301 unwind label %311

301:                                              ; preds = %298
  %302 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %300)
          to label %303 unwind label %311

303:                                              ; preds = %301
  %304 = load ptr, ptr @stdout, align 8, !tbaa !9
  %305 = invoke i32 @fflush(ptr noundef %304)
          to label %306 unwind label %311

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

307:                                              ; preds = %285
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %18, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %19, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  br label %319

311:                                              ; preds = %303, %301, %298, %295, %290
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %18, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %319

315:                                              ; preds = %287
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %44, align 4, !tbaa !5
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %44, align 4, !tbaa !5
  br label %267, !llvm.loop !29

319:                                              ; preds = %311, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %361

320:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %321 = invoke noundef double @_Z10ut_time_msv()
          to label %322 unwind label %352

322:                                              ; preds = %320
  store double %321, ptr %49, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #9
  %323 = load double, ptr %49, align 8, !tbaa !27
  %324 = load double, ptr %43, align 8, !tbaa !27
  %325 = fsub double %323, %324
  %326 = fdiv double %325, 6.000000e+00
  store double %326, ptr %50, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 150, ptr %51) #9
  call void @llvm.lifetime.start.p0(i64 120, ptr %52) #9
  %327 = getelementptr inbounds [120 x i8], ptr %52, i64 0, i64 0
  %328 = load i32, ptr %9, align 4, !tbaa !5
  %329 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 1
  %330 = load i32, ptr %329, align 4, !tbaa !15
  %331 = load i32, ptr %9, align 4, !tbaa !5
  %332 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 0
  %333 = load i32, ptr %332, align 4, !tbaa !13
  %334 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 1
  %335 = load i32, ptr %334, align 4, !tbaa !15
  %336 = getelementptr inbounds %struct.AttentionParamSpec, ptr %8, i32 0, i32 2
  %337 = load i32, ptr %336, align 4, !tbaa !16
  %338 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %327, ptr noundef @.str.3, i32 noundef %328, i32 noundef %330, i32 noundef %331, i32 noundef %333, i32 noundef %335, i32 noundef %337) #9
  %339 = getelementptr inbounds [150 x i8], ptr %51, i64 0, i64 0
  %340 = getelementptr inbounds [120 x i8], ptr %52, i64 0, i64 0
  %341 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %339, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %340) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %342 = load i32, ptr %26, align 4, !tbaa !5
  %343 = uitofp i32 %342 to double
  %344 = fmul double 3.000000e+00, %343
  store double %344, ptr %53, align 8, !tbaa !27
  %345 = load i32, ptr %6, align 4, !tbaa !11
  %346 = getelementptr inbounds [150 x i8], ptr %51, i64 0, i64 0
  %347 = load double, ptr %53, align 8, !tbaa !27
  %348 = load double, ptr %50, align 8, !tbaa !27
  %349 = fdiv double %348, 6.000000e+00
  invoke void @_Z6ut_log8DataTypePcdd(i32 noundef %345, ptr noundef %346, double noundef %347, double noundef %349)
          to label %350 unwind label %356

350:                                              ; preds = %322
  %351 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %351) #9
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 150, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #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) %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #9
  ret i32 0

352:                                              ; preds = %320
  %353 = landingpad { ptr, i32 }
          cleanup
  %354 = extractvalue { ptr, i32 } %353, 0
  store ptr %354, ptr %18, align 8
  %355 = extractvalue { ptr, i32 } %353, 1
  store i32 %355, ptr %19, align 4
  br label %360

356:                                              ; preds = %322
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %18, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 150, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  br label %360

360:                                              ; preds = %356, %352
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  br label %361

361:                                              ; preds = %360, %319, %281
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  br label %362

362:                                              ; preds = %361, %280, %271, %248, %214, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  br label %363

363:                                              ; preds = %362, %149
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  br label %364

364:                                              ; preds = %363, %145, %144
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %365

365:                                              ; preds = %364, %121
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #9
  br label %366

366:                                              ; preds = %365
  %367 = load ptr, ptr %18, align 8
  %368 = load i32, ptr %19, align 4
  %369 = insertvalue { ptr, i32 } poison, ptr %367, 0
  %370 = insertvalue { ptr, i32 } %369, i32 %368, 1
  resume { ptr, i32 } %370
}

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

declare noundef i32 @_Z27attention_infer_output_sizeP6Tensor18AttentionParamSpecS0_(ptr noundef, i64, i32, ptr noundef) #3

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

; 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

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

; 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 #7 align 2

; 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 #7 align 2

declare noundef i32 @_Z9attention6TensorS_P8ArchInfo(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

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_ZTS18AttentionParamSpec", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !6, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTS10DataFormat", !7, i64 0}
!19 = !{i64 0, i64 4, !11, i64 4, i64 4, !17, i64 8, i64 4, !5, i64 12, i64 80, !20}
!20 = !{!7, !7, i64 0}
!21 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTS2EE", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = distinct !{!29, !25}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13attentionTestiPPc8DataType(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 %struct.TensorDesc, align 8
  %9 = alloca %class.Tensor, 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 [150 x i8], align 16
  %19 = alloca [120 x i8], align 16
  %20 = icmp eq i32 %0, 5
  br i1 %20, label %30, label %21

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

30:                                               ; preds = %3
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = tail call i32 @atoi(ptr nocapture noundef %32) #12
  %34 = getelementptr inbounds i8, ptr %1, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = tail call i32 @atoi(ptr nocapture noundef %35) #12
  %37 = getelementptr inbounds i8, ptr %1, i64 24
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = tail call i32 @atoi(ptr nocapture noundef %38) #12
  %40 = getelementptr inbounds i8, ptr %1, i64 32
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = tail call i32 @atoi(ptr nocapture noundef %41) #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 %33, i32 noundef %42)
  %43 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
  %44 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %43, i32 noundef %2, i32 noundef 3)
  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 @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #10
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1)
          to label %45 unwind label %58

45:                                               ; preds = %30
  %.sroa.038.0.insert.ext = zext i32 %36 to i64
  %.sroa.038.4.insert.ext = zext i32 %39 to i64
  %.sroa.038.4.insert.shift = shl nuw i64 %.sroa.038.4.insert.ext, 32
  %.sroa.038.4.insert.insert = or disjoint i64 %.sroa.038.4.insert.shift, %.sroa.038.0.insert.ext
  %46 = invoke noundef i32 @_Z27attention_infer_output_sizeP6Tensor18AttentionParamSpecS0_(ptr noundef nonnull %5, i64 %.sroa.038.4.insert.insert, i32 %42, ptr noundef nonnull %6)
          to label %47 unwind label %60

47:                                               ; preds = %45
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %62, 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 = %30
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %166

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

62:                                               ; preds = %47
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %63 unwind label %68

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

64:                                               ; preds = %63
  invoke void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %7, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %8)
          to label %65 unwind label %70

65:                                               ; preds = %64
  %66 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %._crit_edge unwind label %72

._crit_edge:                                      ; preds = %65
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  %67 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %9, i32 noundef 1)
          to label %74 unwind label %91

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

70:                                               ; preds = %64, %63
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %164

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

74:                                               ; preds = %._crit_edge
  %75 = invoke noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
          to label %76 unwind label %91

76:                                               ; preds = %74
  %77 = zext i32 %75 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %67, ptr noundef %44, i64 noundef %77)
          to label %78 unwind label %91

78:                                               ; preds = %76
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %79 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %80 unwind label %93

80:                                               ; preds = %78
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  %.not72 = icmp eq i32 %79, 0
  br i1 %.not72, label %95, label %81

81:                                               ; preds = %80
  %82 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %83 = trunc i64 %82 to i32
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %83)
  %85 = load ptr, ptr @stdout, align 8, !tbaa !5
  %86 = call i32 @fflush(ptr noundef %85)
  %87 = call ptr @ee2str(i32 noundef %79)
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %87)
  %89 = load ptr, ptr @stdout, align 8, !tbaa !5
  %90 = call i32 @fflush(ptr noundef %89)
  call void @exit(i32 noundef 1) #11
  unreachable

91:                                               ; preds = %76, %74, %._crit_edge
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  br label %163

93:                                               ; preds = %78
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %163

95:                                               ; preds = %80
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %96 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull @_ZL18UT_SERIAL_ARCHINFO)
          to label %97 unwind label %108

97:                                               ; preds = %95
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  %.not73 = icmp eq i32 %96, 0
  br i1 %.not73, label %110, label %98

98:                                               ; preds = %97
  %99 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %100 = trunc i64 %99 to i32
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %100)
  %102 = load ptr, ptr @stdout, align 8, !tbaa !5
  %103 = call i32 @fflush(ptr noundef %102)
  %104 = call ptr @ee2str(i32 noundef %96)
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %104)
  %106 = load ptr, ptr @stdout, align 8, !tbaa !5
  %107 = call i32 @fflush(ptr noundef %106)
  call void @exit(i32 noundef 1) #11
  unreachable

108:                                              ; preds = %95
  %109 = 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
  br label %163

110:                                              ; preds = %97
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %111 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %14, i32 noundef 1)
          to label %112 unwind label %130

112:                                              ; preds = %110
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %113 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %15, i32 noundef 1)
          to label %114 unwind label %132

114:                                              ; preds = %112
  invoke void @_Z10ut_check_vPvS_j8DataTypef(ptr noundef %111, ptr noundef %113, i32 noundef %66, i32 noundef %2, float noundef 0.000000e+00)
          to label %115 unwind label %132

115:                                              ; preds = %114
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  %116 = invoke noundef double @_Z10ut_time_msv()
          to label %.preheader.preheader unwind label %135

.preheader.preheader:                             ; preds = %115
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %117 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %137 unwind label %148

.preheader.1:                                     ; preds = %137
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %118 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %119 unwind label %148

119:                                              ; preds = %.preheader.1
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83.1 = icmp eq i32 %118, 0
  br i1 %.not83.1, label %.preheader.2, label %138

.preheader.2:                                     ; preds = %119
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %120 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %121 unwind label %148

121:                                              ; preds = %.preheader.2
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83.2 = icmp eq i32 %120, 0
  br i1 %.not83.2, label %.preheader.3, label %138

.preheader.3:                                     ; preds = %121
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %122 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %123 unwind label %148

123:                                              ; preds = %.preheader.3
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83.3 = icmp eq i32 %122, 0
  br i1 %.not83.3, label %.preheader.4, label %138

.preheader.4:                                     ; preds = %123
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %124 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %125 unwind label %148

125:                                              ; preds = %.preheader.4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83.4 = icmp eq i32 %124, 0
  br i1 %.not83.4, label %.preheader.5, label %138

.preheader.5:                                     ; preds = %125
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  %126 = invoke noundef i32 @_Z9attention6TensorS_P8ArchInfo(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %127 unwind label %148

127:                                              ; preds = %.preheader.5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83.5 = icmp eq i32 %126, 0
  br i1 %.not83.5, label %128, label %138

128:                                              ; preds = %127
  %129 = invoke noundef double @_Z10ut_time_msv()
          to label %150 unwind label %159

130:                                              ; preds = %110
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %134

132:                                              ; preds = %114, %112
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  br label %134

134:                                              ; preds = %132, %130
  %.pn = phi { ptr, i32 } [ %133, %132 ], [ %131, %130 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %163

135:                                              ; preds = %115
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %163

137:                                              ; preds = %.preheader.preheader
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  %.not83 = icmp eq i32 %117, 0
  br i1 %.not83, label %.preheader.1, label %138

138:                                              ; preds = %127, %125, %123, %121, %119, %137
  %.lcssa = phi i32 [ %117, %137 ], [ %118, %119 ], [ %120, %121 ], [ %122, %123 ], [ %124, %125 ], [ %126, %127 ]
  %139 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %140 = trunc i64 %139 to i32
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %140)
  %142 = load ptr, ptr @stdout, align 8, !tbaa !5
  %143 = call i32 @fflush(ptr noundef %142)
  %144 = call ptr @ee2str(i32 noundef %.lcssa)
  %145 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %144)
  %146 = load ptr, ptr @stdout, align 8, !tbaa !5
  %147 = call i32 @fflush(ptr noundef %146)
  call void @exit(i32 noundef 1) #11
  unreachable

148:                                              ; preds = %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  br label %163

150:                                              ; preds = %128
  %151 = fsub double %129, %116
  %152 = fdiv double %151, 6.000000e+00
  call void @llvm.lifetime.start.p0(i64 150, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %19) #10
  %153 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %33, i32 noundef %39, i32 noundef %33, i32 noundef %36, i32 noundef %39, i32 noundef %42) #10
  %154 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull %19) #10
  %155 = uitofp i32 %66 to double
  %156 = fmul double %155, 3.000000e+00
  %157 = fdiv double %152, 6.000000e+00
  invoke void @_Z6ut_log8DataTypePcdd(i32 noundef %2, ptr noundef nonnull %18, double noundef %156, double noundef %157)
          to label %158 unwind label %161

158:                                              ; preds = %150
  call void @free(ptr noundef %44) #10
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 150, ptr nonnull %18) #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) %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #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

159:                                              ; preds = %128
  %160 = landingpad { ptr, i32 }
          cleanup
  br label %163

161:                                              ; preds = %150
  %162 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 150, ptr nonnull %18) #10
  br label %163

163:                                              ; preds = %135, %148, %161, %159, %134, %108, %93, %91, %72
  %.pn77.pn = phi { ptr, i32 } [ %.pn, %134 ], [ %109, %108 ], [ %94, %93 ], [ %92, %91 ], [ %73, %72 ], [ %149, %148 ], [ %136, %135 ], [ %162, %161 ], [ %160, %159 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %164

164:                                              ; preds = %163, %70
  %.pn77.pn.pn = phi { ptr, i32 } [ %.pn77.pn, %163 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  br label %165

165:                                              ; preds = %164, %68, %60
  %.pn77.pn.pn.pn = phi { ptr, i32 } [ %.pn77.pn.pn, %164 ], [ %69, %68 ], [ %61, %60 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %166

166:                                              ; preds = %165, %58
  %.pn77.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn77.pn.pn.pn, %165 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #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
  resume { ptr, i32 } %.pn77.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 nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #7

; 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: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

declare noundef i32 @_Z27attention_infer_output_sizeP6Tensor18AttentionParamSpecS0_(ptr noundef, i64, i32, 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) 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

; 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

declare noundef i32 @_Z9attention6TensorS_P8ArchInfo(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

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: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass