; LLVM IR from NVIDIA/FasterTransformer :: src/fastertransformer/utils/gemm_test (decoding_gemm_func)

; 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"

%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN17fastertransformer32calDecodingGemmTestBufSizeInByteEiiiiiiiiNS_14CublasDataTypeE(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) #2 personality ptr @__gxx_personality_v0 {
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca %"class.std::vector.3", align 8
  %27 = alloca i64, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca ptr, align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %37 = alloca i64, align 8
  store i32 %0, ptr %10, align 4, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !5
  store i32 %3, ptr %13, align 4, !tbaa !5
  store i32 %4, ptr %14, align 4, !tbaa !5
  store i32 %5, ptr %15, align 4, !tbaa !5
  store i32 %6, ptr %16, align 4, !tbaa !5
  store i32 %7, ptr %17, align 4, !tbaa !5
  store i32 %8, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 1, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %38 = load i32, ptr %13, align 4, !tbaa !5
  %39 = load i32, ptr %14, align 4, !tbaa !5
  %40 = mul nsw i32 %38, %39
  %41 = sext i32 %40 to i64
  store i64 %41, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %42 = load i32, ptr %13, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = udiv i64 %43, 1
  store i64 %44, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %45 = load i64, ptr %22, align 8, !tbaa !11
  %46 = load i32, ptr %14, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = mul i64 %45, %47
  store i64 %48, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 4, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = load i32, ptr %11, align 4, !tbaa !5
  %51 = mul nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  store i64 %52, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %53 = load i64, ptr %25, align 8, !tbaa !11
  %54 = load i64, ptr %21, align 8, !tbaa !11
  %55 = mul i64 %53, %54
  %56 = load i64, ptr %21, align 8, !tbaa !11
  %57 = mul i64 %56, 3
  %58 = load i64, ptr %23, align 8, !tbaa !11
  %59 = mul i64 %57, %58
  %60 = add i64 %55, %59
  %61 = load i64, ptr %25, align 8, !tbaa !11
  %62 = mul i64 %61, 3
  %63 = load i64, ptr %23, align 8, !tbaa !11
  %64 = mul i64 %62, %63
  %65 = add i64 %60, %64
  store i64 %65, ptr %27, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %66 unwind label %150

66:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %67 = load i64, ptr %25, align 8, !tbaa !11
  %68 = load i64, ptr %21, align 8, !tbaa !11
  %69 = mul i64 %67, %68
  %70 = load i64, ptr %21, align 8, !tbaa !11
  %71 = load i64, ptr %23, align 8, !tbaa !11
  %72 = mul i64 %70, %71
  %73 = add i64 %69, %72
  %74 = load i64, ptr %25, align 8, !tbaa !11
  %75 = load i64, ptr %23, align 8, !tbaa !11
  %76 = mul i64 %74, %75
  %77 = add i64 %73, %76
  store i64 %77, ptr %30, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %78 unwind label %154

78:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %79 = load i64, ptr %25, align 8, !tbaa !11
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = mul i64 %79, %81
  %83 = load i32, ptr %16, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = mul i64 %82, %84
  %86 = load i32, ptr %16, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = load i64, ptr %23, align 8, !tbaa !11
  %89 = mul i64 %87, %88
  %90 = add i64 %85, %89
  %91 = load i64, ptr %25, align 8, !tbaa !11
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = mul i64 %91, %93
  %95 = load i64, ptr %23, align 8, !tbaa !11
  %96 = mul i64 %94, %95
  %97 = add i64 %90, %96
  store i64 %97, ptr %31, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %98 unwind label %158

98:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %99 = load i64, ptr %25, align 8, !tbaa !11
  %100 = load i32, ptr %15, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = mul i64 %99, %101
  %103 = udiv i64 %102, 1
  %104 = load i64, ptr %21, align 8, !tbaa !11
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = mul i64 %104, %106
  %108 = udiv i64 %107, 1
  %109 = add i64 %103, %108
  %110 = load i64, ptr %25, align 8, !tbaa !11
  %111 = load i64, ptr %21, align 8, !tbaa !11
  %112 = mul i64 %110, %111
  %113 = add i64 %109, %112
  store i64 %113, ptr %32, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %114 unwind label %162

114:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %115 = load i64, ptr %25, align 8, !tbaa !11
  %116 = load i64, ptr %21, align 8, !tbaa !11
  %117 = mul i64 %115, %116
  %118 = uitofp i64 %117 to double
  %119 = load i64, ptr %21, align 8, !tbaa !11
  %120 = uitofp i64 %119 to double
  %121 = load i32, ptr %17, align 4, !tbaa !5
  %122 = sitofp i32 %121 to double
  %123 = fdiv double %122, 8.000000e+00
  %124 = call double @llvm.ceil.f64(double %123)
  %125 = fmul double %120, %124
  %126 = fmul double %125, 8.000000e+00
  %127 = fdiv double %126, 1.000000e+00
  %128 = fadd double %118, %127
  %129 = load i64, ptr %25, align 8, !tbaa !11
  %130 = uitofp i64 %129 to double
  %131 = load i32, ptr %17, align 4, !tbaa !5
  %132 = sitofp i32 %131 to double
  %133 = fdiv double %132, 8.000000e+00
  %134 = call double @llvm.ceil.f64(double %133)
  %135 = fmul double %130, %134
  %136 = fmul double %135, 8.000000e+00
  %137 = fdiv double %136, 1.000000e+00
  %138 = fadd double %128, %137
  %139 = fptoui double %138 to i64
  store i64 %139, ptr %33, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %140 unwind label %166

140:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  store ptr %26, ptr %34, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %141 = load ptr, ptr %34, align 8, !tbaa !13
  %142 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %141) #5
  %143 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %144 = load ptr, ptr %34, align 8, !tbaa !13
  %145 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %144) #5
  %146 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %36, i32 0, i32 0
  store ptr %145, ptr %146, align 8
  br label %147

147:                                              ; preds = %182, %140
  %148 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #5
  br i1 %148, label %170, label %149

149:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  br label %184

150:                                              ; preds = %9
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %28, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %202

154:                                              ; preds = %66
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %28, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %202

158:                                              ; preds = %78
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %28, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %202

162:                                              ; preds = %98
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %28, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %202

166:                                              ; preds = %114
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %28, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %202

170:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #5
  %172 = load i64, ptr %171, align 8, !tbaa !11
  store i64 %172, ptr %37, align 8, !tbaa !11
  %173 = load i64, ptr %19, align 8, !tbaa !11
  %174 = load i64, ptr %37, align 8, !tbaa !11
  %175 = icmp ugt i64 %173, %174
  br i1 %175, label %176, label %178

176:                                              ; preds = %170
  %177 = load i64, ptr %19, align 8, !tbaa !11
  br label %180

178:                                              ; preds = %170
  %179 = load i64, ptr %37, align 8, !tbaa !11
  br label %180

180:                                              ; preds = %178, %176
  %181 = phi i64 [ %177, %176 ], [ %179, %178 ]
  store i64 %181, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  br label %182

182:                                              ; preds = %180
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #5
  br label %147

184:                                              ; preds = %149
  %185 = load i32, ptr %24, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = load i64, ptr %19, align 8, !tbaa !11
  %188 = mul i64 %187, %186
  store i64 %188, ptr %19, align 8, !tbaa !11
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = icmp eq i32 %189, 1
  br i1 %190, label %194, label %191

191:                                              ; preds = %184
  %192 = load i32, ptr %18, align 4, !tbaa !9
  %193 = icmp eq i32 %192, 2
  br label %194

194:                                              ; preds = %191, %184
  %195 = phi i1 [ true, %184 ], [ %193, %191 ]
  %196 = zext i1 %195 to i64
  %197 = select i1 %195, i32 33554432, i32 0
  %198 = sext i32 %197 to i64
  %199 = load i64, ptr %19, align 8, !tbaa !11
  %200 = add i64 %199, %198
  store i64 %200, ptr %19, align 8, !tbaa !11
  %201 = load i64, ptr %19, align 8, !tbaa !11
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  ret i64 %201

202:                                              ; preds = %166, %162, %158, %154, %150
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %28, align 8
  %205 = load i32, ptr %29, align 4
  %206 = insertvalue { ptr, i32 } poison, ptr %204, 0
  %207 = insertvalue { ptr, i32 } %206, i32 %205, 1
  resume { ptr, i32 } %207
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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


; 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"

%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN17fastertransformer32calDecodingGemmTestBufSizeInByteEiiiiiiiiNS_14CublasDataTypeE(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = mul nsw i32 %4, %3
  %19 = sext i32 %18 to i64
  %20 = sext i32 %3 to i64
  %21 = sext i32 %4 to i64
  %22 = mul nsw i64 %21, %20
  %23 = mul nsw i32 %1, %0
  %24 = sext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %25 = mul nsw i64 %19, %24
  %reass.add55 = add nsw i64 %19, %24
  %reass.mul56 = mul i64 %22, 3
  %reass.mul = mul i64 %reass.mul56, %reass.add55
  %26 = add i64 %reass.mul, %25
  store i64 %26, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %27 unwind label %67

27:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %28 = add nsw i64 %22, %24
  %29 = mul i64 %28, %19
  %30 = mul i64 %22, %24
  %31 = add i64 %29, %30
  store i64 %31, ptr %12, align 8, !tbaa !5
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %32 unwind label %69

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %33 = sext i32 %2 to i64
  %34 = mul nsw i64 %24, %33
  %35 = sext i32 %6 to i64
  %36 = add i64 %22, %34
  %37 = mul i64 %36, %35
  %38 = mul i64 %22, %34
  %39 = add i64 %37, %38
  store i64 %39, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %40 unwind label %71

40:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %41 = sext i32 %5 to i64
  %42 = mul i64 %reass.add55, %41
  %43 = add i64 %42, %25
  store i64 %43, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %44 unwind label %73

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %45 = uitofp i64 %25 to double
  %46 = uitofp i64 %19 to double
  %47 = sitofp i32 %7 to double
  %48 = fmul double %47, 1.250000e-01
  %49 = call double @llvm.ceil.f64(double %48)
  %50 = fmul double %49, %46
  %51 = fmul double %50, 8.000000e+00
  %52 = fadd double %51, %45
  %53 = uitofp i64 %24 to double
  %54 = fmul double %49, %53
  %55 = fmul double %54, 8.000000e+00
  %56 = fadd double %55, %52
  %57 = fptoui double %56 to i64
  store i64 %57, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %58 unwind label %75

58:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %59 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  store ptr %59, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %60 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  store ptr %60, ptr %17, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %61, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %62 = shl i64 %79, 2
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %58
  %.0.lcssa = phi i64 [ 0, %58 ], [ %62, %._crit_edge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  %63 = add i32 %8, -1
  %64 = icmp ult i32 %63, 2
  %65 = select i1 %64, i64 33554432, i64 0
  %66 = add i64 %.0.lcssa, %65
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  ret i64 %66

67:                                               ; preds = %9
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %82

69:                                               ; preds = %27
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %82

71:                                               ; preds = %32
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %82

73:                                               ; preds = %40
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %82

75:                                               ; preds = %44
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %82

.lr.ph:                                           ; preds = %58, %.lr.ph
  %.057 = phi i64 [ %79, %.lr.ph ], [ 0, %58 ]
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = call i64 @llvm.umax.i64(i64 %.057, i64 %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %81, label %.lr.ph, label %._crit_edge.loopexit

82:                                               ; preds = %75, %73, %71, %69, %67
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ], [ %72, %71 ], [ %70, %69 ], [ %68, %67 ]
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #5

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass