; LLVM IR from NVIDIA/FasterTransformer :: src/fastertransformer/utils/gemm_test (encoder_igemm_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"

%struct.cudaDeviceProp = type { [256 x i8], %struct.CUuuid_st, [8 x i8], i32, i64, i64, i32, i32, i64, i32, [3 x i32], [3 x i32], i32, i64, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], [2 x i32], [3 x i32], [2 x i32], [3 x i32], [3 x i32], i32, [2 x i32], [3 x i32], [2 x i32], i32, [2 x i32], [3 x i32], [2 x i32], [3 x i32], i32, [2 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i64 }
%struct.CUuuid_st = type { [16 x i8] }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.5" = type { i8 }

@_ZN17fastertransformer11batch_size_E = external dso_local global i32, align 4
@_ZN17fastertransformer8seq_len_E = external dso_local global i32, align 4
@_ZN17fastertransformer9head_num_E = external dso_local global i32, align 4
@_ZN17fastertransformer14size_per_head_E = external dso_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [164 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1

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

declare i32 @cudaGetDeviceProperties(ptr noundef, i32 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17fastertransformer29generate_encoder_igemm_configEiiiiPvb(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i1 noundef zeroext %5) #3 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca %struct.cudaDeviceProp, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca [1024 x i8], align 16
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.5", align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i32 %0, ptr %7, align 4, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !9
  %27 = zext i1 %5 to i8
  store i8 %27, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 728, ptr %13) #6
  %28 = call i32 @cudaGetDeviceProperties(ptr noundef %13, i32 noundef 0)
  call void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %28, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 1049)
  %29 = getelementptr inbounds %struct.cudaDeviceProp, ptr %13, i32 0, i32 14
  %30 = load i32, ptr %29, align 8, !tbaa !13
  %31 = icmp sge i32 %30, 8
  br i1 %31, label %42, label %32

32:                                               ; preds = %6
  %33 = getelementptr inbounds %struct.cudaDeviceProp, ptr %13, i32 0, i32 14
  %34 = load i32, ptr %33, align 8, !tbaa !13
  %35 = icmp sge i32 %34, 7
  br i1 %35, label %36, label %40

36:                                               ; preds = %32
  %37 = getelementptr inbounds %struct.cudaDeviceProp, ptr %13, i32 0, i32 15
  %38 = load i32, ptr %37, align 4, !tbaa !17
  %39 = icmp sge i32 %38, 5
  br i1 %39, label %42, label %40

40:                                               ; preds = %36, %32
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @exit(i32 noundef -1) #7
  unreachable

42:                                               ; preds = %36, %6
  %43 = getelementptr inbounds %struct.cudaDeviceProp, ptr %13, i32 0, i32 0
  %44 = getelementptr inbounds [256 x i8], ptr %43, i64 0, i64 0
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %44)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %46 = load i8, ptr %12, align 1, !tbaa !11, !range !18, !noundef !19
  %47 = trunc i8 %46 to i1
  br i1 %47, label %52, label %48

48:                                               ; preds = %42
  %49 = call noalias ptr @fopen(ptr noundef @.str.9, ptr noundef @.str.10)
  store ptr %49, ptr %14, align 8, !tbaa !9
  %50 = load ptr, ptr %14, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.11) #6
  br label %113

52:                                               ; preds = %42
  %53 = call noalias ptr @fopen(ptr noundef @.str.9, ptr noundef @.str.12)
  store ptr %53, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %16) #6
  br label %54

54:                                               ; preds = %63, %52
  %55 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %56 = load ptr, ptr %14, align 8, !tbaa !9
  %57 = invoke ptr @fgets(ptr noundef %55, i32 noundef 1024, ptr noundef %56)
          to label %58 unwind label %64

58:                                               ; preds = %54
  %59 = icmp ne ptr %57, null
  br i1 %59, label %60, label %77

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  %61 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef %61, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %62 unwind label %68

62:                                               ; preds = %60
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %63 unwind label %72

63:                                               ; preds = %62
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %54, !llvm.loop !20

64:                                               ; preds = %54
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %17, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %18, align 4
  br label %112

68:                                               ; preds = %60
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %17, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %18, align 4
  br label %76

72:                                               ; preds = %62
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %17, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %18, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %76

76:                                               ; preds = %72, %68
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %112

77:                                               ; preds = %58
  %78 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %79 = icmp uge i64 %78, 120
  br i1 %79, label %80, label %111

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %81 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %82 = sub i64 %81, 114
  %83 = trunc i64 %82 to i32
  store i32 %83, ptr %21, align 4, !tbaa !5
  %84 = load ptr, ptr %14, align 8, !tbaa !9
  %85 = invoke i32 @fclose(ptr noundef %84)
          to label %86 unwind label %96

86:                                               ; preds = %80
  %87 = invoke noalias ptr @fopen(ptr noundef @.str.9, ptr noundef @.str.10)
          to label %88 unwind label %96

88:                                               ; preds = %86
  store ptr %87, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %89 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %89, ptr %22, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %107, %88
  %91 = load i32, ptr %22, align 4, !tbaa !5
  %92 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %93 = trunc i64 %92 to i32
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %100, label %95

95:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %110

96:                                               ; preds = %86, %80
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %17, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %112

100:                                              ; preds = %90
  %101 = load ptr, ptr %14, align 8, !tbaa !9
  %102 = load i32, ptr %22, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %103) #6
  %105 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %104) #6
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.13, ptr noundef %105) #6
  br label %107

107:                                              ; preds = %100
  %108 = load i32, ptr %22, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %22, align 4, !tbaa !5
  br label %90, !llvm.loop !22

110:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %111

111:                                              ; preds = %110, %77
  call void @llvm.lifetime.end.p0(i64 1024, ptr %16) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %113

112:                                              ; preds = %96, %76, %64
  call void @llvm.lifetime.end.p0(i64 1024, ptr %16) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 728, ptr %13) #6
  br label %286

113:                                              ; preds = %111, %48
  %114 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %114, ptr @_ZN17fastertransformer11batch_size_E, align 4, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %115, ptr @_ZN17fastertransformer8seq_len_E, align 4, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %116, ptr @_ZN17fastertransformer9head_num_E, align 4, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %117, ptr @_ZN17fastertransformer14size_per_head_E, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %118 = load i32, ptr %7, align 4, !tbaa !5
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = mul nsw i32 %118, %119
  store i32 %120, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = mul nsw i32 %121, %122
  store i32 %123, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %124 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %124, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  store i32 3, ptr %26, align 4, !tbaa !5
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = load i32, ptr %8, align 4, !tbaa !5
  %129 = mul nsw i32 %127, %128
  store i32 %129, ptr %23, align 4, !tbaa !5
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = mul nsw i32 %130, %131
  store i32 %132, ptr %25, align 4, !tbaa !5
  %133 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %133, ptr %24, align 4, !tbaa !5
  %134 = load i32, ptr %24, align 4, !tbaa !5
  %135 = srem i32 %134, 32
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %141, label %137

137:                                              ; preds = %113
  %138 = load i32, ptr %25, align 4, !tbaa !5
  %139 = srem i32 %138, 32
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %145

141:                                              ; preds = %137, %113
  %142 = load i32, ptr %24, align 4, !tbaa !5
  %143 = load i32, ptr %25, align 4, !tbaa !5
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %142, i32 noundef %143)
  br label %153

145:                                              ; preds = %137
  %146 = load i32, ptr %26, align 4, !tbaa !5
  %147 = load i32, ptr %23, align 4, !tbaa !5
  %148 = load i32, ptr %24, align 4, !tbaa !5
  %149 = load i32, ptr %25, align 4, !tbaa !5
  %150 = load ptr, ptr %14, align 8, !tbaa !9
  %151 = load ptr, ptr %11, align 8, !tbaa !9
  %152 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef %149, ptr noundef %150, ptr noundef %151)
  br label %153

153:                                              ; preds = %145, %141
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %155 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %155, ptr %23, align 4, !tbaa !5
  %156 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %156, ptr %24, align 4, !tbaa !5
  %157 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %157, ptr %25, align 4, !tbaa !5
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = mul nsw i32 %158, %159
  store i32 %160, ptr %26, align 4, !tbaa !5
  %161 = load i32, ptr %24, align 4, !tbaa !5
  %162 = srem i32 %161, 32
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %168, label %164

164:                                              ; preds = %153
  %165 = load i32, ptr %25, align 4, !tbaa !5
  %166 = srem i32 %165, 32
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %172

168:                                              ; preds = %164, %153
  %169 = load i32, ptr %24, align 4, !tbaa !5
  %170 = load i32, ptr %25, align 4, !tbaa !5
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %169, i32 noundef %170)
  br label %180

172:                                              ; preds = %164
  %173 = load i32, ptr %26, align 4, !tbaa !5
  %174 = load i32, ptr %23, align 4, !tbaa !5
  %175 = load i32, ptr %24, align 4, !tbaa !5
  %176 = load i32, ptr %25, align 4, !tbaa !5
  %177 = load ptr, ptr %14, align 8, !tbaa !9
  %178 = load ptr, ptr %11, align 8, !tbaa !9
  %179 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef %173, i32 noundef %174, i32 noundef %175, i32 noundef %176, ptr noundef %177, ptr noundef %178)
  br label %180

180:                                              ; preds = %172, %168
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %182 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %182, ptr %23, align 4, !tbaa !5
  %183 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %183, ptr %24, align 4, !tbaa !5
  %184 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %184, ptr %25, align 4, !tbaa !5
  %185 = load i32, ptr %7, align 4, !tbaa !5
  %186 = load i32, ptr %9, align 4, !tbaa !5
  %187 = mul nsw i32 %185, %186
  store i32 %187, ptr %26, align 4, !tbaa !5
  %188 = load i32, ptr %24, align 4, !tbaa !5
  %189 = srem i32 %188, 32
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %195, label %191

191:                                              ; preds = %180
  %192 = load i32, ptr %25, align 4, !tbaa !5
  %193 = srem i32 %192, 32
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %199

195:                                              ; preds = %191, %180
  %196 = load i32, ptr %24, align 4, !tbaa !5
  %197 = load i32, ptr %25, align 4, !tbaa !5
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %196, i32 noundef %197)
  br label %207

199:                                              ; preds = %191
  %200 = load i32, ptr %26, align 4, !tbaa !5
  %201 = load i32, ptr %23, align 4, !tbaa !5
  %202 = load i32, ptr %24, align 4, !tbaa !5
  %203 = load i32, ptr %25, align 4, !tbaa !5
  %204 = load ptr, ptr %14, align 8, !tbaa !9
  %205 = load ptr, ptr %11, align 8, !tbaa !9
  %206 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef %200, i32 noundef %201, i32 noundef %202, i32 noundef %203, ptr noundef %204, ptr noundef %205)
  br label %207

207:                                              ; preds = %199, %195
  %208 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %209 = load i32, ptr %7, align 4, !tbaa !5
  %210 = load i32, ptr %8, align 4, !tbaa !5
  %211 = mul nsw i32 %209, %210
  store i32 %211, ptr %23, align 4, !tbaa !5
  %212 = load i32, ptr %9, align 4, !tbaa !5
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = mul nsw i32 %212, %213
  store i32 %214, ptr %24, align 4, !tbaa !5
  %215 = load i32, ptr %9, align 4, !tbaa !5
  %216 = load i32, ptr %10, align 4, !tbaa !5
  %217 = mul nsw i32 %215, %216
  store i32 %217, ptr %25, align 4, !tbaa !5
  %218 = load i32, ptr %24, align 4, !tbaa !5
  %219 = srem i32 %218, 32
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %225, label %221

221:                                              ; preds = %207
  %222 = load i32, ptr %25, align 4, !tbaa !5
  %223 = srem i32 %222, 32
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %225, label %229

225:                                              ; preds = %221, %207
  %226 = load i32, ptr %24, align 4, !tbaa !5
  %227 = load i32, ptr %25, align 4, !tbaa !5
  %228 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %226, i32 noundef %227)
  br label %236

229:                                              ; preds = %221
  %230 = load i32, ptr %23, align 4, !tbaa !5
  %231 = load i32, ptr %24, align 4, !tbaa !5
  %232 = load i32, ptr %25, align 4, !tbaa !5
  %233 = load ptr, ptr %14, align 8, !tbaa !9
  %234 = load ptr, ptr %11, align 8, !tbaa !9
  %235 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %230, i32 noundef %231, i32 noundef %232, ptr noundef %233, ptr noundef %234)
  br label %236

236:                                              ; preds = %229, %225
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %238 = load i32, ptr %24, align 4, !tbaa !5
  %239 = mul nsw i32 4, %238
  store i32 %239, ptr %24, align 4, !tbaa !5
  %240 = load i32, ptr %24, align 4, !tbaa !5
  %241 = srem i32 %240, 32
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %247, label %243

243:                                              ; preds = %236
  %244 = load i32, ptr %25, align 4, !tbaa !5
  %245 = srem i32 %244, 32
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %247, label %251

247:                                              ; preds = %243, %236
  %248 = load i32, ptr %24, align 4, !tbaa !5
  %249 = load i32, ptr %25, align 4, !tbaa !5
  %250 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %248, i32 noundef %249)
  br label %258

251:                                              ; preds = %243
  %252 = load i32, ptr %23, align 4, !tbaa !5
  %253 = load i32, ptr %24, align 4, !tbaa !5
  %254 = load i32, ptr %25, align 4, !tbaa !5
  %255 = load ptr, ptr %14, align 8, !tbaa !9
  %256 = load ptr, ptr %11, align 8, !tbaa !9
  %257 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %252, i32 noundef %253, i32 noundef %254, ptr noundef %255, ptr noundef %256)
  br label %258

258:                                              ; preds = %251, %247
  %259 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %260 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %260, ptr %24, align 4, !tbaa !5
  %261 = load i32, ptr %24, align 4, !tbaa !5
  %262 = mul nsw i32 4, %261
  store i32 %262, ptr %25, align 4, !tbaa !5
  %263 = load i32, ptr %24, align 4, !tbaa !5
  %264 = srem i32 %263, 32
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %270, label %266

266:                                              ; preds = %258
  %267 = load i32, ptr %25, align 4, !tbaa !5
  %268 = srem i32 %267, 32
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %270, label %274

270:                                              ; preds = %266, %258
  %271 = load i32, ptr %24, align 4, !tbaa !5
  %272 = load i32, ptr %25, align 4, !tbaa !5
  %273 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %271, i32 noundef %272)
  br label %281

274:                                              ; preds = %266
  %275 = load i32, ptr %23, align 4, !tbaa !5
  %276 = load i32, ptr %24, align 4, !tbaa !5
  %277 = load i32, ptr %25, align 4, !tbaa !5
  %278 = load ptr, ptr %14, align 8, !tbaa !9
  %279 = load ptr, ptr %11, align 8, !tbaa !9
  %280 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %275, i32 noundef %276, i32 noundef %277, ptr noundef %278, ptr noundef %279)
  br label %281

281:                                              ; preds = %274, %270
  %282 = load ptr, ptr %14, align 8, !tbaa !9
  %283 = call i32 @fclose(ptr noundef %282)
  %284 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %285 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 728, ptr %13) #6
  ret i32 0

286:                                              ; preds = %112
  %287 = load ptr, ptr %17, align 8
  %288 = load i32, ptr %18, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

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

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 #3 align 2

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

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

declare i32 @fclose(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 360}
!14 = !{!"_ZTS14cudaDeviceProp", !7, i64 0, !15, i64 256, !7, i64 272, !6, i64 280, !16, i64 288, !16, i64 296, !6, i64 304, !6, i64 308, !16, i64 312, !6, i64 320, !7, i64 324, !7, i64 336, !6, i64 348, !16, i64 352, !6, i64 360, !6, i64 364, !16, i64 368, !16, i64 376, !6, i64 384, !6, i64 388, !6, i64 392, !6, i64 396, !6, i64 400, !6, i64 404, !6, i64 408, !6, i64 412, !6, i64 416, !7, i64 420, !7, i64 428, !7, i64 436, !7, i64 448, !7, i64 456, !7, i64 468, !6, i64 480, !7, i64 484, !7, i64 492, !7, i64 504, !6, i64 512, !7, i64 516, !7, i64 524, !7, i64 536, !7, i64 544, !6, i64 556, !7, i64 560, !16, i64 568, !6, i64 576, !6, i64 580, !6, i64 584, !6, i64 588, !6, i64 592, !6, i64 596, !6, i64 600, !6, i64 604, !6, i64 608, !6, i64 612, !6, i64 616, !6, i64 620, !6, i64 624, !6, i64 628, !6, i64 632, !6, i64 636, !16, i64 640, !6, i64 648, !6, i64 652, !6, i64 656, !6, i64 660, !6, i64 664, !6, i64 668, !6, i64 672, !6, i64 676, !6, i64 680, !6, i64 684, !6, i64 688, !6, i64 692, !16, i64 696, !6, i64 704, !6, i64 708, !6, i64 712, !6, i64 716, !16, i64 720}
!15 = !{!"_ZTS9CUuuid_st", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!14, !6, i64 364}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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.cudaDeviceProp = type { [256 x i8], %struct.CUuuid_st, [8 x i8], i32, i64, i64, i32, i32, i64, i32, [3 x i32], [3 x i32], i32, i64, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], [2 x i32], [3 x i32], [2 x i32], [3 x i32], [3 x i32], i32, [2 x i32], [3 x i32], [2 x i32], i32, [2 x i32], [3 x i32], [2 x i32], [3 x i32], i32, [2 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i64 }
%struct.CUuuid_st = type { [16 x i8] }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.5" = type { i8 }

@_ZN17fastertransformer11batch_size_E = external dso_local local_unnamed_addr global i32, align 4
@_ZN17fastertransformer8seq_len_E = external dso_local local_unnamed_addr global i32, align 4
@_ZN17fastertransformer9head_num_E = external dso_local local_unnamed_addr global i32, align 4
@_ZN17fastertransformer14size_per_head_E = external dso_local local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [164 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1

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

declare i32 @cudaGetDeviceProperties(ptr noundef, i32 noundef) local_unnamed_addr #1

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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17fastertransformer29generate_encoder_igemm_configEiiiiPvb(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i1 noundef zeroext %5) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.cudaDeviceProp, align 8
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca [1024 x i8], align 16
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.5", align 1
  call void @llvm.lifetime.start.p0(i64 728, ptr nonnull %7) #6
  %12 = call i32 @cudaGetDeviceProperties(ptr noundef nonnull %7, i32 noundef 0)
  call void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %12, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 1049)
  %13 = getelementptr inbounds i8, ptr %7, i64 360
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = icmp sgt i32 %14, 7
  br i1 %15, label %23, label %16

16:                                               ; preds = %6
  %17 = icmp eq i32 %14, 7
  %18 = getelementptr inbounds i8, ptr %7, i64 364
  %19 = load i32, ptr %18, align 4
  %20 = icmp sgt i32 %19, 4
  %or.cond = select i1 %17, i1 %20, i1 false
  br i1 %or.cond, label %23, label %21

21:                                               ; preds = %16
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  call void @exit(i32 noundef -1) #7
  unreachable

23:                                               ; preds = %16, %6
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %7)
  br i1 %5, label %28, label %25

25:                                               ; preds = %23
  %26 = call noalias ptr @fopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10)
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.11) #6
  br label %57

28:                                               ; preds = %23
  %29 = call noalias ptr @fopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.12)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %9) #6
  %30 = call ptr @fgets(ptr noundef nonnull %9, i32 noundef 1024, ptr noundef %29)
  %.not118 = icmp eq ptr %30, null
  br i1 %.not118, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %28, %32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull %9, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %31 unwind label %34

31:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %32 unwind label %36

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  %33 = call ptr @fgets(ptr noundef nonnull %9, i32 noundef 1024, ptr noundef %29)
  %.not = icmp eq ptr %33, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

34:                                               ; preds = %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %31
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %38

38:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 728, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %32, %28
  %39 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %40 = icmp ugt i64 %39, 119
  br i1 %40, label %41, label %.loopexit

41:                                               ; preds = %._crit_edge
  %42 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %43 = trunc i64 %42 to i32
  %44 = add i32 %43, -114
  %45 = call i32 @fclose(ptr noundef %29)
  %46 = call noalias ptr @fopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10)
  %47 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %48 = trunc i64 %47 to i32
  %49 = icmp slt i32 %44, %48
  br i1 %49, label %.lr.ph121.preheader, label %.loopexit

.lr.ph121.preheader:                              ; preds = %41
  %50 = sext i32 %44 to i64
  br label %.lr.ph121

.lr.ph121:                                        ; preds = %.lr.ph121.preheader, %.lr.ph121
  %indvars.iv = phi i64 [ %50, %.lr.ph121.preheader ], [ %indvars.iv.next, %.lr.ph121 ]
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #6
  %52 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %51) #6
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.13, ptr noundef %52) #6
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %54 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %sext = shl i64 %54, 32
  %55 = ashr exact i64 %sext, 32
  %56 = icmp slt i64 %indvars.iv.next, %55
  br i1 %56, label %.lr.ph121, label %.loopexit, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph121, %41, %._crit_edge
  %.0103 = phi ptr [ %29, %._crit_edge ], [ %46, %41 ], [ %46, %.lr.ph121 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %57

57:                                               ; preds = %.loopexit, %25
  %.1 = phi ptr [ %.0103, %.loopexit ], [ %26, %25 ]
  store i32 %0, ptr @_ZN17fastertransformer11batch_size_E, align 4, !tbaa !15
  store i32 %1, ptr @_ZN17fastertransformer8seq_len_E, align 4, !tbaa !15
  store i32 %2, ptr @_ZN17fastertransformer9head_num_E, align 4, !tbaa !15
  store i32 %3, ptr @_ZN17fastertransformer14size_per_head_E, align 4, !tbaa !15
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %60 = mul nsw i32 %1, %0
  %61 = mul nsw i32 %3, %2
  %62 = and i32 %61, 31
  %.not107.not = icmp eq i32 %62, 0
  br i1 %.not107.not, label %65, label %63

63:                                               ; preds = %57
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %61, i32 noundef %61)
  br label %67

65:                                               ; preds = %57
  %66 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef 3, i32 noundef %60, i32 noundef %61, i32 noundef %61, ptr noundef %.1, ptr noundef %4)
  br label %67

67:                                               ; preds = %65, %63
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %69 = or i32 %3, %1
  %70 = and i32 %69, 31
  %or.cond113 = icmp eq i32 %70, 0
  br i1 %or.cond113, label %75, label %71

71:                                               ; preds = %67
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %1, i32 noundef %3)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %3, i32 noundef %1)
  br label %80

75:                                               ; preds = %67
  %76 = mul nsw i32 %2, %0
  %77 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef %76, i32 noundef %1, i32 noundef %1, i32 noundef %3, ptr noundef %.1, ptr noundef %4)
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %79 = call noundef i32 @_ZN17fastertransformer18batch_igemm_configEiiiiP8_IO_FILEPv(i32 noundef %76, i32 noundef %1, i32 noundef %3, i32 noundef %1, ptr noundef %.1, ptr noundef %4)
  br label %80

80:                                               ; preds = %75, %71
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %82 = shl nsw i32 %61, 2
  br i1 %.not107.not, label %89, label %83

83:                                               ; preds = %80
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %61, i32 noundef %61)
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %82, i32 noundef %61)
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %61, i32 noundef %82)
  br label %95

89:                                               ; preds = %80
  %90 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %60, i32 noundef %61, i32 noundef %61, ptr noundef %.1, ptr noundef %4)
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %92 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %60, i32 noundef %82, i32 noundef %61, ptr noundef %.1, ptr noundef %4)
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %94 = call noundef i32 @_ZN17fastertransformer12igemm_configEiiiP8_IO_FILEPv(i32 noundef %60, i32 noundef %61, i32 noundef %82, ptr noundef %.1, ptr noundef %4)
  br label %95

95:                                               ; preds = %89, %83
  %96 = call i32 @fclose(ptr noundef %.1)
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @llvm.lifetime.end.p0(i64 728, ptr nonnull %7) #6
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 360}
!6 = !{!"_ZTS14cudaDeviceProp", !7, i64 0, !9, i64 256, !7, i64 272, !10, i64 280, !11, i64 288, !11, i64 296, !10, i64 304, !10, i64 308, !11, i64 312, !10, i64 320, !7, i64 324, !7, i64 336, !10, i64 348, !11, i64 352, !10, i64 360, !10, i64 364, !11, i64 368, !11, i64 376, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !7, i64 420, !7, i64 428, !7, i64 436, !7, i64 448, !7, i64 456, !7, i64 468, !10, i64 480, !7, i64 484, !7, i64 492, !7, i64 504, !10, i64 512, !7, i64 516, !7, i64 524, !7, i64 536, !7, i64 544, !10, i64 556, !7, i64 560, !11, i64 568, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !10, i64 592, !10, i64 596, !10, i64 600, !10, i64 604, !10, i64 608, !10, i64 612, !10, i64 616, !10, i64 620, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !11, i64 640, !10, i64 648, !10, i64 652, !10, i64 656, !10, i64 660, !10, i64 664, !10, i64 668, !10, i64 672, !10, i64 676, !10, i64 680, !10, i64 684, !10, i64 688, !10, i64 692, !11, i64 696, !10, i64 704, !10, i64 708, !10, i64 712, !10, i64 716, !11, i64 720}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"_ZTS9CUuuid_st", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass