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

; 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_fill_cl_msk_opc_t = type { %struct.arm_2d_op_core_t, %struct.anon.32, %struct.anon.33, i32, %union.anon.34, %union.anon.35 }
%struct.anon.32 = type { ptr, ptr }
%struct.anon.33 = type { ptr }
%union.anon.34 = type { i32 }
%union.anon.35 = type { i8 }

@ARM_2D_CTRL = external global %struct.__arm_2d_op_control, align 8

; 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: nounwind uwtable
declare dso_local void @__arm_2d_impl_cccn888_colour_filling_mask_x_mirror(ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i16 noundef signext, ptr noalias noundef, i32 noundef) #1

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

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

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

11:                                               ; preds = %10, %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 5
  %15 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %14, i32 0, i32 0
  %16 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %15, i32 0, i32 3
  %17 = load i8, ptr %16, align 2, !tbaa !12
  %18 = zext i8 %17 to i32
  %19 = icmp eq i32 107, %18
  br i1 %19, label %20, label %95

20:                                               ; preds = %11
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %21, i32 0, i32 5
  %23 = load i8, ptr %22, align 8, !tbaa !12
  %24 = zext i8 %23 to i32
  %25 = icmp eq i32 %24, 255
  br i1 %25, label %26, label %58

26:                                               ; preds = %20
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds %struct.anon.0, ptr %28, i32 0, i32 5
  %30 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.anon.0, ptr %34, i32 0, i32 5
  %36 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %36, i32 0, i32 2
  %38 = load i16, ptr %37, align 4, !tbaa !12
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.anon.0, ptr %40, i32 0, i32 5
  %42 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !12
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %struct.anon.0, ptr %46, i32 0, i32 5
  %48 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %48, i32 0, i32 2
  %50 = load i16, ptr %49, align 4, !tbaa !12
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 5
  %54 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %55, i32 0, i32 4
  %57 = load i32, ptr %56, align 4, !tbaa !12
  call void @__arm_2d_impl_cccn888_colour_filling_channel_mask_x_mirror(ptr noundef %32, i16 noundef signext %38, ptr noundef %44, i16 noundef signext %50, ptr noundef %54, i32 noundef %57)
  br label %94

58:                                               ; preds = %20
  %59 = load ptr, ptr %2, 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_t, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !12
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds %struct.anon.0, ptr %66, i32 0, i32 5
  %68 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %67, i32 0, i32 1
  %69 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %68, i32 0, i32 2
  %70 = load i16, ptr %69, align 4, !tbaa !12
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.anon.0, ptr %72, i32 0, i32 5
  %74 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !12
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %struct.anon.0, ptr %78, i32 0, i32 5
  %80 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %80, i32 0, i32 2
  %82 = load i16, ptr %81, align 4, !tbaa !12
  %83 = load ptr, ptr %2, 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_t, ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %87, i32 0, i32 4
  %89 = load i32, ptr %88, align 4, !tbaa !12
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %90, i32 0, i32 5
  %92 = load i8, ptr %91, align 8, !tbaa !12
  %93 = zext i8 %92 to i16
  call void @__arm_2d_impl_cccn888_colour_filling_channel_mask_x_mirror_opacity(ptr noundef %64, i16 noundef signext %70, ptr noundef %76, i16 noundef signext %82, ptr noundef %86, i32 noundef %89, i16 noundef zeroext %93)
  br label %94

94:                                               ; preds = %58, %26
  br label %170

95:                                               ; preds = %11
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %96, i32 0, i32 5
  %98 = load i8, ptr %97, align 8, !tbaa !12
  %99 = zext i8 %98 to i32
  %100 = icmp eq i32 %99, 255
  br i1 %100, label %101, label %133

101:                                              ; preds = %95
  %102 = load ptr, ptr %2, 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_t, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !12
  %108 = load ptr, ptr %2, 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_t, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %111, i32 0, i32 2
  %113 = load i16, ptr %112, align 4, !tbaa !12
  %114 = load ptr, ptr %2, 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_t, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !12
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds %struct.anon.0, ptr %121, i32 0, i32 5
  %123 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %123, i32 0, i32 2
  %125 = load i16, ptr %124, align 4, !tbaa !12
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds %struct.anon.0, ptr %127, i32 0, i32 5
  %129 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %130, i32 0, i32 4
  %132 = load i32, ptr %131, align 4, !tbaa !12
  call void @__arm_2d_impl_cccn888_colour_filling_mask_x_mirror(ptr noundef %107, i16 noundef signext %113, ptr noundef %119, i16 noundef signext %125, ptr noundef %129, i32 noundef %132)
  br label %169

133:                                              ; preds = %95
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.anon.0, ptr %135, i32 0, i32 5
  %137 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %136, i32 0, i32 1
  %138 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !12
  %140 = load ptr, ptr %2, 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_t, ptr %142, i32 0, i32 1
  %144 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %143, i32 0, i32 2
  %145 = load i16, ptr %144, align 4, !tbaa !12
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.anon.0, ptr %147, i32 0, i32 5
  %149 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !12
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.anon.0, ptr %153, i32 0, i32 5
  %155 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %154, i32 0, i32 0
  %156 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %155, i32 0, i32 2
  %157 = load i16, ptr %156, align 4, !tbaa !12
  %158 = load ptr, ptr %2, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.__arm_2d_sub_task_t, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds %struct.anon.0, ptr %159, i32 0, i32 5
  %161 = getelementptr inbounds %struct.__arm_2d_param_copy_t, ptr %160, i32 0, i32 2
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %162, i32 0, i32 4
  %164 = load i32, ptr %163, align 4, !tbaa !12
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.arm_2d_op_fill_cl_msk_opc_t, ptr %165, i32 0, i32 5
  %167 = load i8, ptr %166, align 8, !tbaa !12
  %168 = zext i8 %167 to i16
  call void @__arm_2d_impl_cccn888_colour_filling_mask_x_mirror_opacity(ptr noundef %139, i16 noundef signext %145, ptr noundef %151, i16 noundef signext %157, ptr noundef %161, i32 noundef %164, i16 noundef zeroext %168)
  br label %169

169:                                              ; preds = %133, %101
  br label %170

170:                                              ; preds = %169, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  ret i32 0
}

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @__arm_2d_cccn888_sw_colour_filling_with_mask_x_mirror_and_opacity(ptr noundef %0) local_unnamed_addr #0 {
  %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 %0, i64 24
  %6 = getelementptr inbounds i8, ptr %0, i64 38
  %7 = load i8, ptr %6, align 2, !tbaa !11
  %8 = icmp eq i8 %7, 107
  %9 = getelementptr inbounds i8, ptr %spec.store.select, i64 80
  %10 = load i8, ptr %9, align 8, !tbaa !11
  %11 = icmp eq i8 %10, -1
  %12 = getelementptr inbounds i8, ptr %0, i64 64
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %0, i64 76
  %15 = load i16, ptr %14, align 4, !tbaa !11
  %16 = load ptr, ptr %5, align 8, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %0, i64 36
  %18 = load i16, ptr %17, align 4, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  %20 = getelementptr inbounds i8, ptr %spec.store.select, i64 76
  %21 = load i32, ptr %20, align 4, !tbaa !11
  br i1 %8, label %22, label %26

22:                                               ; preds = %1
  br i1 %11, label %23, label %24

23:                                               ; preds = %22
  tail call void @__arm_2d_impl_cccn888_colour_filling_channel_mask_x_mirror(ptr noundef %13, i16 noundef signext %15, ptr noundef %16, i16 noundef signext %18, ptr noundef nonnull %19, i32 noundef %21)
  br label %30

24:                                               ; preds = %22
  %25 = zext i8 %10 to i16
  tail call void @__arm_2d_impl_cccn888_colour_filling_channel_mask_x_mirror_opacity(ptr noundef %13, i16 noundef signext %15, ptr noundef %16, i16 noundef signext %18, ptr noundef nonnull %19, i32 noundef %21, i16 noundef zeroext %25)
  br label %30

26:                                               ; preds = %1
  br i1 %11, label %27, label %28

27:                                               ; preds = %26
  tail call void @__arm_2d_impl_cccn888_colour_filling_mask_x_mirror(ptr noundef %13, i16 noundef signext %15, ptr noundef %16, i16 noundef signext %18, ptr noundef nonnull %19, i32 noundef %21)
  br label %30

28:                                               ; preds = %26
  %29 = zext i8 %10 to i16
  tail call void @__arm_2d_impl_cccn888_colour_filling_mask_x_mirror_opacity(ptr noundef %13, i16 noundef signext %15, ptr noundef %16, i16 noundef signext %18, ptr noundef nonnull %19, i32 noundef %21, i16 noundef zeroext %29)
  br label %30

30:                                               ; preds = %27, %28, %23, %24
  ret i32 0
}

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

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

attributes #0 = { 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" }

!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 = !{!9, !9, i64 0}


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