; LLVM IR from NVIDIA/FasterTransformer :: src/fastertransformer/triton_backend (transformer_triton_backend)

; 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.std::pair" = type { %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl" }
%"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_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.0" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl" }
%"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.fastertransformer::mpi::MpiComm" = type { i8 }
%"class.std::allocator" = type { i8 }
%"struct.fastertransformer::NcclUid" = type { i8 }

@.str = external hidden unnamed_addr constant [126 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24AbstractTransformerModel16createNcclParamsEiib(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca %"class.std::vector.3", align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca %"struct.fastertransformer::mpi::MpiComm", align 1
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::vector", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %"struct.fastertransformer::NcclUid", align 1
  %34 = alloca %"struct.fastertransformer::NcclUid", align 1
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca %"struct.fastertransformer::NcclUid", align 1
  %40 = alloca %"struct.fastertransformer::NcclUid", align 1
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %41 = zext i1 %4 to i8
  store i8 %41, ptr %10, align 1, !tbaa !11
  %42 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %43 = call noundef i32 @_ZN17fastertransformer14getDeviceCountEv()
  store i32 %43, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %44 = load ptr, ptr %42, align 8, !tbaa !13
  %45 = getelementptr inbounds ptr, ptr %44, i64 4
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef i32 %46(ptr noundef nonnull align 8 dereferenceable(8) %42)
  store i32 %47, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %48 = load ptr, ptr %42, align 8, !tbaa !13
  %49 = getelementptr inbounds ptr, ptr %48, i64 5
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef i32 %50(ptr noundef nonnull align 8 dereferenceable(8) %42)
  store i32 %51, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %52 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %53 = trunc i8 %52 to i1
  br i1 %53, label %54, label %56

54:                                               ; preds = %5
  %55 = load i32, ptr %11, align 4, !tbaa !9
  br label %60

56:                                               ; preds = %5
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = mul nsw i32 %57, %58
  br label %60

60:                                               ; preds = %56, %54
  %61 = phi i32 [ %55, %54 ], [ %59, %56 ]
  store i32 %61, ptr %14, align 4, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %64, label %67

64:                                               ; preds = %60
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = icmp sgt i32 %65, 0
  br label %67

67:                                               ; preds = %64, %60
  %68 = phi i1 [ false, %60 ], [ %66, %64 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %69 unwind label %98

69:                                               ; preds = %67
  invoke void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %68, ptr noundef @.str, i32 noundef 26, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %70 unwind label %102

70:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = load i32, ptr %14, align 4, !tbaa !9
  %73 = add nsw i32 %71, %72
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = icmp sle i32 %73, %74
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %76 unwind label %107

76:                                               ; preds = %70
  invoke void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %75, ptr noundef @.str, i32 noundef 27, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %77 unwind label %111

77:                                               ; preds = %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = icmp sgt i32 %78, 1
  br i1 %79, label %83, label %80

80:                                               ; preds = %77
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = icmp sgt i32 %81, 1
  br i1 %82, label %83, label %151

83:                                               ; preds = %80, %77
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = add nsw i32 %84, %85
  %87 = sext i32 %86 to i64
  invoke void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %87)
          to label %88 unwind label %116

88:                                               ; preds = %83
  %89 = load i32, ptr %8, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %133

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %125, %91
  %93 = load i32, ptr %22, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %96 = icmp ult i64 %94, %95
  br i1 %96, label %120, label %97

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %132

98:                                               ; preds = %67
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %17, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %18, align 4
  br label %106

102:                                              ; preds = %69
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %17, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %18, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %283

107:                                              ; preds = %70
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %17, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %18, align 4
  br label %115

111:                                              ; preds = %76
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %17, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %18, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %115

115:                                              ; preds = %111, %107
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %283

116:                                              ; preds = %83
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %17, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %18, align 4
  br label %282

120:                                              ; preds = %92
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %122) #5
  invoke void @_ZN17fastertransformer17ftNcclGetUniqueIdERNS_7NcclUidE(ptr noundef nonnull align 1 dereferenceable(1) %123)
          to label %124 unwind label %128

124:                                              ; preds = %120
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = add i32 %126, 1
  store i32 %127, ptr %22, align 4, !tbaa !9
  br label %92, !llvm.loop !17

128:                                              ; preds = %120
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %17, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %282

132:                                              ; preds = %97
  br label %133

133:                                              ; preds = %132, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !19
  br label %134

134:                                              ; preds = %143, %133
  %135 = load i64, ptr %23, align 8, !tbaa !19
  %136 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %137 = icmp ult i64 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %150

139:                                              ; preds = %134
  %140 = load i64, ptr %23, align 8, !tbaa !19
  %141 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %140) #5
  invoke void @_ZN17fastertransformer3mpi5bcastEPvmNS0_7MpiTypeEiNS0_7MpiCommE(ptr noundef %141, i64 noundef 1, i32 noundef 0, i32 noundef 0)
          to label %142 unwind label %146

142:                                              ; preds = %139
  br label %143

143:                                              ; preds = %142
  %144 = load i64, ptr %23, align 8, !tbaa !19
  %145 = add i64 %144, 1
  store i64 %145, ptr %23, align 8, !tbaa !19
  br label %134, !llvm.loop !21

146:                                              ; preds = %139
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %17, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %282

150:                                              ; preds = %138
  br label %151

151:                                              ; preds = %150, %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #5
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @_ZNSaIN17fastertransformer9NcclParamEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  invoke void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %153, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %154 unwind label %170

154:                                              ; preds = %151
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #5
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #5
  call void @_ZNSaIN17fastertransformer9NcclParamEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  invoke void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %156, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %157 unwind label %174

157:                                              ; preds = %154
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = icmp sgt i32 %158, 1
  br i1 %159, label %160, label %222

160:                                              ; preds = %157
  invoke void @_ZN17fastertransformer16ftNcclGroupStartEv()
          to label %161 unwind label %178

161:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %162 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %162, ptr %29, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %213, %161
  %164 = load i32, ptr %29, align 4, !tbaa !9
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = add nsw i32 %165, %166
  %168 = icmp slt i32 %164, %167
  br i1 %168, label %182, label %169

169:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %220

170:                                              ; preds = %151
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %17, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %18, align 4
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %281

174:                                              ; preds = %154
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %17, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %18, align 4
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  br label %280

178:                                              ; preds = %277, %275, %225, %220, %160
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %17, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %18, align 4
  br label %279

182:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %183 = load i32, ptr %8, align 4, !tbaa !9
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = mul nsw i32 %183, %184
  %186 = load i32, ptr %29, align 4, !tbaa !9
  %187 = add nsw i32 %185, %186
  %188 = load i32, ptr %9, align 4, !tbaa !9
  %189 = sub nsw i32 %187, %188
  store i32 %189, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %190 = load i32, ptr %30, align 4, !tbaa !9
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = srem i32 %190, %191
  store i32 %192, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %193 = load i32, ptr %30, align 4, !tbaa !9
  %194 = load i32, ptr %12, align 4, !tbaa !9
  %195 = sdiv i32 %193, %194
  store i32 %195, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #5
  %196 = load i32, ptr %32, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %197) #5
  invoke void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %33, ptr noundef nonnull align 1 dereferenceable(1) %198)
          to label %199 unwind label %216

199:                                              ; preds = %182
  %200 = load i32, ptr %29, align 4, !tbaa !9
  %201 = invoke i32 @cudaSetDevice(i32 noundef %200)
          to label %202 unwind label %216

202:                                              ; preds = %199
  invoke void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %201, ptr noundef @.str.2, ptr noundef @.str, i32 noundef 53)
          to label %203 unwind label %216

203:                                              ; preds = %202
  %204 = load i32, ptr %29, align 4, !tbaa !9
  %205 = load i32, ptr %9, align 4, !tbaa !9
  %206 = sub nsw i32 %204, %205
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %207) #5
  %209 = load i32, ptr %31, align 4, !tbaa !9
  %210 = load i32, ptr %12, align 4, !tbaa !9
  invoke void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %34, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %211 unwind label %216

211:                                              ; preds = %203
  invoke void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8) %208, i32 noundef %209, i32 noundef %210, ptr noundef %34)
          to label %212 unwind label %216

212:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %29, align 4, !tbaa !9
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %29, align 4, !tbaa !9
  br label %163, !llvm.loop !22

216:                                              ; preds = %211, %203, %202, %199, %182
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %17, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %279

220:                                              ; preds = %169
  invoke void @_ZN17fastertransformer14ftNcclGroupEndEv()
          to label %221 unwind label %178

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221, %157
  %223 = load i32, ptr %13, align 4, !tbaa !9
  %224 = icmp sgt i32 %223, 1
  br i1 %224, label %225, label %277

225:                                              ; preds = %222
  invoke void @_ZN17fastertransformer16ftNcclGroupStartEv()
          to label %226 unwind label %178

226:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %227 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %227, ptr %35, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %268, %226
  %229 = load i32, ptr %35, align 4, !tbaa !9
  %230 = load i32, ptr %9, align 4, !tbaa !9
  %231 = load i32, ptr %14, align 4, !tbaa !9
  %232 = add nsw i32 %230, %231
  %233 = icmp slt i32 %229, %232
  br i1 %233, label %235, label %234

234:                                              ; preds = %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %275

235:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %236 = load i32, ptr %8, align 4, !tbaa !9
  %237 = load i32, ptr %11, align 4, !tbaa !9
  %238 = mul nsw i32 %236, %237
  %239 = load i32, ptr %35, align 4, !tbaa !9
  %240 = add nsw i32 %238, %239
  %241 = load i32, ptr %9, align 4, !tbaa !9
  %242 = sub nsw i32 %240, %241
  store i32 %242, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %243 = load i32, ptr %36, align 4, !tbaa !9
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = srem i32 %243, %244
  store i32 %245, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  %246 = load i32, ptr %36, align 4, !tbaa !9
  %247 = load i32, ptr %12, align 4, !tbaa !9
  %248 = sdiv i32 %246, %247
  store i32 %248, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #5
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = load i32, ptr %37, align 4, !tbaa !9
  %251 = add nsw i32 %249, %250
  %252 = sext i32 %251 to i64
  %253 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %252) #5
  invoke void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %39, ptr noundef nonnull align 1 dereferenceable(1) %253)
          to label %254 unwind label %271

254:                                              ; preds = %235
  %255 = load i32, ptr %35, align 4, !tbaa !9
  %256 = invoke i32 @cudaSetDevice(i32 noundef %255)
          to label %257 unwind label %271

257:                                              ; preds = %254
  invoke void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %256, ptr noundef @.str.2, ptr noundef @.str, i32 noundef 67)
          to label %258 unwind label %271

258:                                              ; preds = %257
  %259 = load i32, ptr %35, align 4, !tbaa !9
  %260 = load i32, ptr %9, align 4, !tbaa !9
  %261 = sub nsw i32 %259, %260
  %262 = sext i32 %261 to i64
  %263 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %262) #5
  %264 = load i32, ptr %38, align 4, !tbaa !9
  %265 = load i32, ptr %13, align 4, !tbaa !9
  invoke void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %40, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %266 unwind label %271

266:                                              ; preds = %258
  invoke void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8) %263, i32 noundef %264, i32 noundef %265, ptr noundef %40)
          to label %267 unwind label %271

267:                                              ; preds = %266
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %35, align 4, !tbaa !9
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %35, align 4, !tbaa !9
  br label %228, !llvm.loop !23

271:                                              ; preds = %266, %258, %257, %254, %235
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %17, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %279

275:                                              ; preds = %234
  invoke void @_ZN17fastertransformer14ftNcclGroupEndEv()
          to label %276 unwind label %178

276:                                              ; preds = %275
  br label %277

277:                                              ; preds = %276, %222
  invoke void @_ZNSt4pairISt6vectorIN17fastertransformer9NcclParamESaIS2_EES4_EC2IRS4_S7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %278 unwind label %178

278:                                              ; preds = %277
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #5
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void

279:                                              ; preds = %271, %216, %178
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  br label %280

280:                                              ; preds = %279, %174
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #5
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  br label %281

281:                                              ; preds = %280, %170
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  br label %282

282:                                              ; preds = %281, %146, %128, %116
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  br label %283

283:                                              ; preds = %282, %115, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %284

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer14getDeviceCountEv() #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

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

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

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

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

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

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

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

declare void @_ZN17fastertransformer17ftNcclGetUniqueIdERNS_7NcclUidE(ptr noundef nonnull align 1 dereferenceable(1)) #4

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

declare void @_ZN17fastertransformer3mpi5bcastEPvmNS0_7MpiTypeEiNS0_7MpiCommE(ptr noundef, i64 noundef, i32 noundef, i32 noundef) #4

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

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

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

declare void @_ZN17fastertransformer16ftNcclGroupStartEv() #4

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

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

declare i32 @cudaSetDevice(i32 noundef) #4

declare void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef, ptr noundef) #4

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

declare void @_ZN17fastertransformer14ftNcclGroupEndEv() #4

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}


; 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.std::pair" = type { %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl" }
%"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastertransformer::NcclParam, std::allocator<fastertransformer::NcclParam>>::_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.0" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl" }
%"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastertransformer::NcclUid, std::allocator<fastertransformer::NcclUid>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"struct.fastertransformer::NcclUid" = type { i8 }

@.str = external hidden unnamed_addr constant [126 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24AbstractTransformerModel16createNcclParamsEiib(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"struct.fastertransformer::NcclUid", align 1
  %16 = alloca %"struct.fastertransformer::NcclUid", align 1
  %17 = alloca %"struct.fastertransformer::NcclUid", align 1
  %18 = alloca %"struct.fastertransformer::NcclUid", align 1
  %19 = tail call noundef i32 @_ZN17fastertransformer14getDeviceCountEv()
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  %22 = load ptr, ptr %21, align 8
  %23 = tail call noundef i32 %22(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 40
  %26 = load ptr, ptr %25, align 8
  %27 = tail call noundef i32 %26(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %28 = mul nsw i32 %27, %23
  %29 = select i1 %4, i32 %19, i32 %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %47

30:                                               ; preds = %5
  %31 = icmp sgt i32 %23, 0
  %32 = icmp sgt i32 %27, 0
  %33 = and i1 %31, %32
  invoke void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %33, ptr noundef nonnull @.str, i32 noundef 26, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %34 unwind label %49

34:                                               ; preds = %30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %35 = add nsw i32 %29, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %36 unwind label %52

36:                                               ; preds = %34
  %37 = icmp sle i32 %35, %19
  invoke void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %37, ptr noundef nonnull @.str, i32 noundef 27, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %38 unwind label %54

38:                                               ; preds = %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %39 = icmp sgt i32 %23, 1
  %40 = icmp sgt i32 %27, 1
  %or.cond = or i1 %39, %40
  br i1 %or.cond, label %41, label %.loopexit

41:                                               ; preds = %38
  %42 = add nsw i32 %27, %23
  %43 = sext i32 %42 to i64
  invoke void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %43)
          to label %44 unwind label %57

44:                                               ; preds = %41
  %45 = icmp eq i32 %2, 0
  br i1 %45, label %.preheader91, label %.loopexit92

.preheader91:                                     ; preds = %44
  %46 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %.not = icmp eq i64 %46, 0
  br i1 %.not, label %.loopexit92, label %.lr.ph

47:                                               ; preds = %5
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %30
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %137

52:                                               ; preds = %34
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %36
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %56

56:                                               ; preds = %54, %52
  %.pn81 = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %137

57:                                               ; preds = %41
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %136

.lr.ph:                                           ; preds = %.preheader91, %61
  %59 = phi i64 [ %63, %61 ], [ 0, %.preheader91 ]
  %.07393 = phi i32 [ %62, %61 ], [ 0, %.preheader91 ]
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %59) #5
  invoke void @_ZN17fastertransformer17ftNcclGetUniqueIdERNS_7NcclUidE(ptr noundef nonnull align 1 dereferenceable(1) %60)
          to label %61 unwind label %66

61:                                               ; preds = %.lr.ph
  %62 = add i32 %.07393, 1
  %63 = zext i32 %62 to i64
  %64 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %65 = icmp ugt i64 %64, %63
  br i1 %65, label %.lr.ph, label %.loopexit92, !llvm.loop !8

66:                                               ; preds = %.lr.ph
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %136

.loopexit92:                                      ; preds = %61, %.preheader91, %44
  %68 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %.not101 = icmp eq i64 %68, 0
  br i1 %.not101, label %.loopexit, label %.lr.ph95

.lr.ph95:                                         ; preds = %.loopexit92, %70
  %.07594 = phi i64 [ %71, %70 ], [ 0, %.loopexit92 ]
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.07594) #5
  invoke void @_ZN17fastertransformer3mpi5bcastEPvmNS0_7MpiTypeEiNS0_7MpiCommE(ptr noundef nonnull %69, i64 noundef 1, i32 noundef 0, i32 noundef 0)
          to label %70 unwind label %74

70:                                               ; preds = %.lr.ph95
  %71 = add nuw i64 %.07594, 1
  %72 = call noundef i64 @_ZNKSt6vectorIN17fastertransformer7NcclUidESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %73 = icmp ult i64 %71, %72
  br i1 %73, label %.lr.ph95, label %.loopexit, !llvm.loop !10

74:                                               ; preds = %.lr.ph95
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %136

.loopexit:                                        ; preds = %70, %.loopexit92, %38
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  %76 = sext i32 %29 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIN17fastertransformer9NcclParamEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %76, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %77 unwind label %85

77:                                               ; preds = %.loopexit
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaIN17fastertransformer9NcclParamEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %76, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %78 unwind label %87

78:                                               ; preds = %77
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  br i1 %39, label %79, label %107

79:                                               ; preds = %78
  invoke void @_ZN17fastertransformer16ftNcclGroupStartEv()
          to label %.preheader90 unwind label %89

.preheader90:                                     ; preds = %79
  %80 = icmp sgt i32 %29, 0
  br i1 %80, label %.lr.ph97, label %._crit_edge

.lr.ph97:                                         ; preds = %.preheader90
  %81 = mul nsw i32 %19, %2
  %82 = sub i32 %81, %3
  %83 = sext i32 %3 to i64
  %84 = sext i32 %35 to i64
  br label %91

._crit_edge:                                      ; preds = %103, %.preheader90
  invoke void @_ZN17fastertransformer14ftNcclGroupEndEv()
          to label %107 unwind label %89

85:                                               ; preds = %.loopexit
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %135

87:                                               ; preds = %77
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN17fastertransformer9NcclParamEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  br label %134

89:                                               ; preds = %131, %._crit_edge100, %108, %._crit_edge, %79
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %133

91:                                               ; preds = %.lr.ph97, %103
  %indvars.iv = phi i64 [ %83, %.lr.ph97 ], [ %indvars.iv.next, %103 ]
  %92 = trunc nsw i64 %indvars.iv to i32
  %93 = add i32 %82, %92
  %94 = srem i32 %93, %23
  %95 = sdiv i32 %93, %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %96) #5
  call void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 1 dereferenceable(1) %97)
  %98 = invoke i32 @cudaSetDevice(i32 noundef %92)
          to label %99 unwind label %105

99:                                               ; preds = %91
  invoke void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %98, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 53)
          to label %100 unwind label %105

100:                                              ; preds = %99
  %101 = sub nsw i64 %indvars.iv, %83
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %101) #5
  call void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(1) %15)
  invoke void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8) %102, i32 noundef %94, i32 noundef %23, ptr noundef nonnull %16)
          to label %103 unwind label %105

103:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %104 = icmp slt i64 %indvars.iv.next, %84
  br i1 %104, label %91, label %._crit_edge, !llvm.loop !11

105:                                              ; preds = %100, %99, %91
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  br label %133

107:                                              ; preds = %._crit_edge, %78
  br i1 %40, label %108, label %131

108:                                              ; preds = %107
  invoke void @_ZN17fastertransformer16ftNcclGroupStartEv()
          to label %.preheader unwind label %89

.preheader:                                       ; preds = %108
  %109 = icmp sgt i32 %29, 0
  br i1 %109, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %.preheader
  %110 = mul nsw i32 %19, %2
  %111 = sub i32 %110, %3
  %112 = sext i32 %3 to i64
  %113 = sext i32 %35 to i64
  br label %114

._crit_edge100:                                   ; preds = %127, %.preheader
  invoke void @_ZN17fastertransformer14ftNcclGroupEndEv()
          to label %131 unwind label %89

114:                                              ; preds = %.lr.ph99, %127
  %indvars.iv103 = phi i64 [ %112, %.lr.ph99 ], [ %indvars.iv.next104, %127 ]
  %115 = trunc nsw i64 %indvars.iv103 to i32
  %116 = add i32 %111, %115
  %117 = srem i32 %116, %23
  %118 = sdiv i32 %116, %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #5
  %119 = add nsw i32 %117, %27
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %120) #5
  call void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(1) %121)
  %122 = invoke i32 @cudaSetDevice(i32 noundef %115)
          to label %123 unwind label %129

123:                                              ; preds = %114
  invoke void @_ZN17fastertransformer5checkI9cudaErrorEEvT_PKcS4_i(i32 noundef %122, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 67)
          to label %124 unwind label %129

124:                                              ; preds = %123
  %125 = sub nsw i64 %indvars.iv103, %112
  %126 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %125) #5
  call void @_ZN17fastertransformer7NcclUidC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(1) %17)
  invoke void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8) %126, i32 noundef %118, i32 noundef %27, ptr noundef nonnull %18)
          to label %127 unwind label %129

127:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  %128 = icmp slt i64 %indvars.iv.next104, %113
  br i1 %128, label %114, label %._crit_edge100, !llvm.loop !12

129:                                              ; preds = %124, %123, %114
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  br label %133

131:                                              ; preds = %._crit_edge100, %107
  invoke void @_ZNSt4pairISt6vectorIN17fastertransformer9NcclParamESaIS2_EES4_EC2IRS4_S7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %132 unwind label %89

132:                                              ; preds = %131
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  ret void

133:                                              ; preds = %129, %105, %89
  %.pn83 = phi { ptr, i32 } [ %106, %105 ], [ %130, %129 ], [ %90, %89 ]
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %134

134:                                              ; preds = %133, %87
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %133 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  call void @_ZNSt6vectorIN17fastertransformer9NcclParamESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %135

135:                                              ; preds = %134, %85
  %.pn83.pn.pn = phi { ptr, i32 } [ %.pn83.pn, %134 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  br label %136

136:                                              ; preds = %135, %74, %66, %57
  %.pn87 = phi { ptr, i32 } [ %67, %66 ], [ %75, %74 ], [ %.pn83.pn.pn, %135 ], [ %58, %57 ]
  call void @_ZNSt6vectorIN17fastertransformer7NcclUidESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %137

137:                                              ; preds = %136, %56, %51
  %.pn87.pn = phi { ptr, i32 } [ %.pn87, %136 ], [ %.pn81, %56 ], [ %.pn, %51 ]
  resume { ptr, i32 } %.pn87.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN17fastertransformer14getDeviceCountEv() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17fastertransformer8myAssertEbPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

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

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

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

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

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

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

declare void @_ZN17fastertransformer17ftNcclGetUniqueIdERNS_7NcclUidE(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

declare void @_ZN17fastertransformer3mpi5bcastEPvmNS0_7MpiTypeEiNS0_7MpiCommE(ptr noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

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

declare void @_ZN17fastertransformer16ftNcclGroupStartEv() local_unnamed_addr #4

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

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

declare i32 @cudaSetDevice(i32 noundef) local_unnamed_addr #4

declare void @_ZN17fastertransformer18ftNcclCommInitRankERNS_9NcclParamEiiNS_7NcclUidE(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

declare void @_ZN17fastertransformer14ftNcclGroupEndEv() local_unnamed_addr #4

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}
!12 = distinct !{!12, !9}


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