; LLVM IR from ARM-software/Arm-2D :: Library/Source/arm_2d_alpha_blending.ll_ (arm_2d_cccn888_sw_tile_copy_with_src_mask)

; 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.__arm_2d_op_control = type { %struct.anon.10 }
%struct.anon.10 = type { ptr, %struct.anon.11, %struct.anon.12, i16, i16, i16, i16, ptr, %union.anon.13 }
%struct.anon.11 = type { ptr, ptr }
%struct.anon.12 = type { ptr, ptr }
%union.anon.13 = type { %struct.arm_2d_op_trans_msk_opa_t }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.67, %struct.anon.68, %union.anon.69, %struct.anon.71, %struct.anon.72, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { %struct.anon.14, i64 }
%struct.anon.14 = type { ptr, ptr, %struct.anon.15, i8, %union.arm_2d_op_status_t, %struct.arm_2d_op_evt_t }
%struct.anon.15 = type { i8 }
%union.arm_2d_op_status_t = type { %struct.anon.16 }
%struct.anon.16 = type { i16 }
%struct.arm_2d_op_evt_t = type { ptr, ptr }
%struct.anon.67 = type { ptr, ptr }
%struct.anon.68 = type { ptr }
%union.anon.69 = type { %struct.anon.70 }
%struct.anon.70 = type { i32 }
%struct.anon.71 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.48, %union.anon.57, %union.anon.58 }
%union.anon.48 = type { %struct.anon.49 }
%struct.anon.49 = type { i8, %union.arm_2d_color_info_t, %union.anon.50 }
%union.arm_2d_color_info_t = type { %struct.anon.1 }
%struct.anon.1 = type { i8 }
%union.anon.50 = type { i16 }
%union.anon.57 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.3, %union.anon.4 }
%union.anon.3 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.4 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.58 = type { ptr }
%struct.anon.72 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.59, %struct.anon.60 }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.59 = type { i32 }
%struct.anon.60 = type { %struct.arm_2d_location_t, %struct.anon.61 }
%struct.anon.61 = type { %struct.arm_2d_region_t, %struct.arm_2d_tile_t }
%struct.__arm_2d_sub_task_t = type { %struct.anon.0 }
%struct.anon.0 = type <{ ptr, ptr, i8, i32, [3 x i8], %union.anon }>
%union.anon = type { %struct.__arm_2d_param_copy_orig_msk_t }
%struct.__arm_2d_param_copy_orig_msk_t = type { %union.anon.7, %struct.__arm_2d_tile_param_t, %struct.__arm_2d_tile_param_t }
%union.anon.7 = type { %struct.__arm_2d_param_copy_orig_t }
%struct.__arm_2d_param_copy_orig_t = type { %union.anon.6, %struct.__arm_2d_tile_param_t }
%union.anon.6 = type { %struct.__arm_2d_param_copy_t }
%struct.__arm_2d_param_copy_t = type { %struct.__arm_2d_tile_param_t, %struct.__arm_2d_tile_param_t, %struct.arm_2d_size_t }
%struct.__arm_2d_tile_param_t = type { ptr, i32, i16, %union.arm_2d_color_info_t, i8, %struct.arm_2d_region_t, %struct.arm_2d_region_t, ptr }
%struct.arm_2d_op_src_msk_t = type { %struct.arm_2d_op_core_t, %struct.anon.36, %struct.anon.37, i32, %struct.anon.38 }
%struct.anon.36 = type { ptr, ptr }
%struct.anon.37 = type { ptr }
%struct.anon.38 = type { ptr, ptr }
%struct.anon.79 = type { %union.arm_2d_color_info_t, %union.anon.80, i8, i8, %union.anon.82, %union.anon.86 }
%union.anon.80 = type { %struct.anon.81 }
%struct.anon.81 = type { i8 }
%union.anon.82 = type { %struct.anon.83 }
%struct.anon.83 = type { i8, i8 }
%union.anon.86 = type { [2 x ptr] }
%struct.__arm_2d_param_copy_msk_t = type { %union.anon.5, %struct.__arm_2d_tile_param_t, %struct.__arm_2d_tile_param_t }
%union.anon.5 = type { %struct.__arm_2d_param_copy_t }

@ARM_2D_CTRL = external global %struct.__arm_2d_op_control, align 8
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask = external hidden unnamed_addr constant [80 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_msk_copy_mirror(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_chn_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_chn_msk_copy_mirror(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i32 noundef) #2

declare ptr @arm_2d_tile_get_root(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @__arm_2d_cccn888_sw_tile_copy_with_src_mask(ptr noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %8, i32 0, i32 0
  %10 = getelementptr inbounds %struct.anon.0, ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %11, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp eq ptr null, %12
  br i1 %13, label %14, label %15

14:                                               ; preds = %1
  store ptr getelementptr inbounds (%struct.anon.10, ptr @ARM_2D_CTRL, i32 0, i32 8), ptr %4, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %14, %1
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.arm_2d_op_src_msk_t, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.arm_2d_op_core_t, ptr %17, i32 0, i32 0
  %19 = getelementptr inbounds %struct.anon.14, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !12
  %21 = getelementptr inbounds %struct.anon.79, ptr %20, i32 0, i32 0
  %22 = load i8, ptr %21, align 8
  %23 = lshr i8 %22, 1
  %24 = and i8 %23, 7
  %25 = zext i8 %24 to i32
  %26 = icmp eq i32 5, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %15
  br label %29

28:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 112, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #5
  unreachable

29:                                               ; preds = %27
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.arm_2d_op_src_msk_t, ptr %30, i32 0, i32 4
  %32 = getelementptr inbounds %struct.anon.38, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = icmp ne ptr null, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %29
  br label %37

36:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.6, i32 noundef 115, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #5
  unreachable

37:                                               ; preds = %35
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon.0, ptr %39, i32 0, i32 5
  %41 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %41, i32 0, i32 4
  %43 = load i8, ptr %42, align 1
  %44 = and i8 %43, 1
  %45 = icmp ne i8 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %37
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %422

47:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.arm_2d_op_src_msk_t, ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !23
  store i32 %50, ptr %6, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.arm_2d_op_src_msk_t, ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds %struct.anon.37, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = call ptr @arm_2d_tile_get_root(ptr noundef %54, ptr noundef null, ptr noundef null)
  store ptr %55, ptr %7, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = icmp ne ptr null, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %47
  br label %60

59:                                               ; preds = %47
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.6, i32 noundef 125, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #5
  unreachable

60:                                               ; preds = %58
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %struct.anon.49, ptr %62, i32 0, i32 1
  %64 = load i8, ptr %63, align 1, !tbaa !26
  %65 = zext i8 %64 to i32
  %66 = icmp eq i32 11, %65
  br i1 %66, label %67, label %184

67:                                               ; preds = %60
  %68 = load i32, ptr %6, align 4, !tbaa !24
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  br label %72

71:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.6, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #5
  unreachable

72:                                               ; preds = %70
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.anon.0, ptr %74, i32 0, i32 5
  %76 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %76, i32 0, i32 3
  %78 = load i8, ptr %77, align 2, !tbaa !26
  %79 = zext i8 %78 to i32
  %80 = icmp eq i32 107, %79
  br i1 %80, label %81, label %132

81:                                               ; preds = %72
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.anon.0, ptr %83, i32 0, i32 5
  %85 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !26
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %struct.anon.0, ptr %90, i32 0, i32 5
  %92 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %93, i32 0, i32 2
  %95 = load i16, ptr %94, align 4, !tbaa !26
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds %struct.anon.0, ptr %97, i32 0, i32 5
  %99 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !26
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds %struct.anon.0, ptr %103, i32 0, i32 5
  %105 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %105, i32 0, i32 2
  %107 = load i16, ptr %106, align 4, !tbaa !26
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.anon.0, ptr %109, i32 0, i32 5
  %111 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %111, i32 0, i32 5
  %113 = getelementptr inbounds %struct.arm_2d_region_t, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %struct.anon.0, ptr %115, i32 0, i32 5
  %117 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %117, i32 0, i32 1
  %119 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !26
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %121, i32 0, i32 0
  %123 = getelementptr inbounds %struct.anon.0, ptr %122, i32 0, i32 5
  %124 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %124, i32 0, i32 1
  %126 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %125, i32 0, i32 2
  %127 = load i16, ptr %126, align 4, !tbaa !26
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.anon.0, ptr %129, i32 0, i32 5
  %131 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %130, i32 0, i32 2
  call void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_chn_mask(ptr noundef %88, i16 noundef signext %95, ptr noundef %101, i16 noundef signext %107, ptr noundef %113, ptr noundef %120, i16 noundef signext %127, ptr noundef %131)
  br label %183

132:                                              ; preds = %72
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %struct.anon.0, ptr %134, i32 0, i32 5
  %136 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !26
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %struct.anon.0, ptr %141, i32 0, i32 5
  %143 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %144, i32 0, i32 2
  %146 = load i16, ptr %145, align 4, !tbaa !26
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds %struct.anon.0, ptr %148, i32 0, i32 5
  %150 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %149, i32 0, i32 1
  %151 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !26
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %struct.anon.0, ptr %154, i32 0, i32 5
  %156 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %156, i32 0, i32 2
  %158 = load i16, ptr %157, align 4, !tbaa !26
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds %struct.anon.0, ptr %160, i32 0, i32 5
  %162 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %162, i32 0, i32 5
  %164 = getelementptr inbounds %struct.arm_2d_region_t, ptr %163, i32 0, i32 1
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.anon.0, ptr %166, i32 0, i32 5
  %168 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !26
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds %struct.anon.0, ptr %173, i32 0, i32 5
  %175 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %175, i32 0, i32 1
  %177 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %176, i32 0, i32 2
  %178 = load i16, ptr %177, align 4, !tbaa !26
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds %struct.anon.0, ptr %180, i32 0, i32 5
  %182 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %181, i32 0, i32 2
  call void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_mask(ptr noundef %139, i16 noundef signext %146, ptr noundef %152, i16 noundef signext %158, ptr noundef %164, ptr noundef %171, i16 noundef signext %178, ptr noundef %182)
  br label %183

183:                                              ; preds = %132, %81
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %421

184:                                              ; preds = %60
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds %struct.anon.0, ptr %186, i32 0, i32 5
  %188 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %187, i32 0, i32 1
  %189 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %188, i32 0, i32 3
  %190 = load i8, ptr %189, align 2, !tbaa !26
  %191 = zext i8 %190 to i32
  %192 = icmp eq i32 107, %191
  br i1 %192, label %193, label %301

193:                                              ; preds = %184
  %194 = load i32, ptr %6, align 4, !tbaa !24
  %195 = and i32 %194, 12
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %249

197:                                              ; preds = %193
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %198, i32 0, i32 0
  %200 = getelementptr inbounds %struct.anon.0, ptr %199, i32 0, i32 5
  %201 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %200, i32 0, i32 0
  %202 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !26
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds %struct.anon.0, ptr %206, i32 0, i32 5
  %208 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %209, i32 0, i32 2
  %211 = load i16, ptr %210, align 4, !tbaa !26
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %212, i32 0, i32 0
  %214 = getelementptr inbounds %struct.anon.0, ptr %213, i32 0, i32 5
  %215 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %214, i32 0, i32 1
  %216 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !26
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %struct.anon.0, ptr %219, i32 0, i32 5
  %221 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %220, i32 0, i32 1
  %222 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %221, i32 0, i32 2
  %223 = load i16, ptr %222, align 4, !tbaa !26
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %224, i32 0, i32 0
  %226 = getelementptr inbounds %struct.anon.0, ptr %225, i32 0, i32 5
  %227 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %226, i32 0, i32 1
  %228 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %227, i32 0, i32 5
  %229 = getelementptr inbounds %struct.arm_2d_region_t, ptr %228, i32 0, i32 1
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds %struct.anon.0, ptr %231, i32 0, i32 5
  %233 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %233, i32 0, i32 1
  %235 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !26
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %237, i32 0, i32 0
  %239 = getelementptr inbounds %struct.anon.0, ptr %238, i32 0, i32 5
  %240 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %239, i32 0, i32 0
  %241 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %240, i32 0, i32 1
  %242 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %241, i32 0, i32 2
  %243 = load i16, ptr %242, align 4, !tbaa !26
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %244, i32 0, i32 0
  %246 = getelementptr inbounds %struct.anon.0, ptr %245, i32 0, i32 5
  %247 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %246, i32 0, i32 2
  %248 = load i32, ptr %6, align 4, !tbaa !24
  call void @__arm_2d_impl_cccn888_src_chn_msk_copy_mirror(ptr noundef %204, i16 noundef signext %211, ptr noundef %217, i16 noundef signext %223, ptr noundef %229, ptr noundef %236, i16 noundef signext %243, ptr noundef %247, i32 noundef %248)
  br label %300

249:                                              ; preds = %193
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds %struct.anon.0, ptr %251, i32 0, i32 5
  %253 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %252, i32 0, i32 0
  %254 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %253, i32 0, i32 0
  %255 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %254, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8, !tbaa !26
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %257, i32 0, i32 0
  %259 = getelementptr inbounds %struct.anon.0, ptr %258, i32 0, i32 5
  %260 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %259, i32 0, i32 0
  %261 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %261, i32 0, i32 2
  %263 = load i16, ptr %262, align 4, !tbaa !26
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %264, i32 0, i32 0
  %266 = getelementptr inbounds %struct.anon.0, ptr %265, i32 0, i32 5
  %267 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %266, i32 0, i32 1
  %268 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !26
  %270 = load ptr, ptr %3, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %270, i32 0, i32 0
  %272 = getelementptr inbounds %struct.anon.0, ptr %271, i32 0, i32 5
  %273 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %273, i32 0, i32 2
  %275 = load i16, ptr %274, align 4, !tbaa !26
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %276, i32 0, i32 0
  %278 = getelementptr inbounds %struct.anon.0, ptr %277, i32 0, i32 5
  %279 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %278, i32 0, i32 1
  %280 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %279, i32 0, i32 5
  %281 = getelementptr inbounds %struct.arm_2d_region_t, ptr %280, i32 0, i32 1
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %282, i32 0, i32 0
  %284 = getelementptr inbounds %struct.anon.0, ptr %283, i32 0, i32 5
  %285 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %284, i32 0, i32 0
  %286 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %285, i32 0, i32 1
  %287 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !26
  %289 = load ptr, ptr %3, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %289, i32 0, i32 0
  %291 = getelementptr inbounds %struct.anon.0, ptr %290, i32 0, i32 5
  %292 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %291, i32 0, i32 0
  %293 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %292, i32 0, i32 1
  %294 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %293, i32 0, i32 2
  %295 = load i16, ptr %294, align 4, !tbaa !26
  %296 = load ptr, ptr %3, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %296, i32 0, i32 0
  %298 = getelementptr inbounds %struct.anon.0, ptr %297, i32 0, i32 5
  %299 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %298, i32 0, i32 2
  call void @__arm_2d_impl_cccn888_src_chn_msk_copy(ptr noundef %256, i16 noundef signext %263, ptr noundef %269, i16 noundef signext %275, ptr noundef %281, ptr noundef %288, i16 noundef signext %295, ptr noundef %299)
  br label %300

300:                                              ; preds = %249, %197
  br label %420

301:                                              ; preds = %184
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %302, i32 0, i32 0
  %304 = getelementptr inbounds %struct.anon.0, ptr %303, i32 0, i32 5
  %305 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %304, i32 0, i32 1
  %306 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %305, i32 0, i32 3
  %307 = load i8, ptr %306, align 2, !tbaa !26
  %308 = zext i8 %307 to i32
  %309 = icmp eq i32 6, %308
  br i1 %309, label %310, label %311

310:                                              ; preds = %301
  br label %312

311:                                              ; preds = %301
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.6, i32 noundef 292, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #5
  unreachable

312:                                              ; preds = %310
  %313 = load i32, ptr %6, align 4, !tbaa !24
  %314 = and i32 %313, 12
  %315 = icmp ne i32 %314, 0
  br i1 %315, label %316, label %368

316:                                              ; preds = %312
  %317 = load ptr, ptr %3, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %317, i32 0, i32 0
  %319 = getelementptr inbounds %struct.anon.0, ptr %318, i32 0, i32 5
  %320 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %319, i32 0, i32 0
  %321 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %321, i32 0, i32 0
  %323 = load ptr, ptr %322, align 8, !tbaa !26
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %324, i32 0, i32 0
  %326 = getelementptr inbounds %struct.anon.0, ptr %325, i32 0, i32 5
  %327 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %326, i32 0, i32 0
  %328 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %327, i32 0, i32 0
  %329 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %328, i32 0, i32 2
  %330 = load i16, ptr %329, align 4, !tbaa !26
  %331 = load ptr, ptr %3, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.anon.0, ptr %332, i32 0, i32 5
  %334 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %333, i32 0, i32 1
  %335 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %334, i32 0, i32 0
  %336 = load ptr, ptr %335, align 8, !tbaa !26
  %337 = load ptr, ptr %3, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %337, i32 0, i32 0
  %339 = getelementptr inbounds %struct.anon.0, ptr %338, i32 0, i32 5
  %340 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %339, i32 0, i32 1
  %341 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %340, i32 0, i32 2
  %342 = load i16, ptr %341, align 4, !tbaa !26
  %343 = load ptr, ptr %3, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %343, i32 0, i32 0
  %345 = getelementptr inbounds %struct.anon.0, ptr %344, i32 0, i32 5
  %346 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %345, i32 0, i32 1
  %347 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %346, i32 0, i32 5
  %348 = getelementptr inbounds %struct.arm_2d_region_t, ptr %347, i32 0, i32 1
  %349 = load ptr, ptr %3, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %349, i32 0, i32 0
  %351 = getelementptr inbounds %struct.anon.0, ptr %350, i32 0, i32 5
  %352 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %351, i32 0, i32 0
  %353 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %352, i32 0, i32 1
  %354 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %353, i32 0, i32 0
  %355 = load ptr, ptr %354, align 8, !tbaa !26
  %356 = load ptr, ptr %3, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %356, i32 0, i32 0
  %358 = getelementptr inbounds %struct.anon.0, ptr %357, i32 0, i32 5
  %359 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %358, i32 0, i32 0
  %360 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %359, i32 0, i32 1
  %361 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %360, i32 0, i32 2
  %362 = load i16, ptr %361, align 4, !tbaa !26
  %363 = load ptr, ptr %3, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %363, i32 0, i32 0
  %365 = getelementptr inbounds %struct.anon.0, ptr %364, i32 0, i32 5
  %366 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %365, i32 0, i32 2
  %367 = load i32, ptr %6, align 4, !tbaa !24
  call void @__arm_2d_impl_cccn888_src_msk_copy_mirror(ptr noundef %323, i16 noundef signext %330, ptr noundef %336, i16 noundef signext %342, ptr noundef %348, ptr noundef %355, i16 noundef signext %362, ptr noundef %366, i32 noundef %367)
  br label %419

368:                                              ; preds = %312
  %369 = load ptr, ptr %3, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %369, i32 0, i32 0
  %371 = getelementptr inbounds %struct.anon.0, ptr %370, i32 0, i32 5
  %372 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %371, i32 0, i32 0
  %373 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %372, i32 0, i32 0
  %374 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %373, i32 0, i32 0
  %375 = load ptr, ptr %374, align 8, !tbaa !26
  %376 = load ptr, ptr %3, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %376, i32 0, i32 0
  %378 = getelementptr inbounds %struct.anon.0, ptr %377, i32 0, i32 5
  %379 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %378, i32 0, i32 0
  %380 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %379, i32 0, i32 0
  %381 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %380, i32 0, i32 2
  %382 = load i16, ptr %381, align 4, !tbaa !26
  %383 = load ptr, ptr %3, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %383, i32 0, i32 0
  %385 = getelementptr inbounds %struct.anon.0, ptr %384, i32 0, i32 5
  %386 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %385, i32 0, i32 1
  %387 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %386, i32 0, i32 0
  %388 = load ptr, ptr %387, align 8, !tbaa !26
  %389 = load ptr, ptr %3, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %389, i32 0, i32 0
  %391 = getelementptr inbounds %struct.anon.0, ptr %390, i32 0, i32 5
  %392 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %391, i32 0, i32 1
  %393 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %392, i32 0, i32 2
  %394 = load i16, ptr %393, align 4, !tbaa !26
  %395 = load ptr, ptr %3, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %395, i32 0, i32 0
  %397 = getelementptr inbounds %struct.anon.0, ptr %396, i32 0, i32 5
  %398 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %397, i32 0, i32 1
  %399 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %398, i32 0, i32 5
  %400 = getelementptr inbounds %struct.arm_2d_region_t, ptr %399, i32 0, i32 1
  %401 = load ptr, ptr %3, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %401, i32 0, i32 0
  %403 = getelementptr inbounds %struct.anon.0, ptr %402, i32 0, i32 5
  %404 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %403, i32 0, i32 0
  %405 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %404, i32 0, i32 1
  %406 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %405, i32 0, i32 0
  %407 = load ptr, ptr %406, align 8, !tbaa !26
  %408 = load ptr, ptr %3, align 8, !tbaa !5
  %409 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %408, i32 0, i32 0
  %410 = getelementptr inbounds %struct.anon.0, ptr %409, i32 0, i32 5
  %411 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %410, i32 0, i32 0
  %412 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %411, i32 0, i32 1
  %413 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %412, i32 0, i32 2
  %414 = load i16, ptr %413, align 4, !tbaa !26
  %415 = load ptr, ptr %3, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %415, i32 0, i32 0
  %417 = getelementptr inbounds %struct.anon.0, ptr %416, i32 0, i32 5
  %418 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %417, i32 0, i32 2
  call void @__arm_2d_impl_cccn888_src_msk_copy(ptr noundef %375, i16 noundef signext %382, ptr noundef %388, i16 noundef signext %394, ptr noundef %400, ptr noundef %407, i16 noundef signext %414, ptr noundef %418)
  br label %419

419:                                              ; preds = %368, %316
  br label %420

420:                                              ; preds = %419, %300
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %421

421:                                              ; preds = %420, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %422

422:                                              ; preds = %421, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %423 = load i32, ptr %2, align 4
  ret i32 %423
}

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_chn_mask(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_mask(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "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 }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"__arm_2d_sub_task_t", !11, i64 0}
!11 = !{!"", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !7, i64 24}
!12 = !{!13, !6, i64 8}
!13 = !{!"arm_2d_op_src_msk_t", !14, i64 0, !19, i64 48, !20, i64 64, !21, i64 72, !19, i64 80}
!14 = !{!"arm_2d_op_core_t", !15, i64 0, !18, i64 40}
!15 = !{!"", !6, i64 0, !6, i64 8, !16, i64 16, !7, i64 17, !7, i64 18, !17, i64 24}
!16 = !{!"", !7, i64 0}
!17 = !{!"arm_2d_op_evt_t", !6, i64 0, !6, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 8}
!20 = !{!"", !6, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!13, !6, i64 80}
!23 = !{!13, !21, i64 72}
!24 = !{!21, !21, i64 0}
!25 = !{!13, !6, i64 64}
!26 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.__arm_2d_op_control = type { %struct.anon.10 }
%struct.anon.10 = type { ptr, %struct.anon.11, %struct.anon.12, i16, i16, i16, i16, ptr, %union.anon.13 }
%struct.anon.11 = type { ptr, ptr }
%struct.anon.12 = type { ptr, ptr }
%union.anon.13 = type { %struct.arm_2d_op_trans_msk_opa_t }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.67, %struct.anon.68, %union.anon.69, %struct.anon.71, %struct.anon.72, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { %struct.anon.14, i64 }
%struct.anon.14 = type { ptr, ptr, %struct.anon.15, i8, %union.arm_2d_op_status_t, %struct.arm_2d_op_evt_t }
%struct.anon.15 = type { i8 }
%union.arm_2d_op_status_t = type { %struct.anon.16 }
%struct.anon.16 = type { i16 }
%struct.arm_2d_op_evt_t = type { ptr, ptr }
%struct.anon.67 = type { ptr, ptr }
%struct.anon.68 = type { ptr }
%union.anon.69 = type { %struct.anon.70 }
%struct.anon.70 = type { i32 }
%struct.anon.71 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.48, %union.anon.57, %union.anon.58 }
%union.anon.48 = type { %struct.anon.49 }
%struct.anon.49 = type { i8, %union.arm_2d_color_info_t, %union.anon.50 }
%union.arm_2d_color_info_t = type { %struct.anon.1 }
%struct.anon.1 = type { i8 }
%union.anon.50 = type { i16 }
%union.anon.57 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.3, %union.anon.4 }
%union.anon.3 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.4 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.58 = type { ptr }
%struct.anon.72 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.59, %struct.anon.60 }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.59 = type { i32 }
%struct.anon.60 = type { %struct.arm_2d_location_t, %struct.anon.61 }
%struct.anon.61 = type { %struct.arm_2d_region_t, %struct.arm_2d_tile_t }

@ARM_2D_CTRL = external local_unnamed_addr global %struct.__arm_2d_op_control, align 8
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask = external hidden unnamed_addr constant [80 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_msk_copy_mirror(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_chn_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_src_chn_msk_copy_mirror(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i32 noundef) local_unnamed_addr #1

declare ptr @arm_2d_tile_get_root(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2, 1) i32 @__arm_2d_cccn888_sw_tile_copy_with_src_mask(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  %spec.store.select = select i1 %4, ptr getelementptr inbounds (i8, ptr @ARM_2D_CTRL, i64 56), ptr %3
  %5 = getelementptr inbounds i8, ptr %spec.store.select, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = load i8, ptr %6, align 8
  %8 = and i8 %7, 14
  %9 = icmp eq i8 %8, 10
  br i1 %9, label %11, label %10

10:                                               ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 112, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #3
  unreachable

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %spec.store.select, i64 80
  %13 = load ptr, ptr %12, align 8, !tbaa !21
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %14, label %15

14:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, i32 noundef 115, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #3
  unreachable

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = getelementptr inbounds i8, ptr %0, i64 112
  %18 = getelementptr inbounds i8, ptr %0, i64 127
  %19 = load i8, ptr %18, align 1
  %20 = and i8 %19, 1
  %.not66 = icmp eq i8 %20, 0
  br i1 %.not66, label %21, label %89

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %spec.store.select, i64 72
  %23 = load i32, ptr %22, align 8, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %spec.store.select, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !23
  %26 = tail call ptr @arm_2d_tile_get_root(ptr noundef %25, ptr noundef null, ptr noundef null) #4
  %.not67 = icmp eq ptr %26, null
  br i1 %.not67, label %27, label %28

27:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6, i32 noundef 125, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #3
  unreachable

28:                                               ; preds = %21
  %29 = getelementptr inbounds i8, ptr %26, i64 1
  %30 = load i8, ptr %29, align 1, !tbaa !24
  %31 = icmp eq i8 %30, 11
  br i1 %31, label %32, label %53

32:                                               ; preds = %28
  %33 = icmp eq i32 %23, 0
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.6, i32 noundef 128, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #3
  unreachable

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %0, i64 126
  %37 = load i8, ptr %36, align 2, !tbaa !24
  %38 = icmp eq i8 %37, 107
  %39 = load ptr, ptr %16, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %0, i64 36
  %41 = load i16, ptr %40, align 4, !tbaa !24
  %42 = load ptr, ptr %17, align 8, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %0, i64 124
  %44 = load i16, ptr %43, align 4, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %0, i64 132
  %46 = getelementptr inbounds i8, ptr %0, i64 64
  %47 = load ptr, ptr %46, align 8, !tbaa !24
  %48 = getelementptr inbounds i8, ptr %0, i64 76
  %49 = load i16, ptr %48, align 4, !tbaa !24
  %50 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %38, label %51, label %52

51:                                               ; preds = %35
  tail call void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_chn_mask(ptr noundef %39, i16 noundef signext %41, ptr noundef %42, i16 noundef signext %44, ptr noundef nonnull %45, ptr noundef %47, i16 noundef signext %49, ptr noundef nonnull %50)
  br label %89

52:                                               ; preds = %35
  tail call void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_mask(ptr noundef %39, i16 noundef signext %41, ptr noundef %42, i16 noundef signext %44, ptr noundef nonnull %45, ptr noundef %47, i16 noundef signext %49, ptr noundef nonnull %50)
  br label %89

53:                                               ; preds = %28
  %54 = getelementptr inbounds i8, ptr %0, i64 126
  %55 = load i8, ptr %54, align 2, !tbaa !24
  switch i8 %55, label %72 [
    i8 107, label %56
    i8 6, label %73
  ]

56:                                               ; preds = %53
  %57 = and i32 %23, 12
  %.not69 = icmp eq i32 %57, 0
  %58 = load ptr, ptr %16, align 8, !tbaa !24
  %59 = getelementptr inbounds i8, ptr %0, i64 36
  %60 = load i16, ptr %59, align 4, !tbaa !24
  %61 = load ptr, ptr %17, align 8, !tbaa !24
  %62 = getelementptr inbounds i8, ptr %0, i64 124
  %63 = load i16, ptr %62, align 4, !tbaa !24
  %64 = getelementptr inbounds i8, ptr %0, i64 132
  %65 = getelementptr inbounds i8, ptr %0, i64 64
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %0, i64 76
  %68 = load i16, ptr %67, align 4, !tbaa !24
  %69 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not69, label %71, label %70

70:                                               ; preds = %56
  tail call void @__arm_2d_impl_cccn888_src_chn_msk_copy_mirror(ptr noundef %58, i16 noundef signext %60, ptr noundef %61, i16 noundef signext %63, ptr noundef nonnull %64, ptr noundef %66, i16 noundef signext %68, ptr noundef nonnull %69, i32 noundef %23)
  br label %89

71:                                               ; preds = %56
  tail call void @__arm_2d_impl_cccn888_src_chn_msk_copy(ptr noundef %58, i16 noundef signext %60, ptr noundef %61, i16 noundef signext %63, ptr noundef nonnull %64, ptr noundef %66, i16 noundef signext %68, ptr noundef nonnull %69)
  br label %89

72:                                               ; preds = %53
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.6, i32 noundef 292, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_src_mask) #3
  unreachable

73:                                               ; preds = %53
  %74 = and i32 %23, 12
  %.not68 = icmp eq i32 %74, 0
  %75 = load ptr, ptr %16, align 8, !tbaa !24
  %76 = getelementptr inbounds i8, ptr %0, i64 36
  %77 = load i16, ptr %76, align 4, !tbaa !24
  %78 = load ptr, ptr %17, align 8, !tbaa !24
  %79 = getelementptr inbounds i8, ptr %0, i64 124
  %80 = load i16, ptr %79, align 4, !tbaa !24
  %81 = getelementptr inbounds i8, ptr %0, i64 132
  %82 = getelementptr inbounds i8, ptr %0, i64 64
  %83 = load ptr, ptr %82, align 8, !tbaa !24
  %84 = getelementptr inbounds i8, ptr %0, i64 76
  %85 = load i16, ptr %84, align 4, !tbaa !24
  %86 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not68, label %88, label %87

87:                                               ; preds = %73
  tail call void @__arm_2d_impl_cccn888_src_msk_copy_mirror(ptr noundef %75, i16 noundef signext %77, ptr noundef %78, i16 noundef signext %80, ptr noundef nonnull %81, ptr noundef %83, i16 noundef signext %85, ptr noundef nonnull %86, i32 noundef %23)
  br label %89

88:                                               ; preds = %73
  tail call void @__arm_2d_impl_cccn888_src_msk_copy(ptr noundef %75, i16 noundef signext %77, ptr noundef %78, i16 noundef signext %80, ptr noundef nonnull %81, ptr noundef %83, i16 noundef signext %85, ptr noundef nonnull %86)
  br label %89

89:                                               ; preds = %52, %51, %87, %88, %70, %71, %15
  %.1 = phi i32 [ -2, %15 ], [ 0, %71 ], [ 0, %70 ], [ 0, %88 ], [ 0, %87 ], [ 0, %51 ], [ 0, %52 ]
  ret i32 %.1
}

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_chn_mask(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @__arm_2d_impl_ccca8888_tile_copy_to_cccn888_with_src_mask(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef, i16 noundef signext, ptr noalias noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { noreturn nounwind }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 8}
!6 = !{!"__arm_2d_sub_task_t", !7, i64 0}
!7 = !{!"", !8, i64 0, !8, i64 8, !9, i64 16, !9, i64 17, !9, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !8, i64 8}
!12 = !{!"arm_2d_op_src_msk_t", !13, i64 0, !18, i64 48, !19, i64 64, !20, i64 72, !18, i64 80}
!13 = !{!"arm_2d_op_core_t", !14, i64 0, !17, i64 40}
!14 = !{!"", !8, i64 0, !8, i64 8, !15, i64 16, !9, i64 17, !9, i64 18, !16, i64 24}
!15 = !{!"", !9, i64 0}
!16 = !{!"arm_2d_op_evt_t", !8, i64 0, !8, i64 8}
!17 = !{!"long", !9, i64 0}
!18 = !{!"", !8, i64 0, !8, i64 8}
!19 = !{!"", !8, i64 0}
!20 = !{!"int", !9, i64 0}
!21 = !{!12, !8, i64 80}
!22 = !{!12, !20, i64 72}
!23 = !{!12, !8, i64 64}
!24 = !{!9, !9, i64 0}


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