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

; 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.fastertransformer::cublasLtMatmulAlgo_info" = type { i32, i32, i32, i32, i32, i32, i32, i32, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%struct.__half = type { i16 }
%"class.fastertransformer::Gemm" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [276 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17fastertransformer5checkI14cublasStatus_tEEvT_PKcS4_i(i32 noundef, ptr noundef, ptr noundef, i32 noundef) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17fastertransformer6Logger8getLevelEv(ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2), float noundef) unnamed_addr #0 align 2

declare void @_ZN17fastertransformer13cublasAlgoMap7getAlgoEiiiiNS_14CublasDataTypeE(ptr dead_on_unwind writable sret(%"struct.fastertransformer::cublasLtMatmulAlgo_info") align 4, ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer20getCublasComputeTypeENS_13datatype_enumE(i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17fastertransformer4Gemm18stridedBatchedGemmENS_6GemmOpES1_mmmPKvNS_13datatype_enumEmlS3_S4_mlPvS4_mlmS4_ff(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %1, i32 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6, i32 noundef %7, i64 noundef %8, i64 noundef %9, ptr noundef %10, i32 noundef %11, i64 noundef %12, i64 noundef %13, ptr noundef %14, i32 noundef %15, i64 noundef %16, i64 noundef %17, i64 noundef %18, i32 noundef %19, float noundef %20, float noundef %21) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca ptr, align 8
  %38 = alloca i32, align 4
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i32, align 4
  %43 = alloca float, align 4
  %44 = alloca float, align 4
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca %"class.std::allocator", align 1
  %47 = alloca ptr, align 8
  %48 = alloca i32, align 4
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i64, align 8
  %57 = alloca i64, align 8
  %58 = alloca i64, align 8
  %59 = alloca i64, align 8
  %60 = alloca i64, align 8
  %61 = alloca i64, align 8
  %62 = alloca %struct.__half, align 2
  %63 = alloca %struct.__half, align 2
  %64 = alloca i8, align 1
  %65 = alloca ptr, align 8
  %66 = alloca ptr, align 8
  %67 = alloca %"struct.fastertransformer::cublasLtMatmulAlgo_info", align 4
  store ptr %0, ptr %23, align 8, !tbaa !5
  store i32 %1, ptr %24, align 4, !tbaa !9
  store i32 %2, ptr %25, align 4, !tbaa !9
  store i64 %3, ptr %26, align 8, !tbaa !11
  store i64 %4, ptr %27, align 8, !tbaa !11
  store i64 %5, ptr %28, align 8, !tbaa !11
  store ptr %6, ptr %29, align 8, !tbaa !5
  store i32 %7, ptr %30, align 4, !tbaa !13
  store i64 %8, ptr %31, align 8, !tbaa !11
  store i64 %9, ptr %32, align 8, !tbaa !11
  store ptr %10, ptr %33, align 8, !tbaa !5
  store i32 %11, ptr %34, align 4, !tbaa !13
  store i64 %12, ptr %35, align 8, !tbaa !11
  store i64 %13, ptr %36, align 8, !tbaa !11
  store ptr %14, ptr %37, align 8, !tbaa !5
  store i32 %15, ptr %38, align 4, !tbaa !13
  store i64 %16, ptr %39, align 8, !tbaa !11
  store i64 %17, ptr %40, align 8, !tbaa !11
  store i64 %18, ptr %41, align 8, !tbaa !11
  store i32 %19, ptr %42, align 4, !tbaa !13
  store float %20, ptr %43, align 4, !tbaa !15
  store float %21, ptr %44, align 4, !tbaa !15
  %68 = load ptr, ptr %23, align 8
  br label %69

69:                                               ; preds = %22
  %70 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZN17fastertransformer6Logger9getLoggerEv()
  %71 = call noundef i32 @_ZNK17fastertransformer6Logger8getLevelEv(ptr noundef nonnull align 8 dereferenceable(88) %70)
  %72 = icmp sle i32 %71, 0
  br i1 %72, label %73, label %86

73:                                               ; preds = %69
  %74 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZN17fastertransformer6Logger9getLoggerEv()
  call void @llvm.lifetime.start.p0(i64 1, ptr %46) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %46)
          to label %75 unwind label %77

75:                                               ; preds = %73
  invoke void @_ZN17fastertransformer6Logger3logIJmmmmmmmEEEvNS0_5LevelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(88) %74, i32 noundef 0, ptr noundef %45, ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %76 unwind label %81

76:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #4
  br label %86

77:                                               ; preds = %73
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %47, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %48, align 4
  br label %85

81:                                               ; preds = %75
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %47, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %48, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #4
  br label %85

85:                                               ; preds = %81, %77
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #4
  br label %176

86:                                               ; preds = %76, %69
  br label %87

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #4
  %88 = load ptr, ptr %33, align 8, !tbaa !5
  store ptr %88, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #4
  %89 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %89, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #4
  %90 = load i32, ptr %25, align 4, !tbaa !9
  %91 = call noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef %90)
  store i32 %91, ptr %51, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #4
  %92 = load i32, ptr %24, align 4, !tbaa !9
  %93 = call noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef %92)
  store i32 %93, ptr %52, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #4
  %94 = load i32, ptr %34, align 4, !tbaa !13
  %95 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %94)
  store i32 %95, ptr %53, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #4
  %96 = load i32, ptr %30, align 4, !tbaa !13
  %97 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %96)
  store i32 %97, ptr %54, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #4
  %98 = load i32, ptr %38, align 4, !tbaa !13
  %99 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %98)
  store i32 %99, ptr %55, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #4
  %100 = load i64, ptr %27, align 8, !tbaa !11
  store i64 %100, ptr %56, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #4
  %101 = load i64, ptr %26, align 8, !tbaa !11
  store i64 %101, ptr %57, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #4
  %102 = load i64, ptr %35, align 8, !tbaa !11
  store i64 %102, ptr %58, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #4
  %103 = load i64, ptr %31, align 8, !tbaa !11
  store i64 %103, ptr %59, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #4
  %104 = load i64, ptr %36, align 8, !tbaa !11
  store i64 %104, ptr %60, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #4
  %105 = load i64, ptr %32, align 8, !tbaa !11
  store i64 %105, ptr %61, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %62) #4
  %106 = load float, ptr %43, align 4, !tbaa !15
  call void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2) %62, float noundef %106)
  call void @llvm.lifetime.start.p0(i64 2, ptr %63) #4
  %107 = load float, ptr %44, align 4, !tbaa !15
  call void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2) %63, float noundef %107)
  %108 = getelementptr inbounds %"class.fastertransformer::Gemm", ptr %68, i32 0, i32 3
  %109 = load ptr, ptr %108, align 8, !tbaa !21
  call void @_ZNSt5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %109)
  call void @llvm.lifetime.start.p0(i64 1, ptr %64) #4
  %110 = getelementptr inbounds %"class.fastertransformer::Gemm", ptr %68, i32 0, i32 11
  %111 = load i32, ptr %110, align 4, !tbaa !23
  %112 = icmp eq i32 %111, 10
  %113 = zext i1 %112 to i8
  store i8 %113, ptr %64, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #4
  %114 = load i8, ptr %64, align 1, !tbaa !24, !range !26, !noundef !27
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %117

116:                                              ; preds = %87
  br label %118

117:                                              ; preds = %87
  br label %118

118:                                              ; preds = %117, %116
  %119 = phi ptr [ %62, %116 ], [ %43, %117 ]
  store ptr %119, ptr %65, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #4
  %120 = load i8, ptr %64, align 1, !tbaa !24, !range !26, !noundef !27
  %121 = trunc i8 %120 to i1
  br i1 %121, label %122, label %123

122:                                              ; preds = %118
  br label %124

123:                                              ; preds = %118
  br label %124

124:                                              ; preds = %123, %122
  %125 = phi ptr [ %63, %122 ], [ %44, %123 ]
  store ptr %125, ptr %66, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %67) #4
  %126 = getelementptr inbounds %"class.fastertransformer::Gemm", ptr %68, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !28
  %128 = load i64, ptr %41, align 8, !tbaa !11
  %129 = trunc i64 %128 to i32
  %130 = load i64, ptr %26, align 8, !tbaa !11
  %131 = trunc i64 %130 to i32
  %132 = load i64, ptr %27, align 8, !tbaa !11
  %133 = trunc i64 %132 to i32
  %134 = load i64, ptr %28, align 8, !tbaa !11
  %135 = trunc i64 %134 to i32
  %136 = load i32, ptr %53, align 4, !tbaa !19
  %137 = icmp eq i32 %136, 2
  %138 = zext i1 %137 to i64
  %139 = select i1 %137, i32 1, i32 0
  call void @_ZN17fastertransformer13cublasAlgoMap7getAlgoEiiiiNS_14CublasDataTypeE(ptr dead_on_unwind writable sret(%"struct.fastertransformer::cublasLtMatmulAlgo_info") align 4 %67, ptr noundef nonnull align 8 dereferenceable(168) %127, i32 noundef %129, i32 noundef %131, i32 noundef %133, i32 noundef %135, i32 noundef %139)
  %140 = getelementptr inbounds %"class.fastertransformer::Gemm", ptr %68, i32 0, i32 5
  %141 = load ptr, ptr %140, align 8, !tbaa !29
  %142 = load i32, ptr %51, align 4, !tbaa !17
  %143 = load i32, ptr %52, align 4, !tbaa !17
  %144 = load i64, ptr %56, align 8, !tbaa !11
  %145 = trunc i64 %144 to i32
  %146 = load i64, ptr %57, align 8, !tbaa !11
  %147 = trunc i64 %146 to i32
  %148 = load i64, ptr %28, align 8, !tbaa !11
  %149 = trunc i64 %148 to i32
  %150 = load ptr, ptr %65, align 8, !tbaa !5
  %151 = load ptr, ptr %49, align 8, !tbaa !5
  %152 = load i32, ptr %53, align 4, !tbaa !19
  %153 = load i64, ptr %58, align 8, !tbaa !11
  %154 = trunc i64 %153 to i32
  %155 = load i64, ptr %60, align 8, !tbaa !11
  %156 = load ptr, ptr %50, align 8, !tbaa !5
  %157 = load i32, ptr %54, align 4, !tbaa !19
  %158 = load i64, ptr %59, align 8, !tbaa !11
  %159 = trunc i64 %158 to i32
  %160 = load i64, ptr %61, align 8, !tbaa !11
  %161 = load ptr, ptr %66, align 8, !tbaa !5
  %162 = load ptr, ptr %37, align 8, !tbaa !5
  %163 = load i32, ptr %55, align 4, !tbaa !19
  %164 = load i64, ptr %39, align 8, !tbaa !11
  %165 = trunc i64 %164 to i32
  %166 = load i64, ptr %40, align 8, !tbaa !11
  %167 = load i64, ptr %41, align 8, !tbaa !11
  %168 = trunc i64 %167 to i32
  %169 = load i32, ptr %42, align 4, !tbaa !13
  %170 = call noundef i32 @_ZN17fastertransformer20getCublasComputeTypeENS_13datatype_enumE(i32 noundef %169)
  %171 = getelementptr inbounds %"struct.fastertransformer::cublasLtMatmulAlgo_info", ptr %67, i32 0, i32 0
  %172 = load i32, ptr %171, align 4, !tbaa !30
  %173 = call i32 @cublasGemmStridedBatchedEx(ptr noundef %141, i32 noundef %142, i32 noundef %143, i32 noundef %145, i32 noundef %147, i32 noundef %149, ptr noundef %150, ptr noundef %151, i32 noundef %152, i32 noundef %154, i64 noundef %155, ptr noundef %156, i32 noundef %157, i32 noundef %159, i64 noundef %160, ptr noundef %161, ptr noundef %162, i32 noundef %163, i32 noundef %165, i64 noundef %166, i32 noundef %168, i32 noundef %170, i32 noundef %172)
  call void @_ZN17fastertransformer5checkI14cublasStatus_tEEvT_PKcS4_i(i32 noundef %173, ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 689)
  %174 = getelementptr inbounds %"class.fastertransformer::Gemm", ptr %68, i32 0, i32 3
  %175 = load ptr, ptr %174, align 8, !tbaa !21
  call void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %175)
  call void @llvm.lifetime.end.p0(i64 36, ptr %67) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %64) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %63) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %62) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #4
  ret void

176:                                              ; preds = %85
  %177 = load ptr, ptr %47, align 8
  %178 = load i32, ptr %48, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180
}

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

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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN17fastertransformer6GemmOpE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN17fastertransformer13datatype_enumE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTS17cublasOperation_t", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTS14cudaDataType_t", !7, i64 0}
!21 = !{!22, !6, i64 24}
!22 = !{!"_ZTSN17fastertransformer4GemmE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76}
!23 = !{!22, !14, i64 76}
!24 = !{!25, !25, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!22, !6, i64 32}
!29 = !{!22, !6, i64 40}
!30 = !{!31, !32, i64 0}
!31 = !{!"_ZTSN17fastertransformer23cublasLtMatmulAlgo_infoE", !32, i64 0, !32, i64 4, !32, i64 8, !32, i64 12, !32, i64 16, !32, i64 20, !32, i64 24, !32, i64 28, !16, i64 32}
!32 = !{!"int", !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"

%"struct.fastertransformer::cublasLtMatmulAlgo_info" = type { i32, i32, i32, i32, i32, i32, i32, i32, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%struct.__half = type { i16 }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [276 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17fastertransformer5checkI14cublasStatus_tEEvT_PKcS4_i(i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17fastertransformer6Logger8getLevelEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2), float noundef) unnamed_addr #0 align 2

declare void @_ZN17fastertransformer13cublasAlgoMap7getAlgoEiiiiNS_14CublasDataTypeE(ptr dead_on_unwind writable sret(%"struct.fastertransformer::cublasLtMatmulAlgo_info") align 4, ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer20getCublasComputeTypeENS_13datatype_enumE(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17fastertransformer6Logger3logIJmmmmmmmEEEvNS0_5LevelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17fastertransformer4Gemm18stridedBatchedGemmENS_6GemmOpES1_mmmPKvNS_13datatype_enumEmlS3_S4_mlPvS4_mlmS4_ff(ptr nocapture noundef nonnull readonly align 8 dereferenceable(80) %0, i32 noundef %1, i32 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6, i32 noundef %7, i64 noundef %8, i64 noundef %9, ptr noundef %10, i32 noundef %11, i64 noundef %12, i64 noundef %13, ptr noundef %14, i32 noundef %15, i64 noundef %16, i64 noundef %17, i64 noundef %18, i32 noundef %19, float noundef %20, float noundef %21) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %struct.__half, align 2
  %35 = alloca %struct.__half, align 2
  %36 = alloca %"struct.fastertransformer::cublasLtMatmulAlgo_info", align 4
  store i64 %3, ptr %23, align 8, !tbaa !5
  store i64 %4, ptr %24, align 8, !tbaa !5
  store i64 %5, ptr %25, align 8, !tbaa !5
  store i64 %8, ptr %26, align 8, !tbaa !5
  store i64 %12, ptr %27, align 8, !tbaa !5
  store i64 %16, ptr %28, align 8, !tbaa !5
  store i64 %18, ptr %29, align 8, !tbaa !5
  store float %20, ptr %30, align 4, !tbaa !9
  store float %21, ptr %31, align 4, !tbaa !9
  %37 = tail call noundef nonnull align 8 dereferenceable(88) ptr @_ZN17fastertransformer6Logger9getLoggerEv()
  %38 = tail call noundef i32 @_ZNK17fastertransformer6Logger8getLevelEv(ptr noundef nonnull align 8 dereferenceable(88) %37)
  %39 = icmp slt i32 %38, 1
  br i1 %39, label %40, label %49

40:                                               ; preds = %22
  %41 = tail call noundef nonnull align 8 dereferenceable(88) ptr @_ZN17fastertransformer6Logger9getLoggerEv()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %42 unwind label %44

42:                                               ; preds = %40
  invoke void @_ZN17fastertransformer6Logger3logIJmmmmmmmEEEvNS0_5LevelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(88) %41, i32 noundef 0, ptr noundef nonnull %32, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %43 unwind label %46

43:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #4
  br label %49

44:                                               ; preds = %40
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %42
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #4
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #4
  resume { ptr, i32 } %.pn

49:                                               ; preds = %22, %43
  %50 = call noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef %2)
  %51 = call noundef i32 @_ZN17fastertransformer18getCublasOperationENS_6GemmOpE(i32 noundef %1)
  %52 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %11)
  %53 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %7)
  %54 = call noundef i32 @_ZN17fastertransformer17getCublasDataTypeENS_13datatype_enumE(i32 noundef %15)
  %55 = load i64, ptr %24, align 8, !tbaa !5
  %56 = load i64, ptr %23, align 8, !tbaa !5
  %57 = load i64, ptr %27, align 8, !tbaa !5
  %58 = load i64, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %34) #4
  call void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2) %34, float noundef %20)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %35) #4
  call void @_ZN6__halfC2Ef(ptr noundef nonnull align 2 dereferenceable(2) %35, float noundef %21)
  %59 = getelementptr inbounds i8, ptr %0, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  call void @_ZNSt5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %60)
  %61 = getelementptr inbounds i8, ptr %0, i64 76
  %62 = load i32, ptr %61, align 4, !tbaa !15
  %63 = icmp eq i32 %62, 10
  %. = select i1 %63, ptr %34, ptr %30
  %64 = select i1 %63, ptr %35, ptr %31
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %36) #4
  %65 = getelementptr inbounds i8, ptr %0, i64 32
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = load i64, ptr %29, align 8, !tbaa !5
  %68 = trunc i64 %67 to i32
  %69 = load i64, ptr %23, align 8, !tbaa !5
  %70 = trunc i64 %69 to i32
  %71 = load i64, ptr %24, align 8, !tbaa !5
  %72 = trunc i64 %71 to i32
  %73 = load i64, ptr %25, align 8, !tbaa !5
  %74 = trunc i64 %73 to i32
  %75 = icmp eq i32 %52, 2
  %76 = zext i1 %75 to i32
  call void @_ZN17fastertransformer13cublasAlgoMap7getAlgoEiiiiNS_14CublasDataTypeE(ptr dead_on_unwind nonnull writable sret(%"struct.fastertransformer::cublasLtMatmulAlgo_info") align 4 %36, ptr noundef nonnull align 8 dereferenceable(168) %66, i32 noundef %68, i32 noundef %70, i32 noundef %72, i32 noundef %74, i32 noundef %76)
  %77 = getelementptr inbounds i8, ptr %0, i64 40
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = trunc i64 %55 to i32
  %80 = trunc i64 %56 to i32
  %81 = load i64, ptr %25, align 8, !tbaa !5
  %82 = trunc i64 %81 to i32
  %83 = trunc i64 %57 to i32
  %84 = trunc i64 %58 to i32
  %85 = load i64, ptr %28, align 8, !tbaa !5
  %86 = trunc i64 %85 to i32
  %87 = load i64, ptr %29, align 8, !tbaa !5
  %88 = trunc i64 %87 to i32
  %89 = call noundef i32 @_ZN17fastertransformer20getCublasComputeTypeENS_13datatype_enumE(i32 noundef %19)
  %90 = load i32, ptr %36, align 4, !tbaa !18
  %91 = call i32 @cublasGemmStridedBatchedEx(ptr noundef %78, i32 noundef %50, i32 noundef %51, i32 noundef %79, i32 noundef %80, i32 noundef %82, ptr noundef nonnull %., ptr noundef %10, i32 noundef %52, i32 noundef %83, i64 noundef %13, ptr noundef %6, i32 noundef %53, i32 noundef %84, i64 noundef %9, ptr noundef nonnull %64, ptr noundef %14, i32 noundef %54, i32 noundef %86, i64 noundef %17, i32 noundef %88, i32 noundef %89, i32 noundef %90)
  call void @_ZN17fastertransformer5checkI14cublasStatus_tEEvT_PKcS4_i(i32 noundef %91, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 689)
  %92 = load ptr, ptr %59, align 8, !tbaa !11
  call void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %92)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %36) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %35) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %34) #4
  ret void
}

declare i32 @cublasGemmStridedBatchedEx(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 24}
!12 = !{!"_ZTSN17fastertransformer4GemmE", !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSN17fastertransformer13datatype_enumE", !7, i64 0}
!15 = !{!12, !14, i64 76}
!16 = !{!12, !13, i64 32}
!17 = !{!12, !13, i64 40}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSN17fastertransformer23cublasLtMatmulAlgo_infoE", !20, i64 0, !20, i64 4, !20, i64 8, !20, i64 12, !20, i64 16, !20, i64 20, !20, i64 24, !20, i64 28, !10, i64 32}
!20 = !{!"int", !7, i64 0}


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