; LLVM IR from huawei-noah/bolt :: compute/image/src/cpu (convert_color)

; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.ConvertColorParamSpec = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17convert_color_cpu10TensorDescPKv21ConvertColorParamSpecS_Pv(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, i64 %2, i32 %3, ptr noundef byval(%struct.TensorDesc) align 8 %4, ptr noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca %struct.ConvertColorParamSpec, align 4
  %9 = alloca { i64, i32 }, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.TensorDesc, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.TensorDesc, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %struct.TensorDesc, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca %struct.TensorDesc, align 8
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca float, align 4
  %51 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 0
  store i64 %2, ptr %51, align 4
  %52 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 1
  store i32 %3, ptr %52, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %9, i64 12, i1 false)
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %53 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 24
  br i1 %55, label %56, label %89

56:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !14
  %57 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %25, ptr noundef %12, ptr noundef %14, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19)
  store i32 %57, ptr %24, align 4, !tbaa !19
  %58 = load i32, ptr %24, align 4, !tbaa !19
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %72

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %61 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %26, align 4, !tbaa !17
  %63 = load i32, ptr %26, align 4, !tbaa !17
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %63)
  %65 = load ptr, ptr @stdout, align 8, !tbaa !5
  %66 = call i32 @fflush(ptr noundef %65)
  %67 = load i32, ptr %24, align 4, !tbaa !19
  %68 = call ptr @ee2str(i32 noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %68)
  %70 = load ptr, ptr @stdout, align 8, !tbaa !5
  %71 = call i32 @fflush(ptr noundef %70)
  call void @exit(i32 noundef 1) #9
  unreachable

72:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !14
  %73 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %28, ptr noundef %13, ptr noundef %15, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23)
  store i32 %73, ptr %27, align 4, !tbaa !19
  %74 = load i32, ptr %27, align 4, !tbaa !19
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %88

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %77 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr %29, align 4, !tbaa !17
  %79 = load i32, ptr %29, align 4, !tbaa !17
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %79)
  %81 = load ptr, ptr @stdout, align 8, !tbaa !5
  %82 = call i32 @fflush(ptr noundef %81)
  %83 = load i32, ptr %27, align 4, !tbaa !19
  %84 = call ptr @ee2str(i32 noundef %83)
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %84)
  %86 = load ptr, ptr @stdout, align 8, !tbaa !5
  %87 = call i32 @fflush(ptr noundef %86)
  call void @exit(i32 noundef 1) #9
  unreachable

88:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %122

89:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !14
  %90 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %31, ptr noundef %12, ptr noundef %14, ptr noundef %16, ptr noundef %18, ptr noundef %19, ptr noundef %17)
  store i32 %90, ptr %30, align 4, !tbaa !19
  %91 = load i32, ptr %30, align 4, !tbaa !19
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %105

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %94 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %95 = trunc i64 %94 to i32
  store i32 %95, ptr %32, align 4, !tbaa !17
  %96 = load i32, ptr %32, align 4, !tbaa !17
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %96)
  %98 = load ptr, ptr @stdout, align 8, !tbaa !5
  %99 = call i32 @fflush(ptr noundef %98)
  %100 = load i32, ptr %30, align 4, !tbaa !19
  %101 = call ptr @ee2str(i32 noundef %100)
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %101)
  %103 = load ptr, ptr @stdout, align 8, !tbaa !5
  %104 = call i32 @fflush(ptr noundef %103)
  call void @exit(i32 noundef 1) #9
  unreachable

105:                                              ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !14
  %106 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %34, ptr noundef %13, ptr noundef %15, ptr noundef %20, ptr noundef %22, ptr noundef %23, ptr noundef %21)
  store i32 %106, ptr %33, align 4, !tbaa !19
  %107 = load i32, ptr %33, align 4, !tbaa !19
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %121

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %110 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %111 = trunc i64 %110 to i32
  store i32 %111, ptr %35, align 4, !tbaa !17
  %112 = load i32, ptr %35, align 4, !tbaa !17
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %112)
  %114 = load ptr, ptr @stdout, align 8, !tbaa !5
  %115 = call i32 @fflush(ptr noundef %114)
  %116 = load i32, ptr %33, align 4, !tbaa !19
  %117 = call ptr @ee2str(i32 noundef %116)
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %117)
  %119 = load ptr, ptr @stdout, align 8, !tbaa !5
  %120 = call i32 @fflush(ptr noundef %119)
  call void @exit(i32 noundef 1) #9
  unreachable

121:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %122

122:                                              ; preds = %121, %88
  %123 = load i32, ptr %16, align 4, !tbaa !17
  %124 = load i32, ptr %20, align 4, !tbaa !17
  %125 = icmp ne i32 %123, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %122
  store i32 2, ptr %7, align 4
  store i32 1, ptr %36, align 4
  br label %357

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  store i32 0, ptr %41, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store i32 0, ptr %43, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %128 = load i32, ptr %16, align 4, !tbaa !17
  store i32 %128, ptr %46, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  store i32 1, ptr %48, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  store float 1.000000e+00, ptr %50, align 4, !tbaa !21
  %129 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %130 = load i32, ptr %129, align 4, !tbaa !23
  %131 = icmp eq i32 %130, 41
  br i1 %131, label %132, label %225

132:                                              ; preds = %127
  %133 = load i32, ptr %21, align 4, !tbaa !17
  store i32 %133, ptr %47, align 4, !tbaa !17
  %134 = load i32, ptr %22, align 4, !tbaa !17
  store i32 %134, ptr %38, align 4, !tbaa !17
  %135 = load i32, ptr %23, align 4, !tbaa !17
  store i32 %135, ptr %39, align 4, !tbaa !17
  %136 = load i32, ptr %39, align 4, !tbaa !17
  store i32 %136, ptr %40, align 4, !tbaa !17
  %137 = load i32, ptr %39, align 4, !tbaa !17
  %138 = mul nsw i32 %137, 3
  store i32 %138, ptr %42, align 4, !tbaa !17
  %139 = load i32, ptr %38, align 4, !tbaa !17
  store i32 %139, ptr %44, align 4, !tbaa !17
  %140 = load i32, ptr %39, align 4, !tbaa !17
  store i32 %140, ptr %45, align 4, !tbaa !17
  %141 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %142 = load i32, ptr %141, align 4, !tbaa !26
  %143 = icmp eq i32 %142, 11
  br i1 %143, label %156, label %144

144:                                              ; preds = %132
  %145 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !26
  %147 = icmp eq i32 %146, 10
  br i1 %147, label %156, label %148

148:                                              ; preds = %144
  %149 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %150 = load i32, ptr %149, align 4, !tbaa !26
  %151 = icmp eq i32 %150, 21
  br i1 %151, label %156, label %152

152:                                              ; preds = %148
  %153 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %154 = load i32, ptr %153, align 4, !tbaa !26
  %155 = icmp eq i32 %154, 20
  br i1 %155, label %156, label %157

156:                                              ; preds = %152, %148, %144, %132
  store i32 2, ptr %49, align 4, !tbaa !17
  br label %176

157:                                              ; preds = %152
  %158 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %159 = load i32, ptr %158, align 4, !tbaa !26
  %160 = icmp eq i32 %159, 13
  br i1 %160, label %173, label %161

161:                                              ; preds = %157
  %162 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !26
  %164 = icmp eq i32 %163, 12
  br i1 %164, label %173, label %165

165:                                              ; preds = %161
  %166 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !26
  %168 = icmp eq i32 %167, 23
  br i1 %168, label %173, label %169

169:                                              ; preds = %165
  %170 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !26
  %172 = icmp eq i32 %171, 22
  br i1 %172, label %173, label %174

173:                                              ; preds = %169, %165, %161, %157
  store i32 0, ptr %49, align 4, !tbaa !17
  br label %175

174:                                              ; preds = %169
  store i32 51, ptr %7, align 4
  store i32 1, ptr %36, align 4
  br label %356

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175, %156
  %177 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !26
  %179 = icmp eq i32 %178, 11
  br i1 %179, label %192, label %180

180:                                              ; preds = %176
  %181 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !26
  %183 = icmp eq i32 %182, 13
  br i1 %183, label %192, label %184

184:                                              ; preds = %180
  %185 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !26
  %187 = icmp eq i32 %186, 21
  br i1 %187, label %192, label %188

188:                                              ; preds = %184
  %189 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !26
  %191 = icmp eq i32 %190, 23
  br i1 %191, label %192, label %193

192:                                              ; preds = %188, %184, %180, %176
  store float 0x3F70101020000000, ptr %50, align 4, !tbaa !21
  br label %193

193:                                              ; preds = %192, %188
  %194 = load i32, ptr %13, align 4, !tbaa !15
  switch i32 %194, label %223 [
    i32 6, label %195
    i32 0, label %209
  ]

195:                                              ; preds = %193
  %196 = load i32, ptr %40, align 4, !tbaa !17
  %197 = load i32, ptr %41, align 4, !tbaa !17
  %198 = load i32, ptr %42, align 4, !tbaa !17
  %199 = load i32, ptr %43, align 4, !tbaa !17
  %200 = load i32, ptr %44, align 4, !tbaa !17
  %201 = load i32, ptr %45, align 4, !tbaa !17
  %202 = load i32, ptr %46, align 4, !tbaa !17
  %203 = load i32, ptr %47, align 4, !tbaa !17
  %204 = load i32, ptr %48, align 4, !tbaa !17
  %205 = load i32, ptr %49, align 4, !tbaa !17
  %206 = load float, ptr %50, align 4, !tbaa !21
  %207 = load ptr, ptr %10, align 8, !tbaa !5
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL15yuv_nv21_to_rgbIhfEviiiiiiiiiifPKT_PT0_(i32 noundef %196, i32 noundef %197, i32 noundef %198, i32 noundef %199, i32 noundef %200, i32 noundef %201, i32 noundef %202, i32 noundef %203, i32 noundef %204, i32 noundef %205, float noundef %206, ptr noundef %207, ptr noundef %208)
  br label %224

209:                                              ; preds = %193
  %210 = load i32, ptr %40, align 4, !tbaa !17
  %211 = load i32, ptr %41, align 4, !tbaa !17
  %212 = load i32, ptr %42, align 4, !tbaa !17
  %213 = load i32, ptr %43, align 4, !tbaa !17
  %214 = load i32, ptr %44, align 4, !tbaa !17
  %215 = load i32, ptr %45, align 4, !tbaa !17
  %216 = load i32, ptr %46, align 4, !tbaa !17
  %217 = load i32, ptr %47, align 4, !tbaa !17
  %218 = load i32, ptr %48, align 4, !tbaa !17
  %219 = load i32, ptr %49, align 4, !tbaa !17
  %220 = load float, ptr %50, align 4, !tbaa !21
  %221 = load ptr, ptr %10, align 8, !tbaa !5
  %222 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL15yuv_nv21_to_rgbIhhEviiiiiiiiiifPKT_PT0_(i32 noundef %210, i32 noundef %211, i32 noundef %212, i32 noundef %213, i32 noundef %214, i32 noundef %215, i32 noundef %216, i32 noundef %217, i32 noundef %218, i32 noundef %219, float noundef %220, ptr noundef %221, ptr noundef %222)
  br label %224

223:                                              ; preds = %193
  store i32 51, ptr %37, align 4, !tbaa !19
  br label %224

224:                                              ; preds = %223, %209, %195
  br label %354

225:                                              ; preds = %127
  %226 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %227 = load i32, ptr %226, align 4, !tbaa !23
  %228 = icmp eq i32 %227, 10
  br i1 %228, label %257, label %229

229:                                              ; preds = %225
  %230 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %231 = load i32, ptr %230, align 4, !tbaa !23
  %232 = icmp eq i32 %231, 11
  br i1 %232, label %257, label %233

233:                                              ; preds = %229
  %234 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %235 = load i32, ptr %234, align 4, !tbaa !23
  %236 = icmp eq i32 %235, 12
  br i1 %236, label %257, label %237

237:                                              ; preds = %233
  %238 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %239 = load i32, ptr %238, align 4, !tbaa !23
  %240 = icmp eq i32 %239, 13
  br i1 %240, label %257, label %241

241:                                              ; preds = %237
  %242 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %243 = load i32, ptr %242, align 4, !tbaa !23
  %244 = icmp eq i32 %243, 20
  br i1 %244, label %257, label %245

245:                                              ; preds = %241
  %246 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %247 = load i32, ptr %246, align 4, !tbaa !23
  %248 = icmp eq i32 %247, 21
  br i1 %248, label %257, label %249

249:                                              ; preds = %245
  %250 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %251 = load i32, ptr %250, align 4, !tbaa !23
  %252 = icmp eq i32 %251, 22
  br i1 %252, label %257, label %253

253:                                              ; preds = %249
  %254 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %255 = load i32, ptr %254, align 4, !tbaa !23
  %256 = icmp eq i32 %255, 23
  br i1 %256, label %257, label %352

257:                                              ; preds = %253, %249, %245, %241, %237, %233, %229, %225
  %258 = load i32, ptr %17, align 4, !tbaa !17
  store i32 %258, ptr %47, align 4, !tbaa !17
  %259 = load i32, ptr %18, align 4, !tbaa !17
  store i32 %259, ptr %38, align 4, !tbaa !17
  %260 = load i32, ptr %19, align 4, !tbaa !17
  store i32 %260, ptr %39, align 4, !tbaa !17
  %261 = load i32, ptr %39, align 4, !tbaa !17
  %262 = mul nsw i32 %261, 3
  store i32 %262, ptr %40, align 4, !tbaa !17
  %263 = load i32, ptr %39, align 4, !tbaa !17
  store i32 %263, ptr %42, align 4, !tbaa !17
  %264 = load i32, ptr %38, align 4, !tbaa !17
  %265 = sdiv i32 %264, 2
  %266 = mul nsw i32 %265, 3
  store i32 %266, ptr %44, align 4, !tbaa !17
  %267 = load i32, ptr %39, align 4, !tbaa !17
  store i32 %267, ptr %45, align 4, !tbaa !17
  %268 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %269 = load i32, ptr %268, align 4, !tbaa !23
  %270 = icmp eq i32 %269, 11
  br i1 %270, label %283, label %271

271:                                              ; preds = %257
  %272 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %273 = load i32, ptr %272, align 4, !tbaa !23
  %274 = icmp eq i32 %273, 10
  br i1 %274, label %283, label %275

275:                                              ; preds = %271
  %276 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %277 = load i32, ptr %276, align 4, !tbaa !23
  %278 = icmp eq i32 %277, 21
  br i1 %278, label %283, label %279

279:                                              ; preds = %275
  %280 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %281 = load i32, ptr %280, align 4, !tbaa !23
  %282 = icmp eq i32 %281, 20
  br i1 %282, label %283, label %284

283:                                              ; preds = %279, %275, %271, %257
  store i32 2, ptr %49, align 4, !tbaa !17
  br label %303

284:                                              ; preds = %279
  %285 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %286 = load i32, ptr %285, align 4, !tbaa !23
  %287 = icmp eq i32 %286, 13
  br i1 %287, label %300, label %288

288:                                              ; preds = %284
  %289 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %290 = load i32, ptr %289, align 4, !tbaa !23
  %291 = icmp eq i32 %290, 12
  br i1 %291, label %300, label %292

292:                                              ; preds = %288
  %293 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %294 = load i32, ptr %293, align 4, !tbaa !23
  %295 = icmp eq i32 %294, 23
  br i1 %295, label %300, label %296

296:                                              ; preds = %292
  %297 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %298 = load i32, ptr %297, align 4, !tbaa !23
  %299 = icmp eq i32 %298, 22
  br i1 %299, label %300, label %301

300:                                              ; preds = %296, %292, %288, %284
  store i32 0, ptr %49, align 4, !tbaa !17
  br label %302

301:                                              ; preds = %296
  store i32 51, ptr %7, align 4
  store i32 1, ptr %36, align 4
  br label %356

302:                                              ; preds = %300
  br label %303

303:                                              ; preds = %302, %283
  %304 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %305 = load i32, ptr %304, align 4, !tbaa !23
  %306 = icmp eq i32 %305, 11
  br i1 %306, label %319, label %307

307:                                              ; preds = %303
  %308 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %309 = load i32, ptr %308, align 4, !tbaa !23
  %310 = icmp eq i32 %309, 13
  br i1 %310, label %319, label %311

311:                                              ; preds = %307
  %312 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %313 = load i32, ptr %312, align 4, !tbaa !23
  %314 = icmp eq i32 %313, 21
  br i1 %314, label %319, label %315

315:                                              ; preds = %311
  %316 = getelementptr inbounds %struct.ConvertColorParamSpec, ptr %8, i32 0, i32 0
  %317 = load i32, ptr %316, align 4, !tbaa !23
  %318 = icmp eq i32 %317, 23
  br i1 %318, label %319, label %320

319:                                              ; preds = %315, %311, %307, %303
  store float 2.550000e+02, ptr %50, align 4, !tbaa !21
  br label %320

320:                                              ; preds = %319, %315
  %321 = load i32, ptr %13, align 4, !tbaa !15
  switch i32 %321, label %350 [
    i32 6, label %322
    i32 0, label %336
  ]

322:                                              ; preds = %320
  %323 = load i32, ptr %40, align 4, !tbaa !17
  %324 = load i32, ptr %41, align 4, !tbaa !17
  %325 = load i32, ptr %42, align 4, !tbaa !17
  %326 = load i32, ptr %43, align 4, !tbaa !17
  %327 = load i32, ptr %44, align 4, !tbaa !17
  %328 = load i32, ptr %45, align 4, !tbaa !17
  %329 = load i32, ptr %46, align 4, !tbaa !17
  %330 = load i32, ptr %47, align 4, !tbaa !17
  %331 = load i32, ptr %48, align 4, !tbaa !17
  %332 = load i32, ptr %49, align 4, !tbaa !17
  %333 = load float, ptr %50, align 4, !tbaa !21
  %334 = load ptr, ptr %10, align 8, !tbaa !5
  %335 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL15rgb_to_yuv_nv21IfhEviiiiiiiiiifPKT_PT0_(i32 noundef %323, i32 noundef %324, i32 noundef %325, i32 noundef %326, i32 noundef %327, i32 noundef %328, i32 noundef %329, i32 noundef %330, i32 noundef %331, i32 noundef %332, float noundef %333, ptr noundef %334, ptr noundef %335)
  br label %351

336:                                              ; preds = %320
  %337 = load i32, ptr %40, align 4, !tbaa !17
  %338 = load i32, ptr %41, align 4, !tbaa !17
  %339 = load i32, ptr %42, align 4, !tbaa !17
  %340 = load i32, ptr %43, align 4, !tbaa !17
  %341 = load i32, ptr %44, align 4, !tbaa !17
  %342 = load i32, ptr %45, align 4, !tbaa !17
  %343 = load i32, ptr %46, align 4, !tbaa !17
  %344 = load i32, ptr %47, align 4, !tbaa !17
  %345 = load i32, ptr %48, align 4, !tbaa !17
  %346 = load i32, ptr %49, align 4, !tbaa !17
  %347 = load float, ptr %50, align 4, !tbaa !21
  %348 = load ptr, ptr %10, align 8, !tbaa !5
  %349 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL15rgb_to_yuv_nv21IhhEviiiiiiiiiifPKT_PT0_(i32 noundef %337, i32 noundef %338, i32 noundef %339, i32 noundef %340, i32 noundef %341, i32 noundef %342, i32 noundef %343, i32 noundef %344, i32 noundef %345, i32 noundef %346, float noundef %347, ptr noundef %348, ptr noundef %349)
  br label %351

350:                                              ; preds = %320
  store i32 51, ptr %37, align 4, !tbaa !19
  br label %351

351:                                              ; preds = %350, %336, %322
  br label %353

352:                                              ; preds = %253
  store i32 51, ptr %37, align 4, !tbaa !19
  br label %353

353:                                              ; preds = %352, %351
  br label %354

354:                                              ; preds = %353, %224
  %355 = load i32, ptr %37, align 4, !tbaa !19
  store i32 %355, ptr %7, align 4
  store i32 1, ptr %36, align 4
  br label %356

356:                                              ; preds = %354, %301, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %357

357:                                              ; preds = %356, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %358 = load i32, ptr %7, align 4
  ret i32 %358
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #4

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

declare i32 @fflush(ptr noundef) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15yuv_nv21_to_rgbIhfEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15yuv_nv21_to_rgbIhhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15rgb_to_yuv_nv21IfhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15rgb_to_yuv_nv21IhhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #7

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 nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 = { 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 #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 4}
!10 = !{!"_ZTS10TensorDesc", !11, i64 0, !12, i64 4, !13, i64 8, !7, i64 12}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!"_ZTS10DataFormat", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !16, i64 8, i64 4, !17, i64 12, i64 80, !18}
!15 = !{!11, !11, i64 0}
!16 = !{!12, !12, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTS2EE", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!24, !25, i64 0}
!24 = !{!"_ZTS21ConvertColorParamSpec", !25, i64 0, !25, i64 4, !11, i64 8}
!25 = !{!"_ZTS10ColorSpace", !7, i64 0}
!26 = !{!24, !25, i64 4}


; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@switch.table._Z17convert_color_cpu10TensorDescPKv21ConvertColorParamSpecS_Pv.1 = private unnamed_addr constant [7 x i32] [i32 2, i32 0, i32 2, i32 2, i32 2, i32 2, i32 0], align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 52) i32 @_Z17convert_color_cpu10TensorDescPKv21ConvertColorParamSpecS_Pv(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, i64 %2, i32 %3, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %.fr197 = freeze i64 %2
  %.sroa.0146.0.extract.trunc = trunc i64 %.fr197 to i32
  %.sroa.22.0.extract.shift = lshr i64 %.fr197, 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  %19 = getelementptr inbounds i8, ptr %0, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 24
  br i1 %21, label %22, label %46

22:                                               ; preds = %6
  %23 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14)
  %.not190 = icmp eq i32 %23, 0
  br i1 %.not190, label %34, label %24

24:                                               ; preds = %22
  %25 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %26 = trunc i64 %25 to i32
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %26)
  %28 = load ptr, ptr @stdout, align 8, !tbaa !12
  %29 = call i32 @fflush(ptr noundef %28)
  %30 = call ptr @ee2str(i32 noundef %23)
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %30)
  %32 = load ptr, ptr @stdout, align 8, !tbaa !12
  %33 = call i32 @fflush(ptr noundef %32)
  call void @exit(i32 noundef 1) #8
  unreachable

34:                                               ; preds = %22
  %35 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18)
  %.not191 = icmp eq i32 %35, 0
  br i1 %.not191, label %70, label %36

36:                                               ; preds = %34
  %37 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %38 = trunc i64 %37 to i32
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %38)
  %40 = load ptr, ptr @stdout, align 8, !tbaa !12
  %41 = call i32 @fflush(ptr noundef %40)
  %42 = call ptr @ee2str(i32 noundef %35)
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %42)
  %44 = load ptr, ptr @stdout, align 8, !tbaa !12
  %45 = call i32 @fflush(ptr noundef %44)
  call void @exit(i32 noundef 1) #8
  unreachable

46:                                               ; preds = %6
  %47 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %12)
  %.not = icmp eq i32 %47, 0
  br i1 %.not, label %58, label %48

48:                                               ; preds = %46
  %49 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %50 = trunc i64 %49 to i32
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %50)
  %52 = load ptr, ptr @stdout, align 8, !tbaa !12
  %53 = call i32 @fflush(ptr noundef %52)
  %54 = call ptr @ee2str(i32 noundef %47)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %54)
  %56 = load ptr, ptr @stdout, align 8, !tbaa !12
  %57 = call i32 @fflush(ptr noundef %56)
  call void @exit(i32 noundef 1) #8
  unreachable

58:                                               ; preds = %46
  %59 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %15, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %16)
  %.not189 = icmp eq i32 %59, 0
  br i1 %.not189, label %70, label %60

60:                                               ; preds = %58
  %61 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %62 = trunc i64 %61 to i32
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %62)
  %64 = load ptr, ptr @stdout, align 8, !tbaa !12
  %65 = call i32 @fflush(ptr noundef %64)
  %66 = call ptr @ee2str(i32 noundef %59)
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %66)
  %68 = load ptr, ptr @stdout, align 8, !tbaa !12
  %69 = call i32 @fflush(ptr noundef %68)
  call void @exit(i32 noundef 1) #8
  unreachable

70:                                               ; preds = %58, %34
  %71 = load i32, ptr %11, align 4, !tbaa !14
  %72 = load i32, ptr %15, align 4, !tbaa !14
  %.not192 = icmp eq i32 %71, %72
  br i1 %.not192, label %73, label %110

73:                                               ; preds = %70
  switch i32 %.sroa.0146.0.extract.trunc, label %110 [
    i32 41, label %74
    i32 23, label %90
    i32 22, label %90
    i32 21, label %90
    i32 20, label %90
    i32 13, label %90
    i32 12, label %90
    i32 11, label %90
    i32 10, label %90
  ]

74:                                               ; preds = %73
  %75 = load i32, ptr %16, align 4, !tbaa !14
  %76 = load i32, ptr %17, align 4, !tbaa !14
  %77 = load i32, ptr %18, align 4, !tbaa !14
  %78 = mul nsw i32 %77, 3
  %79 = add i64 %.fr197, -42949672960
  %80 = lshr i64 %79, 33
  %81 = icmp ult i64 %79, 60129542144
  br i1 %81, label %switch.hole_check, label %110

switch.hole_check:                                ; preds = %74
  %switch.maskindex = trunc nuw i64 %80 to i8
  %switch.shifted = lshr i8 99, %switch.maskindex
  %switch.lobit = trunc i8 %switch.shifted to i1
  br i1 %switch.lobit, label %switch.lookup, label %110

switch.lookup:                                    ; preds = %switch.hole_check
  %switch.gep = getelementptr inbounds [7 x i32], ptr @switch.table._Z17convert_color_cpu10TensorDescPKv21ConvertColorParamSpecS_Pv.1, i64 0, i64 %80
  %switch.load = load i32, ptr %switch.gep, align 4
  %82 = and i64 %.fr197, 124554051584
  %83 = icmp eq i64 %82, 90194313216
  br i1 %83, label %86, label %switch.early.test

switch.early.test:                                ; preds = %switch.lookup
  %84 = add nsw i64 %.sroa.22.0.extract.shift, -11
  %switch.and = and i64 %84, -3
  %switch.selectcmp = icmp eq i64 %switch.and, 0
  %85 = select i1 %switch.selectcmp, float 0x3F70101020000000, float 1.000000e+00
  br label %86

86:                                               ; preds = %switch.lookup, %switch.early.test
  %.0 = phi float [ %85, %switch.early.test ], [ 0x3F70101020000000, %switch.lookup ]
  %87 = load i32, ptr %8, align 4, !tbaa !15
  switch i32 %87, label %110 [
    i32 6, label %88
    i32 0, label %89
  ]

88:                                               ; preds = %86
  call void @_ZL15yuv_nv21_to_rgbIhfEviiiiiiiiiifPKT_PT0_(i32 noundef %77, i32 noundef 0, i32 noundef %78, i32 noundef 0, i32 noundef %76, i32 noundef %77, i32 noundef %71, i32 noundef %75, i32 noundef 1, i32 noundef %switch.load, float noundef %.0, ptr noundef %1, ptr noundef %5)
  br label %110

89:                                               ; preds = %86
  call void @_ZL15yuv_nv21_to_rgbIhhEviiiiiiiiiifPKT_PT0_(i32 noundef %77, i32 noundef 0, i32 noundef %78, i32 noundef 0, i32 noundef %76, i32 noundef %77, i32 noundef %71, i32 noundef %75, i32 noundef 1, i32 noundef %switch.load, float noundef %.0, ptr noundef %1, ptr noundef %5)
  br label %110

90:                                               ; preds = %73, %73, %73, %73, %73, %73, %73, %73
  %91 = load i32, ptr %12, align 4, !tbaa !14
  %92 = load i32, ptr %13, align 4, !tbaa !14
  %93 = load i32, ptr %14, align 4, !tbaa !14
  %94 = mul nsw i32 %93, 3
  %95 = sdiv i32 %92, 2
  %96 = mul nsw i32 %95, 3
  %97 = and i32 %.sroa.0146.0.extract.trunc, 30
  %98 = add nsw i32 %97, -10
  %99 = lshr exact i32 %98, 1
  %100 = icmp ult i32 %98, 14
  br i1 %100, label %switch.hole_check199, label %110

switch.hole_check199:                             ; preds = %90
  %switch.maskindex201 = trunc nuw i32 %99 to i8
  %switch.shifted202 = lshr i8 99, %switch.maskindex201
  %switch.lobit203 = trunc i8 %switch.shifted202 to i1
  br i1 %switch.lobit203, label %switch.lookup200, label %110

switch.lookup200:                                 ; preds = %switch.hole_check199
  %101 = zext nneg i32 %99 to i64
  %switch.gep204 = getelementptr inbounds [7 x i32], ptr @switch.table._Z17convert_color_cpu10TensorDescPKv21ConvertColorParamSpecS_Pv.1, i64 0, i64 %101
  %switch.load205 = load i32, ptr %switch.gep204, align 4
  %102 = and i32 %.sroa.0146.0.extract.trunc, 29
  %103 = icmp eq i32 %102, 21
  br i1 %103, label %106, label %switch.early.test193

switch.early.test193:                             ; preds = %switch.lookup200
  %104 = add nsw i32 %.sroa.0146.0.extract.trunc, -11
  %switch.and194 = and i32 %104, -3
  %switch.selectcmp195 = icmp eq i32 %switch.and194, 0
  %105 = select i1 %switch.selectcmp195, float 2.550000e+02, float 1.000000e+00
  br label %106

106:                                              ; preds = %switch.lookup200, %switch.early.test193
  %.1 = phi float [ %105, %switch.early.test193 ], [ 2.550000e+02, %switch.lookup200 ]
  %107 = load i32, ptr %8, align 4, !tbaa !15
  switch i32 %107, label %110 [
    i32 6, label %108
    i32 0, label %109
  ]

108:                                              ; preds = %106
  call void @_ZL15rgb_to_yuv_nv21IfhEviiiiiiiiiifPKT_PT0_(i32 noundef %94, i32 noundef 0, i32 noundef %93, i32 noundef 0, i32 noundef %96, i32 noundef %93, i32 noundef %71, i32 noundef %91, i32 noundef 1, i32 noundef %switch.load205, float noundef %.1, ptr noundef %1, ptr noundef %5)
  br label %110

109:                                              ; preds = %106
  call void @_ZL15rgb_to_yuv_nv21IhhEviiiiiiiiiifPKT_PT0_(i32 noundef %94, i32 noundef 0, i32 noundef %93, i32 noundef 0, i32 noundef %96, i32 noundef %93, i32 noundef %71, i32 noundef %91, i32 noundef 1, i32 noundef %switch.load205, float noundef %.1, ptr noundef %1, ptr noundef %5)
  br label %110

110:                                              ; preds = %switch.hole_check199, %90, %switch.hole_check, %74, %73, %106, %86, %109, %108, %88, %89, %70
  %.1182 = phi i32 [ 2, %70 ], [ 0, %89 ], [ 0, %88 ], [ 0, %109 ], [ 0, %108 ], [ 51, %86 ], [ 51, %106 ], [ 51, %73 ], [ 51, %74 ], [ 51, %90 ], [ 51, %switch.hole_check ], [ 51, %switch.hole_check199 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  ret i32 %.1182
}

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15yuv_nv21_to_rgbIhfEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15yuv_nv21_to_rgbIhhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15rgb_to_yuv_nv21IfhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15rgb_to_yuv_nv21IhhEviiiiiiiiiifPKT_PT0_(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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 4}
!6 = !{!"_ZTS10TensorDesc", !7, i64 0, !10, i64 4, !11, i64 8, !8, i64 12}
!7 = !{!"_ZTS8DataType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS10DataFormat", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!7, !7, i64 0}


; Effective O3 passes: ConstantMergePass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass