; LLVM IR from ARM-software/Arm-2D :: Library/Source/arm_2d_alpha_blending.ll_ (arm_2d_cccn888_sw_tile_copy_with_des_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.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_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_des_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef) #2

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @__arm_2d_cccn888_sw_tile_copy_with_des_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
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %7, i32 0, i32 0
  %9 = getelementptr inbounds %struct.anon.0, ptr %8, i32 0, i32 1
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %10, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp eq ptr null, %11
  br i1 %12, label %13, label %14

13:                                               ; 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 %14

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

26:                                               ; preds = %14
  br label %28

27:                                               ; preds = %14
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 338, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #4
  unreachable

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

34:                                               ; preds = %28
  br label %36

35:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.6, i32 noundef 341, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #4
  unreachable

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

45:                                               ; preds = %36
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %433

46:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.arm_2d_op_src_msk_t, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 8, !tbaa !23
  store i32 %49, ptr %6, align 4, !tbaa !24
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 5
  %53 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %53, i32 0, i32 3
  %55 = load i8, ptr %54, align 2, !tbaa !25
  %56 = zext i8 %55 to i32
  %57 = icmp eq i32 107, %56
  br i1 %57, label %58, label %186

58:                                               ; preds = %46
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 5
  %62 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %61, i32 0, i32 2
  %63 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %62, i32 0, i32 5
  %64 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.arm_2d_size_t, ptr %64, i32 0, i32 1
  %66 = load i16, ptr %65, align 2, !tbaa !25
  %67 = sext i16 %66 to i32
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %struct.anon.0, ptr %69, i32 0, i32 5
  %71 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %70, i32 0, i32 2
  %72 = getelementptr inbounds %struct.arm_2d_size_t, ptr %71, i32 0, i32 1
  %73 = load i16, ptr %72, align 2, !tbaa !25
  %74 = sext i16 %73 to i32
  %75 = icmp sge i32 %67, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %58
  br label %78

77:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.6, i32 noundef 359, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #4
  unreachable

78:                                               ; preds = %76
  %79 = load i32, ptr %6, align 4, !tbaa !24
  %80 = and i32 %79, 12
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %134

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

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

185:                                              ; preds = %134, %82
  br label %432

186:                                              ; preds = %46
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds %struct.anon.0, ptr %188, i32 0, i32 5
  %190 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %189, i32 0, i32 2
  %191 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %190, i32 0, i32 3
  %192 = load i8, ptr %191, align 2, !tbaa !25
  %193 = zext i8 %192 to i32
  %194 = icmp eq i32 6, %193
  br i1 %194, label %195, label %196

195:                                              ; preds = %186
  br label %197

196:                                              ; preds = %186
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.6, i32 noundef 407, ptr noundef @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #4
  unreachable

197:                                              ; preds = %195
  %198 = load i32, ptr %6, align 4, !tbaa !24
  %199 = and i32 %198, 12
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %317

201:                                              ; preds = %197
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %202, i32 0, i32 0
  %204 = getelementptr inbounds %struct.anon.0, ptr %203, i32 0, i32 5
  %205 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %204, i32 0, i32 2
  %206 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %205, i32 0, i32 5
  %207 = getelementptr inbounds %struct.arm_2d_region_t, ptr %206, i32 0, i32 1
  %208 = getelementptr inbounds %struct.arm_2d_size_t, ptr %207, i32 0, i32 1
  %209 = load i16, ptr %208, align 2, !tbaa !25
  %210 = sext i16 %209 to i32
  %211 = icmp sgt i32 %210, 1
  br i1 %211, label %212, label %264

212:                                              ; preds = %201
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds %struct.anon.0, ptr %214, i32 0, i32 5
  %216 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %216, i32 0, i32 0
  %218 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %217, i32 0, i32 0
  %219 = load ptr, ptr %218, align 8, !tbaa !25
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %220, i32 0, i32 0
  %222 = getelementptr inbounds %struct.anon.0, ptr %221, i32 0, i32 5
  %223 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %223, i32 0, i32 0
  %225 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %224, i32 0, i32 2
  %226 = load i16, ptr %225, align 4, !tbaa !25
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %227, i32 0, i32 0
  %229 = getelementptr inbounds %struct.anon.0, ptr %228, i32 0, i32 5
  %230 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %230, i32 0, i32 1
  %232 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !25
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %234, i32 0, i32 0
  %236 = getelementptr inbounds %struct.anon.0, ptr %235, i32 0, i32 5
  %237 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %236, i32 0, i32 0
  %238 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %237, i32 0, i32 1
  %239 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %238, i32 0, i32 2
  %240 = load i16, ptr %239, align 4, !tbaa !25
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %241, i32 0, i32 0
  %243 = getelementptr inbounds %struct.anon.0, ptr %242, i32 0, i32 5
  %244 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %243, i32 0, i32 2
  %245 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !25
  %247 = load ptr, ptr %3, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %247, i32 0, i32 0
  %249 = getelementptr inbounds %struct.anon.0, ptr %248, i32 0, i32 5
  %250 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %249, i32 0, i32 2
  %251 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %250, i32 0, i32 2
  %252 = load i16, ptr %251, align 4, !tbaa !25
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %253, i32 0, i32 0
  %255 = getelementptr inbounds %struct.anon.0, ptr %254, i32 0, i32 5
  %256 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %255, i32 0, i32 2
  %257 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %256, i32 0, i32 5
  %258 = getelementptr inbounds %struct.arm_2d_region_t, ptr %257, i32 0, i32 1
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %259, i32 0, i32 0
  %261 = getelementptr inbounds %struct.anon.0, ptr %260, i32 0, i32 5
  %262 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %261, i32 0, i32 2
  %263 = load i32, ptr %6, align 4, !tbaa !24
  call void @__arm_2d_impl_cccn888_des_msk_copy_mirror(ptr noundef %219, i16 noundef signext %226, ptr noundef %233, i16 noundef signext %240, ptr noundef %246, i16 noundef signext %252, ptr noundef %258, ptr noundef %262, i32 noundef %263)
  br label %316

264:                                              ; preds = %201
  %265 = load ptr, ptr %3, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds %struct.anon.0, ptr %266, i32 0, i32 5
  %268 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %268, i32 0, i32 0
  %270 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %269, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8, !tbaa !25
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %272, i32 0, i32 0
  %274 = getelementptr inbounds %struct.anon.0, ptr %273, i32 0, i32 5
  %275 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %274, i32 0, i32 0
  %276 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %275, i32 0, i32 0
  %277 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %276, i32 0, i32 2
  %278 = load i16, ptr %277, align 4, !tbaa !25
  %279 = load ptr, ptr %3, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %279, i32 0, i32 0
  %281 = getelementptr inbounds %struct.anon.0, ptr %280, i32 0, i32 5
  %282 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %281, i32 0, i32 0
  %283 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %282, i32 0, i32 1
  %284 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !25
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %286, i32 0, i32 0
  %288 = getelementptr inbounds %struct.anon.0, ptr %287, i32 0, i32 5
  %289 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %288, i32 0, i32 0
  %290 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %289, i32 0, i32 1
  %291 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %290, i32 0, i32 2
  %292 = load i16, ptr %291, align 4, !tbaa !25
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %293, i32 0, i32 0
  %295 = getelementptr inbounds %struct.anon.0, ptr %294, i32 0, i32 5
  %296 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %295, i32 0, i32 2
  %297 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !25
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %299, i32 0, i32 0
  %301 = getelementptr inbounds %struct.anon.0, ptr %300, i32 0, i32 5
  %302 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %301, i32 0, i32 2
  %303 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %302, i32 0, i32 2
  %304 = load i16, ptr %303, align 4, !tbaa !25
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %305, i32 0, i32 0
  %307 = getelementptr inbounds %struct.anon.0, ptr %306, i32 0, i32 5
  %308 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %307, i32 0, i32 2
  %309 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %308, i32 0, i32 5
  %310 = getelementptr inbounds %struct.arm_2d_region_t, ptr %309, i32 0, i32 1
  %311 = load ptr, ptr %3, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %311, i32 0, i32 0
  %313 = getelementptr inbounds %struct.anon.0, ptr %312, i32 0, i32 5
  %314 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %313, i32 0, i32 2
  %315 = load i32, ptr %6, align 4, !tbaa !24
  call void @__arm_2d_impl_cccn888_1h_des_msk_copy_mirror(ptr noundef %271, i16 noundef signext %278, ptr noundef %285, i16 noundef signext %292, ptr noundef %298, i16 noundef signext %304, ptr noundef %310, ptr noundef %314, i32 noundef %315)
  br label %316

316:                                              ; preds = %264, %212
  br label %431

317:                                              ; preds = %197
  %318 = load ptr, ptr %3, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %318, i32 0, i32 0
  %320 = getelementptr inbounds %struct.anon.0, ptr %319, i32 0, i32 5
  %321 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %320, i32 0, i32 2
  %322 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %321, i32 0, i32 5
  %323 = getelementptr inbounds %struct.arm_2d_region_t, ptr %322, i32 0, i32 1
  %324 = getelementptr inbounds %struct.arm_2d_size_t, ptr %323, i32 0, i32 1
  %325 = load i16, ptr %324, align 2, !tbaa !25
  %326 = sext i16 %325 to i32
  %327 = icmp sgt i32 %326, 1
  br i1 %327, label %328, label %379

328:                                              ; preds = %317
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %329, i32 0, i32 0
  %331 = getelementptr inbounds %struct.anon.0, ptr %330, i32 0, i32 5
  %332 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %332, i32 0, i32 0
  %334 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %333, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8, !tbaa !25
  %336 = load ptr, ptr %3, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %336, i32 0, i32 0
  %338 = getelementptr inbounds %struct.anon.0, ptr %337, i32 0, i32 5
  %339 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %338, i32 0, i32 0
  %340 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %339, i32 0, i32 0
  %341 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %340, i32 0, i32 2
  %342 = load i16, ptr %341, align 4, !tbaa !25
  %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 0
  %347 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %346, i32 0, i32 1
  %348 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %347, i32 0, i32 0
  %349 = load ptr, ptr %348, align 8, !tbaa !25
  %350 = load ptr, ptr %3, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %350, i32 0, i32 0
  %352 = getelementptr inbounds %struct.anon.0, ptr %351, i32 0, i32 5
  %353 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %352, i32 0, i32 0
  %354 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %353, i32 0, i32 1
  %355 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %354, i32 0, i32 2
  %356 = load i16, ptr %355, align 4, !tbaa !25
  %357 = load ptr, ptr %3, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %357, i32 0, i32 0
  %359 = getelementptr inbounds %struct.anon.0, ptr %358, i32 0, i32 5
  %360 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %359, i32 0, i32 2
  %361 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %360, i32 0, i32 0
  %362 = load ptr, ptr %361, align 8, !tbaa !25
  %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_msk_t, ptr %365, i32 0, i32 2
  %367 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %366, i32 0, i32 2
  %368 = load i16, ptr %367, align 4, !tbaa !25
  %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 2
  %373 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %372, i32 0, i32 5
  %374 = getelementptr inbounds %struct.arm_2d_region_t, ptr %373, i32 0, i32 1
  %375 = load ptr, ptr %3, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %375, i32 0, i32 0
  %377 = getelementptr inbounds %struct.anon.0, ptr %376, i32 0, i32 5
  %378 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %377, i32 0, i32 2
  call void @__arm_2d_impl_cccn888_des_msk_copy(ptr noundef %335, i16 noundef signext %342, ptr noundef %349, i16 noundef signext %356, ptr noundef %362, i16 noundef signext %368, ptr noundef %374, ptr noundef %378)
  br label %430

379:                                              ; preds = %317
  %380 = load ptr, ptr %3, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %380, i32 0, i32 0
  %382 = getelementptr inbounds %struct.anon.0, ptr %381, i32 0, i32 5
  %383 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %382, i32 0, i32 0
  %384 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %383, i32 0, i32 0
  %385 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %384, i32 0, i32 0
  %386 = load ptr, ptr %385, align 8, !tbaa !25
  %387 = load ptr, ptr %3, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %387, i32 0, i32 0
  %389 = getelementptr inbounds %struct.anon.0, ptr %388, i32 0, i32 5
  %390 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %389, i32 0, i32 0
  %391 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %390, i32 0, i32 0
  %392 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %391, i32 0, i32 2
  %393 = load i16, ptr %392, align 4, !tbaa !25
  %394 = load ptr, ptr %3, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %394, i32 0, i32 0
  %396 = getelementptr inbounds %struct.anon.0, ptr %395, i32 0, i32 5
  %397 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %396, i32 0, i32 0
  %398 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %397, i32 0, i32 1
  %399 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %398, i32 0, i32 0
  %400 = load ptr, ptr %399, align 8, !tbaa !25
  %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 2
  %407 = load i16, ptr %406, align 4, !tbaa !25
  %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 2
  %412 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %411, i32 0, i32 0
  %413 = load ptr, ptr %412, align 8, !tbaa !25
  %414 = load ptr, ptr %3, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %414, i32 0, i32 0
  %416 = getelementptr inbounds %struct.anon.0, ptr %415, i32 0, i32 5
  %417 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %416, i32 0, i32 2
  %418 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %417, i32 0, i32 2
  %419 = load i16, ptr %418, align 4, !tbaa !25
  %420 = load ptr, ptr %3, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %420, i32 0, i32 0
  %422 = getelementptr inbounds %struct.anon.0, ptr %421, i32 0, i32 5
  %423 = getelementptr inbounds %struct.__arm_2d_param_copy_msk_t, ptr %422, i32 0, i32 2
  %424 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %423, i32 0, i32 5
  %425 = getelementptr inbounds %struct.arm_2d_region_t, ptr %424, i32 0, i32 1
  %426 = load ptr, ptr %3, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %426, i32 0, i32 0
  %428 = getelementptr inbounds %struct.anon.0, ptr %427, i32 0, i32 5
  %429 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %428, i32 0, i32 2
  call void @__arm_2d_impl_cccn888_1h_des_msk_copy(ptr noundef %386, i16 noundef signext %393, ptr noundef %400, i16 noundef signext %407, ptr noundef %413, i16 noundef signext %419, ptr noundef %425, ptr noundef %429)
  br label %430

430:                                              ; preds = %379, %328
  br label %431

431:                                              ; preds = %430, %316
  br label %432

432:                                              ; preds = %431, %185
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %433

433:                                              ; preds = %432, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %434 = load i32, ptr %2, align 4
  ret i32 %434
}

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 = { nounwind }
attributes #4 = { 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 88}
!23 = !{!13, !21, i64 72}
!24 = !{!21, !21, i64 0}
!25 = !{!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.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_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_des_msk_copy(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, ptr noalias noundef) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2, 1) i32 @__arm_2d_cccn888_sw_tile_copy_with_des_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 338, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #2
  unreachable

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %spec.store.select, i64 88
  %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.11, ptr noundef nonnull @.str.6, i32 noundef 341, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #2
  unreachable

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

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 %0, i64 166
  %25 = load i8, ptr %24, align 2, !tbaa !23
  switch i8 %25, label %48 [
    i8 107, label %26
    i8 6, label %49
  ]

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %0, i64 172
  %28 = getelementptr inbounds i8, ptr %0, i64 174
  %29 = load i16, ptr %28, align 2, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %0, i64 104
  %31 = getelementptr inbounds i8, ptr %0, i64 106
  %32 = load i16, ptr %31, align 2, !tbaa !23
  %.not68 = icmp slt i16 %29, %32
  br i1 %.not68, label %33, label %34

33:                                               ; preds = %26
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.6, i32 noundef 359, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #2
  unreachable

34:                                               ; preds = %26
  %35 = and i32 %23, 12
  %.not69 = icmp eq i32 %35, 0
  %36 = load ptr, ptr %16, align 8, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %0, i64 36
  %38 = load i16, ptr %37, align 4, !tbaa !23
  %39 = getelementptr inbounds i8, ptr %0, i64 64
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %0, i64 76
  %42 = load i16, ptr %41, align 4, !tbaa !23
  %43 = load ptr, ptr %17, align 8, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %0, i64 164
  %45 = load i16, ptr %44, align 4, !tbaa !23
  br i1 %.not69, label %47, label %46

46:                                               ; preds = %34
  tail call void @__arm_2d_impl_cccn888_des_chn_msk_copy_mirror(ptr noundef %36, i16 noundef signext %38, ptr noundef %40, i16 noundef signext %42, ptr noundef %43, i16 noundef signext %45, ptr noundef nonnull %27, ptr noundef nonnull %30, i32 noundef %23)
  br label %72

47:                                               ; preds = %34
  tail call void @__arm_2d_impl_cccn888_des_chn_msk_copy(ptr noundef %36, i16 noundef signext %38, ptr noundef %40, i16 noundef signext %42, ptr noundef %43, i16 noundef signext %45, ptr noundef nonnull %27, ptr noundef nonnull %30)
  br label %72

48:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.6, i32 noundef 407, ptr noundef nonnull @__PRETTY_FUNCTION__.__arm_2d_cccn888_sw_tile_copy_with_des_mask) #2
  unreachable

49:                                               ; preds = %21
  %50 = and i32 %23, 12
  %.not67 = icmp eq i32 %50, 0
  %51 = getelementptr inbounds i8, ptr %0, i64 172
  %52 = getelementptr inbounds i8, ptr %0, i64 174
  %53 = load i16, ptr %52, align 2, !tbaa !23
  %54 = icmp sgt i16 %53, 1
  %55 = load ptr, ptr %16, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %0, i64 36
  %57 = load i16, ptr %56, align 4, !tbaa !23
  %58 = getelementptr inbounds i8, ptr %0, i64 64
  %59 = load ptr, ptr %58, align 8, !tbaa !23
  %60 = getelementptr inbounds i8, ptr %0, i64 76
  %61 = load i16, ptr %60, align 4, !tbaa !23
  %62 = load ptr, ptr %17, align 8, !tbaa !23
  %63 = getelementptr inbounds i8, ptr %0, i64 164
  %64 = load i16, ptr %63, align 4, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not67, label %69, label %66

66:                                               ; preds = %49
  br i1 %54, label %67, label %68

67:                                               ; preds = %66
  tail call void @__arm_2d_impl_cccn888_des_msk_copy_mirror(ptr noundef %55, i16 noundef signext %57, ptr noundef %59, i16 noundef signext %61, ptr noundef %62, i16 noundef signext %64, ptr noundef nonnull %51, ptr noundef nonnull %65, i32 noundef %23)
  br label %72

68:                                               ; preds = %66
  tail call void @__arm_2d_impl_cccn888_1h_des_msk_copy_mirror(ptr noundef %55, i16 noundef signext %57, ptr noundef %59, i16 noundef signext %61, ptr noundef %62, i16 noundef signext %64, ptr noundef nonnull %51, ptr noundef nonnull %65, i32 noundef %23)
  br label %72

69:                                               ; preds = %49
  br i1 %54, label %70, label %71

70:                                               ; preds = %69
  tail call void @__arm_2d_impl_cccn888_des_msk_copy(ptr noundef %55, i16 noundef signext %57, ptr noundef %59, i16 noundef signext %61, ptr noundef %62, i16 noundef signext %64, ptr noundef nonnull %51, ptr noundef nonnull %65)
  br label %72

71:                                               ; preds = %69
  tail call void @__arm_2d_impl_cccn888_1h_des_msk_copy(ptr noundef %55, i16 noundef signext %57, ptr noundef %59, i16 noundef signext %61, ptr noundef %62, i16 noundef signext %64, ptr noundef nonnull %51, ptr noundef nonnull %65)
  br label %72

72:                                               ; preds = %47, %46, %70, %71, %67, %68, %15
  %.0 = phi i32 [ -2, %15 ], [ 0, %68 ], [ 0, %67 ], [ 0, %71 ], [ 0, %70 ], [ 0, %46 ], [ 0, %47 ]
  ret i32 %.0
}

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 = { 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, !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 88}
!22 = !{!12, !20, i64 72}
!23 = !{!9, !9, i64 0}


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