; LLVM IR from ARM-software/Arm-2D :: Helper/Source/arm_2d_helper_shape.ll_ (draw_round_corner_image)

; 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_margin_t = type { i8, i8, i8, i8 }
%struct.arm_2d_tile_t = type { %union.anon, %union.anon.9, %union.anon.12 }
%union.anon = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.2 }
%union.arm_2d_color_info_t = type { %struct.anon.0 }
%struct.anon.0 = type { i8 }
%union.anon.2 = type { i16 }
%union.anon.9 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.11 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.12 = type { ptr }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__.__draw_round_corner_image = external hidden unnamed_addr constant [141 x i8], align 1

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare ptr @arm_2d_get_default_frame_buffer() #4

declare ptr @arm_2d_tile_generate_child(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #4

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

declare zeroext i1 @arm_2d_helper_pfb_is_region_being_drawing(ptr noundef, ptr noundef, ptr noundef) #4

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @__draw_round_corner_image(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3, i8 noundef zeroext %4, ptr noundef %5) #5 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i16, align 2
  %14 = alloca i16, align 2
  %15 = alloca %struct.arm_2d_margin_t, align 1
  %16 = alloca ptr, align 8
  %17 = alloca %struct.arm_2d_margin_t, align 1
  %18 = alloca i32, align 4
  %19 = alloca %struct.arm_2d_tile_t, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %struct.arm_2d_region_t, align 2
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %struct.arm_2d_region_t, align 2
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i16, align 2
  %29 = alloca i16, align 2
  %30 = alloca %struct.arm_2d_tile_t, align 8
  %31 = alloca %struct.arm_2d_tile_t, align 8
  %32 = alloca %struct.arm_2d_region_t, align 2
  %33 = alloca ptr, align 8
  %34 = alloca %struct.arm_2d_region_t, align 2
  %35 = alloca ptr, align 8
  %36 = alloca i8, align 1
  %37 = alloca %struct.arm_2d_tile_t, align 8
  %38 = alloca %struct.arm_2d_tile_t, align 8
  %39 = alloca %struct.arm_2d_region_t, align 2
  %40 = alloca ptr, align 8
  %41 = alloca %struct.arm_2d_region_t, align 2
  %42 = alloca ptr, align 8
  %43 = alloca i16, align 2
  %44 = alloca i8, align 1
  %45 = alloca %struct.arm_2d_region_t, align 2
  %46 = alloca ptr, align 8
  %47 = alloca %struct.arm_2d_region_t, align 2
  %48 = alloca ptr, align 8
  %49 = alloca i16, align 2
  %50 = alloca %struct.arm_2d_tile_t, align 8
  %51 = alloca i8, align 1
  %52 = alloca %struct.arm_2d_region_t, align 2
  %53 = alloca ptr, align 8
  %54 = alloca %struct.arm_2d_region_t, align 2
  %55 = alloca ptr, align 8
  %56 = alloca i16, align 2
  %57 = alloca %struct.arm_2d_tile_t, align 8
  %58 = alloca i8, align 1
  %59 = alloca %struct.arm_2d_tile_t, align 8
  %60 = alloca %struct.arm_2d_tile_t, align 8
  %61 = alloca %struct.arm_2d_region_t, align 2
  %62 = alloca ptr, align 8
  %63 = alloca %struct.arm_2d_region_t, align 2
  %64 = alloca ptr, align 8
  %65 = alloca i16, align 2
  %66 = alloca i8, align 1
  %67 = alloca %struct.arm_2d_tile_t, align 8
  %68 = alloca %struct.arm_2d_tile_t, align 8
  %69 = alloca %struct.arm_2d_region_t, align 2
  %70 = alloca ptr, align 8
  %71 = alloca %struct.arm_2d_region_t, align 2
  %72 = alloca ptr, align 8
  %73 = alloca i16, align 2
  %74 = alloca i8, align 1
  %75 = alloca %struct.arm_2d_region_t, align 2
  %76 = alloca ptr, align 8
  %77 = alloca %struct.arm_2d_region_t, align 2
  %78 = alloca ptr, align 8
  %79 = alloca i16, align 2
  %80 = alloca %struct.arm_2d_tile_t, align 8
  %81 = alloca i8, align 1
  %82 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  %83 = zext i1 %3 to i8
  store i8 %83, ptr %10, align 1, !tbaa !9
  store i8 %4, ptr %11, align 1, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !5
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = icmp ne ptr null, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %6
  br label %88

87:                                               ; preds = %6
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 211, ptr noundef @__PRETTY_FUNCTION__.__draw_round_corner_image) #6
  unreachable

88:                                               ; preds = %86
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = icmp ne ptr null, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %88
  br label %93

92:                                               ; preds = %88
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 212, ptr noundef @__PRETTY_FUNCTION__.__draw_round_corner_image) #6
  unreachable

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #7
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct.arm_2d_region_t, ptr %95, i32 0, i32 1
  %97 = getelementptr inbounds %struct.arm_2d_size_t, ptr %96, i32 0, i32 0
  %98 = load i16, ptr %97, align 4, !tbaa !11
  %99 = sext i16 %98 to i32
  %100 = add nsw i32 %99, 1
  %101 = ashr i32 %100, 1
  %102 = trunc i32 %101 to i16
  store i16 %102, ptr %13, align 2, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #7
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds %struct.arm_2d_region_t, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.arm_2d_size_t, ptr %105, i32 0, i32 1
  %107 = load i16, ptr %106, align 2, !tbaa !11
  %108 = sext i16 %107 to i32
  %109 = add nsw i32 %108, 1
  %110 = ashr i32 %109, 1
  %111 = trunc i32 %110 to i16
  store i16 %111, ptr %14, align 2, !tbaa !12
  %112 = load i8, ptr %10, align 1, !tbaa !9, !range !14, !noundef !15
  %113 = trunc i8 %112 to i1
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %16, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %1170, %93
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %115, i32 1
  store ptr %116, ptr %16, align 8, !tbaa !5
  %117 = icmp eq ptr %115, null
  br i1 %117, label %118, label %123

118:                                              ; preds = %114
  %119 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 0
  store i8 0, ptr %119, align 1, !tbaa !16
  %120 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 1
  store i8 0, ptr %120, align 1, !tbaa !18
  %121 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 2
  store i8 0, ptr %121, align 1, !tbaa !19
  %122 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 3
  store i8 0, ptr %122, align 1, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %15, ptr align 1 %17, i64 4, i1 false), !tbaa.struct !21
  br label %124

123:                                              ; preds = %114
  br label %124

124:                                              ; preds = %123, %118
  %125 = phi i32 [ 1, %118 ], [ 0, %123 ]
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %1171

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %1168, %128
  %130 = load ptr, ptr %20, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %130, i32 1
  store ptr %131, ptr %20, align 8, !tbaa !5
  %132 = icmp eq ptr %130, null
  br i1 %132, label %133, label %204

133:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.memset.p0.i64(ptr align 2 %21, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %134, ptr %22, align 8, !tbaa !5
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = icmp eq ptr null, %135
  br i1 %136, label %137, label %143

137:                                              ; preds = %133
  %138 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %138, ptr %22, align 8, !tbaa !5
  %139 = load ptr, ptr %22, align 8, !tbaa !5
  %140 = icmp eq ptr null, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %137
  store i32 4, ptr %18, align 4
  br label %200

142:                                              ; preds = %137
  br label %143

143:                                              ; preds = %142, %133
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = icmp eq ptr null, %144
  br i1 %145, label %146, label %151

146:                                              ; preds = %143
  %147 = getelementptr inbounds %struct.arm_2d_region_t, ptr %21, i32 0, i32 1
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %148, i32 0, i32 1
  %150 = getelementptr inbounds %struct.arm_2d_region_t, ptr %149, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %147, ptr align 4 %150, i64 4, i1 false), !tbaa.struct !22
  br label %153

151:                                              ; preds = %143
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %21, ptr align 2 %152, i64 8, i1 false), !tbaa.struct !23
  br label %153

153:                                              ; preds = %151, %146
  %154 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 0
  %155 = load i8, ptr %154, align 1, !tbaa !16
  %156 = zext i8 %155 to i32
  %157 = getelementptr inbounds %struct.arm_2d_region_t, ptr %21, i32 0, i32 0
  %158 = getelementptr inbounds %struct.arm_2d_location_t, ptr %157, i32 0, i32 0
  %159 = load i16, ptr %158, align 2, !tbaa !11
  %160 = sext i16 %159 to i32
  %161 = add nsw i32 %160, %156
  %162 = trunc i32 %161 to i16
  store i16 %162, ptr %158, align 2, !tbaa !11
  %163 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 2
  %164 = load i8, ptr %163, align 1, !tbaa !19
  %165 = zext i8 %164 to i32
  %166 = getelementptr inbounds %struct.arm_2d_region_t, ptr %21, i32 0, i32 0
  %167 = getelementptr inbounds %struct.arm_2d_location_t, ptr %166, i32 0, i32 1
  %168 = load i16, ptr %167, align 2, !tbaa !11
  %169 = sext i16 %168 to i32
  %170 = add nsw i32 %169, %165
  %171 = trunc i32 %170 to i16
  store i16 %171, ptr %167, align 2, !tbaa !11
  %172 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 0
  %173 = load i8, ptr %172, align 1, !tbaa !16
  %174 = zext i8 %173 to i32
  %175 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 1
  %176 = load i8, ptr %175, align 1, !tbaa !18
  %177 = zext i8 %176 to i32
  %178 = add nsw i32 %174, %177
  %179 = getelementptr inbounds %struct.arm_2d_region_t, ptr %21, i32 0, i32 1
  %180 = getelementptr inbounds %struct.arm_2d_size_t, ptr %179, i32 0, i32 0
  %181 = load i16, ptr %180, align 2, !tbaa !11
  %182 = sext i16 %181 to i32
  %183 = sub nsw i32 %182, %178
  %184 = trunc i32 %183 to i16
  store i16 %184, ptr %180, align 2, !tbaa !11
  %185 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 2
  %186 = load i8, ptr %185, align 1, !tbaa !19
  %187 = zext i8 %186 to i32
  %188 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 3
  %189 = load i8, ptr %188, align 1, !tbaa !20
  %190 = zext i8 %189 to i32
  %191 = add nsw i32 %187, %190
  %192 = getelementptr inbounds %struct.arm_2d_region_t, ptr %21, i32 0, i32 1
  %193 = getelementptr inbounds %struct.arm_2d_size_t, ptr %192, i32 0, i32 1
  %194 = load i16, ptr %193, align 2, !tbaa !11
  %195 = sext i16 %194 to i32
  %196 = sub nsw i32 %195, %191
  %197 = trunc i32 %196 to i16
  store i16 %197, ptr %193, align 2, !tbaa !11
  %198 = load ptr, ptr %22, align 8, !tbaa !5
  %199 = call ptr @arm_2d_tile_generate_child(ptr noundef %198, ptr noundef %21, ptr noundef %19, i1 noundef zeroext false)
  store ptr %199, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %18, align 4
  br label %200

200:                                              ; preds = %153, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %201 = load i32, ptr %18, align 4
  switch i32 %201, label %1169 [
    i32 0, label %202
  ]

202:                                              ; preds = %200
  %203 = load ptr, ptr %23, align 8, !tbaa !5
  br label %205

204:                                              ; preds = %129
  br label %205

205:                                              ; preds = %204, %202
  %206 = phi i32 [ 1, %202 ], [ 0, %204 ]
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %209, label %208

208:                                              ; preds = %205
  store i32 4, ptr %18, align 4
  br label %1169

209:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.memset.p0.i64(ptr align 2 %24, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store ptr null, ptr %25, align 8, !tbaa !5
  br label %210

210:                                              ; preds = %1162, %209
  %211 = load ptr, ptr %25, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.arm_2d_region_t, ptr %211, i32 1
  store ptr %212, ptr %25, align 8, !tbaa !5
  %213 = icmp eq ptr %211, null
  br i1 %213, label %214, label %218

214:                                              ; preds = %210
  %215 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %216 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %19, i32 0, i32 1
  %217 = getelementptr inbounds %struct.arm_2d_region_t, ptr %216, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %215, ptr align 4 %217, i64 4, i1 false), !tbaa.struct !22
  br label %219

218:                                              ; preds = %210
  br label %219

219:                                              ; preds = %218, %214
  %220 = phi i32 [ 1, %214 ], [ 0, %218 ]
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %223, label %222

222:                                              ; preds = %219
  store i32 7, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %1167

223:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store ptr %19, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store ptr null, ptr %27, align 8, !tbaa !5
  br label %224

224:                                              ; preds = %1158, %223
  %225 = load ptr, ptr %27, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %225, i32 1
  store ptr %226, ptr %27, align 8, !tbaa !5
  %227 = icmp eq ptr %225, null
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  store i32 10, ptr %18, align 4
  br label %1160

229:                                              ; preds = %224
  %230 = call zeroext i1 @arm_2d_helper_pfb_is_region_being_drawing(ptr noundef %19, ptr noundef null, ptr noundef null)
  br i1 %230, label %232, label %231

231:                                              ; preds = %229
  store i32 10, ptr %18, align 4
  br label %1160

232:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 2, ptr %28) #7
  %233 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %234 = getelementptr inbounds %struct.arm_2d_size_t, ptr %233, i32 0, i32 0
  %235 = load i16, ptr %234, align 2, !tbaa !11
  %236 = sext i16 %235 to i32
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %237, i32 0, i32 1
  %239 = getelementptr inbounds %struct.arm_2d_region_t, ptr %238, i32 0, i32 1
  %240 = getelementptr inbounds %struct.arm_2d_size_t, ptr %239, i32 0, i32 0
  %241 = load i16, ptr %240, align 4, !tbaa !11
  %242 = sext i16 %241 to i32
  %243 = icmp slt i32 %236, %242
  br i1 %243, label %244, label %249

244:                                              ; preds = %232
  %245 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %246 = getelementptr inbounds %struct.arm_2d_size_t, ptr %245, i32 0, i32 0
  %247 = load i16, ptr %246, align 2, !tbaa !11
  %248 = sext i16 %247 to i32
  br label %256

249:                                              ; preds = %232
  %250 = load ptr, ptr %7, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %250, i32 0, i32 1
  %252 = getelementptr inbounds %struct.arm_2d_region_t, ptr %251, i32 0, i32 1
  %253 = getelementptr inbounds %struct.arm_2d_size_t, ptr %252, i32 0, i32 0
  %254 = load i16, ptr %253, align 4, !tbaa !11
  %255 = sext i16 %254 to i32
  br label %256

256:                                              ; preds = %249, %244
  %257 = phi i32 [ %248, %244 ], [ %255, %249 ]
  %258 = trunc i32 %257 to i16
  store i16 %258, ptr %28, align 2, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 2, ptr %29) #7
  %259 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %260 = getelementptr inbounds %struct.arm_2d_size_t, ptr %259, i32 0, i32 1
  %261 = load i16, ptr %260, align 2, !tbaa !11
  %262 = sext i16 %261 to i32
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %263, i32 0, i32 1
  %265 = getelementptr inbounds %struct.arm_2d_region_t, ptr %264, i32 0, i32 1
  %266 = getelementptr inbounds %struct.arm_2d_size_t, ptr %265, i32 0, i32 1
  %267 = load i16, ptr %266, align 2, !tbaa !11
  %268 = sext i16 %267 to i32
  %269 = icmp slt i32 %262, %268
  br i1 %269, label %270, label %275

270:                                              ; preds = %256
  %271 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %272 = getelementptr inbounds %struct.arm_2d_size_t, ptr %271, i32 0, i32 1
  %273 = load i16, ptr %272, align 2, !tbaa !11
  %274 = sext i16 %273 to i32
  br label %282

275:                                              ; preds = %256
  %276 = load ptr, ptr %7, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %276, i32 0, i32 1
  %278 = getelementptr inbounds %struct.arm_2d_region_t, ptr %277, i32 0, i32 1
  %279 = getelementptr inbounds %struct.arm_2d_size_t, ptr %278, i32 0, i32 1
  %280 = load i16, ptr %279, align 2, !tbaa !11
  %281 = sext i16 %280 to i32
  br label %282

282:                                              ; preds = %275, %270
  %283 = phi i32 [ %274, %270 ], [ %281, %275 ]
  %284 = trunc i32 %283 to i16
  store i16 %284, ptr %29, align 2, !tbaa !12
  br label %285

285:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #7
  %286 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %30, i32 0, i32 0
  %287 = load i8, ptr %286, align 8
  %288 = and i8 %287, -2
  %289 = or i8 %288, 0
  store i8 %289, ptr %286, align 8
  %290 = load i8, ptr %286, align 8
  %291 = and i8 %290, -3
  %292 = or i8 %291, 0
  store i8 %292, ptr %286, align 8
  %293 = load i8, ptr %286, align 8
  %294 = and i8 %293, -5
  %295 = or i8 %294, 4
  store i8 %295, ptr %286, align 8
  %296 = load i8, ptr %286, align 8
  %297 = and i8 %296, -9
  %298 = or i8 %297, 0
  store i8 %298, ptr %286, align 8
  %299 = load i8, ptr %286, align 8
  %300 = and i8 %299, -17
  %301 = or i8 %300, 0
  store i8 %301, ptr %286, align 8
  %302 = load i8, ptr %286, align 8
  %303 = and i8 %302, 31
  %304 = or i8 %303, 0
  store i8 %304, ptr %286, align 8
  %305 = getelementptr inbounds %struct.anon, ptr %286, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %305, i8 0, i64 1, i1 false)
  %306 = getelementptr inbounds %struct.anon, ptr %286, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %306, i8 0, i64 2, i1 false)
  %307 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %30, i32 0, i32 1
  %308 = getelementptr inbounds %struct.arm_2d_region_t, ptr %307, i32 0, i32 0
  %309 = getelementptr inbounds %struct.arm_2d_location_t, ptr %308, i32 0, i32 0
  store i16 0, ptr %309, align 4, !tbaa !24
  %310 = getelementptr inbounds %struct.arm_2d_location_t, ptr %308, i32 0, i32 1
  store i16 0, ptr %310, align 2, !tbaa !26
  %311 = getelementptr inbounds %struct.arm_2d_region_t, ptr %307, i32 0, i32 1
  %312 = getelementptr inbounds %struct.arm_2d_size_t, ptr %311, i32 0, i32 0
  %313 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %313, ptr %312, align 4, !tbaa !27
  %314 = getelementptr inbounds %struct.arm_2d_size_t, ptr %311, i32 0, i32 1
  %315 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %315, ptr %314, align 2, !tbaa !29
  %316 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %30, i32 0, i32 2
  %317 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %317, ptr %316, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #7
  %318 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %31, i32 0, i32 0
  %319 = load i8, ptr %318, align 8
  %320 = and i8 %319, -2
  %321 = or i8 %320, 0
  store i8 %321, ptr %318, align 8
  %322 = load i8, ptr %318, align 8
  %323 = and i8 %322, -3
  %324 = or i8 %323, 0
  store i8 %324, ptr %318, align 8
  %325 = load i8, ptr %318, align 8
  %326 = and i8 %325, -5
  %327 = or i8 %326, 4
  store i8 %327, ptr %318, align 8
  %328 = load i8, ptr %318, align 8
  %329 = and i8 %328, -9
  %330 = or i8 %329, 0
  store i8 %330, ptr %318, align 8
  %331 = load i8, ptr %318, align 8
  %332 = and i8 %331, -17
  %333 = or i8 %332, 0
  store i8 %333, ptr %318, align 8
  %334 = load i8, ptr %318, align 8
  %335 = and i8 %334, 31
  %336 = or i8 %335, 0
  store i8 %336, ptr %318, align 8
  %337 = getelementptr inbounds %struct.anon, ptr %318, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %337, i8 0, i64 1, i1 false)
  %338 = getelementptr inbounds %struct.anon, ptr %318, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %338, i8 0, i64 2, i1 false)
  %339 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %31, i32 0, i32 1
  %340 = getelementptr inbounds %struct.arm_2d_region_t, ptr %339, i32 0, i32 0
  %341 = getelementptr inbounds %struct.arm_2d_location_t, ptr %340, i32 0, i32 0
  store i16 0, ptr %341, align 4, !tbaa !24
  %342 = getelementptr inbounds %struct.arm_2d_location_t, ptr %340, i32 0, i32 1
  store i16 0, ptr %342, align 2, !tbaa !26
  %343 = getelementptr inbounds %struct.arm_2d_region_t, ptr %339, i32 0, i32 1
  %344 = getelementptr inbounds %struct.arm_2d_size_t, ptr %343, i32 0, i32 0
  %345 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %345, ptr %344, align 4, !tbaa !27
  %346 = getelementptr inbounds %struct.arm_2d_size_t, ptr %343, i32 0, i32 1
  %347 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %347, ptr %346, align 2, !tbaa !29
  %348 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %31, i32 0, i32 2
  %349 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %349, ptr %348, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %32, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store ptr null, ptr %33, align 8, !tbaa !5
  br label %350

350:                                              ; preds = %389, %285
  %351 = load ptr, ptr %33, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.arm_2d_region_t, ptr %351, i32 1
  store ptr %352, ptr %33, align 8, !tbaa !5
  %353 = icmp eq ptr %351, null
  br i1 %353, label %355, label %354

354:                                              ; preds = %350
  store i32 15, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %390

355:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  store ptr null, ptr %35, align 8, !tbaa !5
  br label %356

356:                                              ; preds = %384, %355
  %357 = load ptr, ptr %35, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.arm_2d_region_t, ptr %357, i32 1
  store ptr %358, ptr %35, align 8, !tbaa !5
  %359 = icmp eq ptr %357, null
  br i1 %359, label %360, label %375

360:                                              ; preds = %356
  %361 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %30, i32 0, i32 1
  %362 = getelementptr inbounds %struct.arm_2d_region_t, ptr %361, i32 0, i32 1
  %363 = getelementptr inbounds %struct.arm_2d_size_t, ptr %362, i32 0, i32 0
  %364 = load i16, ptr %363, align 4, !tbaa !11
  %365 = getelementptr inbounds %struct.arm_2d_region_t, ptr %34, i32 0, i32 1
  %366 = getelementptr inbounds %struct.arm_2d_size_t, ptr %365, i32 0, i32 0
  store i16 %364, ptr %366, align 2, !tbaa !11
  %367 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %30, i32 0, i32 1
  %368 = getelementptr inbounds %struct.arm_2d_region_t, ptr %367, i32 0, i32 1
  %369 = getelementptr inbounds %struct.arm_2d_size_t, ptr %368, i32 0, i32 1
  %370 = load i16, ptr %369, align 2, !tbaa !11
  %371 = getelementptr inbounds %struct.arm_2d_region_t, ptr %34, i32 0, i32 1
  %372 = getelementptr inbounds %struct.arm_2d_size_t, ptr %371, i32 0, i32 1
  store i16 %370, ptr %372, align 2, !tbaa !11
  %373 = getelementptr inbounds %struct.arm_2d_region_t, ptr %34, i32 0, i32 0
  %374 = getelementptr inbounds %struct.arm_2d_region_t, ptr %32, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %373, ptr align 2 %374, i64 4, i1 false), !tbaa.struct !22
  br label %376

375:                                              ; preds = %356
  br label %376

376:                                              ; preds = %375, %360
  %377 = phi i32 [ 1, %360 ], [ 0, %375 ]
  %378 = icmp ne i32 %377, 0
  br i1 %378, label %380, label %379

379:                                              ; preds = %376
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %389

380:                                              ; preds = %376
  %381 = load i8, ptr %11, align 1, !tbaa !11
  %382 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef %31, ptr noundef %30, ptr noundef %19, ptr noundef %34, i8 noundef zeroext %381)
  %383 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %384

384:                                              ; preds = %380
  %385 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %386 = zext i1 %385 to i8
  store i8 %386, ptr %36, align 1, !tbaa !9
  %387 = load i8, ptr %36, align 1, !tbaa !9, !range !14, !noundef !15
  %388 = trunc i8 %387 to i1
  br label %356, !llvm.loop !30

389:                                              ; preds = %379
  br label %350, !llvm.loop !32

390:                                              ; preds = %354
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  br label %391

391:                                              ; preds = %390
  br label %392

392:                                              ; preds = %391
  br label %393

393:                                              ; preds = %392
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #7
  %394 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 0
  %395 = load i8, ptr %394, align 8
  %396 = and i8 %395, -2
  %397 = or i8 %396, 0
  store i8 %397, ptr %394, align 8
  %398 = load i8, ptr %394, align 8
  %399 = and i8 %398, -3
  %400 = or i8 %399, 0
  store i8 %400, ptr %394, align 8
  %401 = load i8, ptr %394, align 8
  %402 = and i8 %401, -5
  %403 = or i8 %402, 4
  store i8 %403, ptr %394, align 8
  %404 = load i8, ptr %394, align 8
  %405 = and i8 %404, -9
  %406 = or i8 %405, 0
  store i8 %406, ptr %394, align 8
  %407 = load i8, ptr %394, align 8
  %408 = and i8 %407, -17
  %409 = or i8 %408, 0
  store i8 %409, ptr %394, align 8
  %410 = load i8, ptr %394, align 8
  %411 = and i8 %410, 31
  %412 = or i8 %411, 0
  store i8 %412, ptr %394, align 8
  %413 = getelementptr inbounds %struct.anon, ptr %394, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %413, i8 0, i64 1, i1 false)
  %414 = getelementptr inbounds %struct.anon, ptr %394, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %414, i8 0, i64 2, i1 false)
  %415 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 1
  %416 = getelementptr inbounds %struct.arm_2d_region_t, ptr %415, i32 0, i32 0
  %417 = getelementptr inbounds %struct.arm_2d_location_t, ptr %416, i32 0, i32 0
  %418 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %418, ptr %417, align 4, !tbaa !24
  %419 = getelementptr inbounds %struct.arm_2d_location_t, ptr %416, i32 0, i32 1
  store i16 0, ptr %419, align 2, !tbaa !26
  %420 = getelementptr inbounds %struct.arm_2d_region_t, ptr %415, i32 0, i32 1
  %421 = getelementptr inbounds %struct.arm_2d_size_t, ptr %420, i32 0, i32 0
  %422 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %422, ptr %421, align 4, !tbaa !27
  %423 = getelementptr inbounds %struct.arm_2d_size_t, ptr %420, i32 0, i32 1
  %424 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %424, ptr %423, align 2, !tbaa !29
  %425 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 2
  %426 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %426, ptr %425, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #7
  %427 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %38, i32 0, i32 0
  %428 = load i8, ptr %427, align 8
  %429 = and i8 %428, -2
  %430 = or i8 %429, 0
  store i8 %430, ptr %427, align 8
  %431 = load i8, ptr %427, align 8
  %432 = and i8 %431, -3
  %433 = or i8 %432, 0
  store i8 %433, ptr %427, align 8
  %434 = load i8, ptr %427, align 8
  %435 = and i8 %434, -5
  %436 = or i8 %435, 4
  store i8 %436, ptr %427, align 8
  %437 = load i8, ptr %427, align 8
  %438 = and i8 %437, -9
  %439 = or i8 %438, 0
  store i8 %439, ptr %427, align 8
  %440 = load i8, ptr %427, align 8
  %441 = and i8 %440, -17
  %442 = or i8 %441, 0
  store i8 %442, ptr %427, align 8
  %443 = load i8, ptr %427, align 8
  %444 = and i8 %443, 31
  %445 = or i8 %444, 0
  store i8 %445, ptr %427, align 8
  %446 = getelementptr inbounds %struct.anon, ptr %427, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %446, i8 0, i64 1, i1 false)
  %447 = getelementptr inbounds %struct.anon, ptr %427, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %447, i8 0, i64 2, i1 false)
  %448 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %38, i32 0, i32 1
  %449 = getelementptr inbounds %struct.arm_2d_region_t, ptr %448, i32 0, i32 0
  %450 = getelementptr inbounds %struct.arm_2d_location_t, ptr %449, i32 0, i32 0
  %451 = load i16, ptr %28, align 2, !tbaa !12
  %452 = sext i16 %451 to i32
  %453 = load i16, ptr %13, align 2, !tbaa !12
  %454 = sext i16 %453 to i32
  %455 = sub nsw i32 %452, %454
  %456 = trunc i32 %455 to i16
  store i16 %456, ptr %450, align 4, !tbaa !24
  %457 = getelementptr inbounds %struct.arm_2d_location_t, ptr %449, i32 0, i32 1
  store i16 0, ptr %457, align 2, !tbaa !26
  %458 = getelementptr inbounds %struct.arm_2d_region_t, ptr %448, i32 0, i32 1
  %459 = getelementptr inbounds %struct.arm_2d_size_t, ptr %458, i32 0, i32 0
  %460 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %460, ptr %459, align 4, !tbaa !27
  %461 = getelementptr inbounds %struct.arm_2d_size_t, ptr %458, i32 0, i32 1
  %462 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %462, ptr %461, align 2, !tbaa !29
  %463 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %38, i32 0, i32 2
  %464 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %464, ptr %463, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %39, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  store ptr null, ptr %40, align 8, !tbaa !5
  br label %465

465:                                              ; preds = %521, %393
  %466 = load ptr, ptr %40, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.arm_2d_region_t, ptr %466, i32 1
  store ptr %467, ptr %40, align 8, !tbaa !5
  %468 = icmp eq ptr %466, null
  br i1 %468, label %470, label %469

469:                                              ; preds = %465
  store i32 22, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %522

470:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  store ptr null, ptr %42, align 8, !tbaa !5
  br label %471

471:                                              ; preds = %516, %470
  %472 = load ptr, ptr %42, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.arm_2d_region_t, ptr %472, i32 1
  store ptr %473, ptr %42, align 8, !tbaa !5
  %474 = icmp eq ptr %472, null
  br i1 %474, label %475, label %507

475:                                              ; preds = %471
  %476 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 1
  %477 = getelementptr inbounds %struct.arm_2d_region_t, ptr %476, i32 0, i32 1
  %478 = getelementptr inbounds %struct.arm_2d_size_t, ptr %477, i32 0, i32 0
  %479 = load i16, ptr %478, align 4, !tbaa !11
  %480 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %481 = getelementptr inbounds %struct.arm_2d_size_t, ptr %480, i32 0, i32 0
  store i16 %479, ptr %481, align 2, !tbaa !11
  %482 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 1
  %483 = getelementptr inbounds %struct.arm_2d_region_t, ptr %482, i32 0, i32 1
  %484 = getelementptr inbounds %struct.arm_2d_size_t, ptr %483, i32 0, i32 1
  %485 = load i16, ptr %484, align 2, !tbaa !11
  %486 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %487 = getelementptr inbounds %struct.arm_2d_size_t, ptr %486, i32 0, i32 1
  store i16 %485, ptr %487, align 2, !tbaa !11
  %488 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 0
  %489 = getelementptr inbounds %struct.arm_2d_region_t, ptr %39, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %488, ptr align 2 %489, i64 4, i1 false), !tbaa.struct !22
  %490 = getelementptr inbounds %struct.arm_2d_region_t, ptr %39, i32 0, i32 1
  %491 = getelementptr inbounds %struct.arm_2d_size_t, ptr %490, i32 0, i32 0
  %492 = load i16, ptr %491, align 2, !tbaa !11
  %493 = sext i16 %492 to i32
  %494 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %37, i32 0, i32 1
  %495 = getelementptr inbounds %struct.arm_2d_region_t, ptr %494, i32 0, i32 1
  %496 = getelementptr inbounds %struct.arm_2d_size_t, ptr %495, i32 0, i32 0
  %497 = load i16, ptr %496, align 4, !tbaa !11
  %498 = sext i16 %497 to i32
  %499 = sub nsw i32 %493, %498
  %500 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 0
  %501 = getelementptr inbounds %struct.arm_2d_location_t, ptr %500, i32 0, i32 0
  %502 = load i16, ptr %501, align 2, !tbaa !11
  %503 = sext i16 %502 to i32
  %504 = add nsw i32 %503, %499
  %505 = trunc i32 %504 to i16
  store i16 %505, ptr %501, align 2, !tbaa !11
  store i16 %505, ptr %43, align 2, !tbaa !12
  %506 = load i16, ptr %43, align 2, !tbaa !12
  br label %508

507:                                              ; preds = %471
  br label %508

508:                                              ; preds = %507, %475
  %509 = phi i32 [ 1, %475 ], [ 0, %507 ]
  %510 = icmp ne i32 %509, 0
  br i1 %510, label %512, label %511

511:                                              ; preds = %508
  store i32 24, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %521

512:                                              ; preds = %508
  %513 = load i8, ptr %11, align 1, !tbaa !11
  %514 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef %38, ptr noundef %37, ptr noundef %19, ptr noundef %41, i8 noundef zeroext %513)
  %515 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %516

516:                                              ; preds = %512
  %517 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %518 = zext i1 %517 to i8
  store i8 %518, ptr %44, align 1, !tbaa !9
  %519 = load i8, ptr %44, align 1, !tbaa !9, !range !14, !noundef !15
  %520 = trunc i8 %519 to i1
  br label %471, !llvm.loop !33

521:                                              ; preds = %511
  br label %465, !llvm.loop !34

522:                                              ; preds = %469
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #7
  br label %523

523:                                              ; preds = %522
  br label %524

524:                                              ; preds = %523
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %45, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  store ptr null, ptr %46, align 8, !tbaa !5
  br label %525

525:                                              ; preds = %626, %524
  %526 = load ptr, ptr %46, align 8, !tbaa !5
  %527 = getelementptr inbounds %struct.arm_2d_region_t, ptr %526, i32 1
  store ptr %527, ptr %46, align 8, !tbaa !5
  %528 = icmp eq ptr %526, null
  br i1 %528, label %530, label %529

529:                                              ; preds = %525
  store i32 27, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %627

530:                                              ; preds = %525
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  store ptr null, ptr %48, align 8, !tbaa !5
  br label %531

531:                                              ; preds = %621, %530
  %532 = load ptr, ptr %48, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.arm_2d_region_t, ptr %532, i32 1
  store ptr %533, ptr %48, align 8, !tbaa !5
  %534 = icmp eq ptr %532, null
  br i1 %534, label %535, label %573

535:                                              ; preds = %531
  %536 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %537 = getelementptr inbounds %struct.arm_2d_size_t, ptr %536, i32 0, i32 0
  %538 = load i16, ptr %537, align 2, !tbaa !11
  %539 = sext i16 %538 to i32
  %540 = load i16, ptr %13, align 2, !tbaa !12
  %541 = sext i16 %540 to i32
  %542 = mul nsw i32 %541, 2
  %543 = sub nsw i32 %539, %542
  %544 = trunc i32 %543 to i16
  %545 = getelementptr inbounds %struct.arm_2d_region_t, ptr %47, i32 0, i32 1
  %546 = getelementptr inbounds %struct.arm_2d_size_t, ptr %545, i32 0, i32 0
  store i16 %544, ptr %546, align 2, !tbaa !11
  %547 = load i16, ptr %14, align 2, !tbaa !12
  %548 = getelementptr inbounds %struct.arm_2d_region_t, ptr %47, i32 0, i32 1
  %549 = getelementptr inbounds %struct.arm_2d_size_t, ptr %548, i32 0, i32 1
  store i16 %547, ptr %549, align 2, !tbaa !11
  %550 = getelementptr inbounds %struct.arm_2d_region_t, ptr %47, i32 0, i32 0
  %551 = getelementptr inbounds %struct.arm_2d_region_t, ptr %45, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %550, ptr align 2 %551, i64 4, i1 false), !tbaa.struct !22
  %552 = getelementptr inbounds %struct.arm_2d_region_t, ptr %45, i32 0, i32 1
  %553 = getelementptr inbounds %struct.arm_2d_size_t, ptr %552, i32 0, i32 0
  %554 = load i16, ptr %553, align 2, !tbaa !11
  %555 = sext i16 %554 to i32
  %556 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %557 = getelementptr inbounds %struct.arm_2d_size_t, ptr %556, i32 0, i32 0
  %558 = load i16, ptr %557, align 2, !tbaa !11
  %559 = sext i16 %558 to i32
  %560 = load i16, ptr %13, align 2, !tbaa !12
  %561 = sext i16 %560 to i32
  %562 = mul nsw i32 %561, 2
  %563 = sub nsw i32 %559, %562
  %564 = sub nsw i32 %555, %563
  %565 = ashr i32 %564, 1
  %566 = getelementptr inbounds %struct.arm_2d_region_t, ptr %47, i32 0, i32 0
  %567 = getelementptr inbounds %struct.arm_2d_location_t, ptr %566, i32 0, i32 0
  %568 = load i16, ptr %567, align 2, !tbaa !11
  %569 = sext i16 %568 to i32
  %570 = add nsw i32 %569, %565
  %571 = trunc i32 %570 to i16
  store i16 %571, ptr %567, align 2, !tbaa !11
  store i16 %571, ptr %49, align 2, !tbaa !12
  %572 = load i16, ptr %49, align 2, !tbaa !12
  br label %574

573:                                              ; preds = %531
  br label %574

574:                                              ; preds = %573, %535
  %575 = phi i32 [ 1, %535 ], [ 0, %573 ]
  %576 = icmp ne i32 %575, 0
  br i1 %576, label %578, label %577

577:                                              ; preds = %574
  store i32 29, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br label %626

578:                                              ; preds = %574
  call void @llvm.lifetime.start.p0(i64 24, ptr %50) #7
  %579 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %50, i32 0, i32 0
  %580 = load i8, ptr %579, align 8
  %581 = and i8 %580, -2
  %582 = or i8 %581, 0
  store i8 %582, ptr %579, align 8
  %583 = load i8, ptr %579, align 8
  %584 = and i8 %583, -3
  %585 = or i8 %584, 0
  store i8 %585, ptr %579, align 8
  %586 = load i8, ptr %579, align 8
  %587 = and i8 %586, -5
  %588 = or i8 %587, 4
  store i8 %588, ptr %579, align 8
  %589 = load i8, ptr %579, align 8
  %590 = and i8 %589, -9
  %591 = or i8 %590, 0
  store i8 %591, ptr %579, align 8
  %592 = load i8, ptr %579, align 8
  %593 = and i8 %592, -17
  %594 = or i8 %593, 0
  store i8 %594, ptr %579, align 8
  %595 = load i8, ptr %579, align 8
  %596 = and i8 %595, 31
  %597 = or i8 %596, 0
  store i8 %597, ptr %579, align 8
  %598 = getelementptr inbounds %struct.anon, ptr %579, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %598, i8 0, i64 1, i1 false)
  %599 = getelementptr inbounds %struct.anon, ptr %579, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %599, i8 0, i64 2, i1 false)
  %600 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %50, i32 0, i32 1
  %601 = getelementptr inbounds %struct.arm_2d_region_t, ptr %600, i32 0, i32 0
  %602 = getelementptr inbounds %struct.arm_2d_location_t, ptr %601, i32 0, i32 0
  %603 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %603, ptr %602, align 4, !tbaa !24
  %604 = getelementptr inbounds %struct.arm_2d_location_t, ptr %601, i32 0, i32 1
  store i16 0, ptr %604, align 2, !tbaa !26
  %605 = getelementptr inbounds %struct.arm_2d_region_t, ptr %600, i32 0, i32 1
  %606 = getelementptr inbounds %struct.arm_2d_size_t, ptr %605, i32 0, i32 0
  %607 = load i16, ptr %28, align 2, !tbaa !12
  %608 = sext i16 %607 to i32
  %609 = load i16, ptr %13, align 2, !tbaa !12
  %610 = sext i16 %609 to i32
  %611 = mul nsw i32 %610, 2
  %612 = sub nsw i32 %608, %611
  %613 = trunc i32 %612 to i16
  store i16 %613, ptr %606, align 4, !tbaa !27
  %614 = getelementptr inbounds %struct.arm_2d_size_t, ptr %605, i32 0, i32 1
  %615 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %615, ptr %614, align 2, !tbaa !29
  %616 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %50, i32 0, i32 2
  %617 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %617, ptr %616, align 8, !tbaa !11
  %618 = load i8, ptr %11, align 1, !tbaa !11
  %619 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef %50, ptr noundef %19, ptr noundef %47, i8 noundef zeroext %618)
  %620 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 24, ptr %50) #7
  br label %621

621:                                              ; preds = %578
  %622 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %623 = zext i1 %622 to i8
  store i8 %623, ptr %51, align 1, !tbaa !9
  %624 = load i8, ptr %51, align 1, !tbaa !9, !range !14, !noundef !15
  %625 = trunc i8 %624 to i1
  br label %531, !llvm.loop !35

626:                                              ; preds = %577
  br label %525, !llvm.loop !36

627:                                              ; preds = %529
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %52, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  store ptr null, ptr %53, align 8, !tbaa !5
  br label %628

628:                                              ; preds = %747, %627
  %629 = load ptr, ptr %53, align 8, !tbaa !5
  %630 = getelementptr inbounds %struct.arm_2d_region_t, ptr %629, i32 1
  store ptr %630, ptr %53, align 8, !tbaa !5
  %631 = icmp eq ptr %629, null
  br i1 %631, label %633, label %632

632:                                              ; preds = %628
  store i32 32, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  br label %748

633:                                              ; preds = %628
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  store ptr null, ptr %55, align 8, !tbaa !5
  br label %634

634:                                              ; preds = %742, %633
  %635 = load ptr, ptr %55, align 8, !tbaa !5
  %636 = getelementptr inbounds %struct.arm_2d_region_t, ptr %635, i32 1
  store ptr %636, ptr %55, align 8, !tbaa !5
  %637 = icmp eq ptr %635, null
  br i1 %637, label %638, label %694

638:                                              ; preds = %634
  %639 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %640 = getelementptr inbounds %struct.arm_2d_size_t, ptr %639, i32 0, i32 0
  %641 = load i16, ptr %640, align 2, !tbaa !11
  %642 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 1
  %643 = getelementptr inbounds %struct.arm_2d_size_t, ptr %642, i32 0, i32 0
  store i16 %641, ptr %643, align 2, !tbaa !11
  %644 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %645 = getelementptr inbounds %struct.arm_2d_size_t, ptr %644, i32 0, i32 1
  %646 = load i16, ptr %645, align 2, !tbaa !11
  %647 = sext i16 %646 to i32
  %648 = load i16, ptr %14, align 2, !tbaa !12
  %649 = sext i16 %648 to i32
  %650 = mul nsw i32 %649, 2
  %651 = sub nsw i32 %647, %650
  %652 = trunc i32 %651 to i16
  %653 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 1
  %654 = getelementptr inbounds %struct.arm_2d_size_t, ptr %653, i32 0, i32 1
  store i16 %652, ptr %654, align 2, !tbaa !11
  %655 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 0
  %656 = getelementptr inbounds %struct.arm_2d_region_t, ptr %52, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %655, ptr align 2 %656, i64 4, i1 false), !tbaa.struct !22
  %657 = getelementptr inbounds %struct.arm_2d_region_t, ptr %52, i32 0, i32 1
  %658 = getelementptr inbounds %struct.arm_2d_size_t, ptr %657, i32 0, i32 0
  %659 = load i16, ptr %658, align 2, !tbaa !11
  %660 = sext i16 %659 to i32
  %661 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %662 = getelementptr inbounds %struct.arm_2d_size_t, ptr %661, i32 0, i32 0
  %663 = load i16, ptr %662, align 2, !tbaa !11
  %664 = sext i16 %663 to i32
  %665 = sub nsw i32 %660, %664
  %666 = ashr i32 %665, 1
  %667 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 0
  %668 = getelementptr inbounds %struct.arm_2d_location_t, ptr %667, i32 0, i32 0
  %669 = load i16, ptr %668, align 2, !tbaa !11
  %670 = sext i16 %669 to i32
  %671 = add nsw i32 %670, %666
  %672 = trunc i32 %671 to i16
  store i16 %672, ptr %668, align 2, !tbaa !11
  %673 = getelementptr inbounds %struct.arm_2d_region_t, ptr %52, i32 0, i32 1
  %674 = getelementptr inbounds %struct.arm_2d_size_t, ptr %673, i32 0, i32 1
  %675 = load i16, ptr %674, align 2, !tbaa !11
  %676 = sext i16 %675 to i32
  %677 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %678 = getelementptr inbounds %struct.arm_2d_size_t, ptr %677, i32 0, i32 1
  %679 = load i16, ptr %678, align 2, !tbaa !11
  %680 = sext i16 %679 to i32
  %681 = load i16, ptr %14, align 2, !tbaa !12
  %682 = sext i16 %681 to i32
  %683 = mul nsw i32 %682, 2
  %684 = sub nsw i32 %680, %683
  %685 = sub nsw i32 %676, %684
  %686 = ashr i32 %685, 1
  %687 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 0
  %688 = getelementptr inbounds %struct.arm_2d_location_t, ptr %687, i32 0, i32 1
  %689 = load i16, ptr %688, align 2, !tbaa !11
  %690 = sext i16 %689 to i32
  %691 = add nsw i32 %690, %686
  %692 = trunc i32 %691 to i16
  store i16 %692, ptr %688, align 2, !tbaa !11
  store i16 %692, ptr %56, align 2, !tbaa !12
  %693 = load i16, ptr %56, align 2, !tbaa !12
  br label %695

694:                                              ; preds = %634
  br label %695

695:                                              ; preds = %694, %638
  %696 = phi i32 [ 1, %638 ], [ 0, %694 ]
  %697 = icmp ne i32 %696, 0
  br i1 %697, label %699, label %698

698:                                              ; preds = %695
  store i32 34, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  br label %747

699:                                              ; preds = %695
  call void @llvm.lifetime.start.p0(i64 24, ptr %57) #7
  %700 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %57, i32 0, i32 0
  %701 = load i8, ptr %700, align 8
  %702 = and i8 %701, -2
  %703 = or i8 %702, 0
  store i8 %703, ptr %700, align 8
  %704 = load i8, ptr %700, align 8
  %705 = and i8 %704, -3
  %706 = or i8 %705, 0
  store i8 %706, ptr %700, align 8
  %707 = load i8, ptr %700, align 8
  %708 = and i8 %707, -5
  %709 = or i8 %708, 4
  store i8 %709, ptr %700, align 8
  %710 = load i8, ptr %700, align 8
  %711 = and i8 %710, -9
  %712 = or i8 %711, 0
  store i8 %712, ptr %700, align 8
  %713 = load i8, ptr %700, align 8
  %714 = and i8 %713, -17
  %715 = or i8 %714, 0
  store i8 %715, ptr %700, align 8
  %716 = load i8, ptr %700, align 8
  %717 = and i8 %716, 31
  %718 = or i8 %717, 0
  store i8 %718, ptr %700, align 8
  %719 = getelementptr inbounds %struct.anon, ptr %700, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %719, i8 0, i64 1, i1 false)
  %720 = getelementptr inbounds %struct.anon, ptr %700, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %720, i8 0, i64 2, i1 false)
  %721 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %57, i32 0, i32 1
  %722 = getelementptr inbounds %struct.arm_2d_region_t, ptr %721, i32 0, i32 0
  %723 = getelementptr inbounds %struct.arm_2d_location_t, ptr %722, i32 0, i32 0
  store i16 0, ptr %723, align 4, !tbaa !24
  %724 = getelementptr inbounds %struct.arm_2d_location_t, ptr %722, i32 0, i32 1
  %725 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %725, ptr %724, align 2, !tbaa !26
  %726 = getelementptr inbounds %struct.arm_2d_region_t, ptr %721, i32 0, i32 1
  %727 = getelementptr inbounds %struct.arm_2d_size_t, ptr %726, i32 0, i32 0
  %728 = load i16, ptr %28, align 2, !tbaa !12
  store i16 %728, ptr %727, align 4, !tbaa !27
  %729 = getelementptr inbounds %struct.arm_2d_size_t, ptr %726, i32 0, i32 1
  %730 = load i16, ptr %29, align 2, !tbaa !12
  %731 = sext i16 %730 to i32
  %732 = load i16, ptr %14, align 2, !tbaa !12
  %733 = sext i16 %732 to i32
  %734 = mul nsw i32 %733, 2
  %735 = sub nsw i32 %731, %734
  %736 = trunc i32 %735 to i16
  store i16 %736, ptr %729, align 2, !tbaa !29
  %737 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %57, i32 0, i32 2
  %738 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %738, ptr %737, align 8, !tbaa !11
  %739 = load i8, ptr %11, align 1, !tbaa !11
  %740 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef %57, ptr noundef %19, ptr noundef %54, i8 noundef zeroext %739)
  %741 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 24, ptr %57) #7
  br label %742

742:                                              ; preds = %699
  %743 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %744 = zext i1 %743 to i8
  store i8 %744, ptr %58, align 1, !tbaa !9
  %745 = load i8, ptr %58, align 1, !tbaa !9, !range !14, !noundef !15
  %746 = trunc i8 %745 to i1
  br label %634, !llvm.loop !37

747:                                              ; preds = %698
  br label %628, !llvm.loop !38

748:                                              ; preds = %632
  br label %749

749:                                              ; preds = %748
  call void @llvm.lifetime.start.p0(i64 24, ptr %59) #7
  %750 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 0
  %751 = load i8, ptr %750, align 8
  %752 = and i8 %751, -2
  %753 = or i8 %752, 0
  store i8 %753, ptr %750, align 8
  %754 = load i8, ptr %750, align 8
  %755 = and i8 %754, -3
  %756 = or i8 %755, 0
  store i8 %756, ptr %750, align 8
  %757 = load i8, ptr %750, align 8
  %758 = and i8 %757, -5
  %759 = or i8 %758, 4
  store i8 %759, ptr %750, align 8
  %760 = load i8, ptr %750, align 8
  %761 = and i8 %760, -9
  %762 = or i8 %761, 0
  store i8 %762, ptr %750, align 8
  %763 = load i8, ptr %750, align 8
  %764 = and i8 %763, -17
  %765 = or i8 %764, 0
  store i8 %765, ptr %750, align 8
  %766 = load i8, ptr %750, align 8
  %767 = and i8 %766, 31
  %768 = or i8 %767, 0
  store i8 %768, ptr %750, align 8
  %769 = getelementptr inbounds %struct.anon, ptr %750, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %769, i8 0, i64 1, i1 false)
  %770 = getelementptr inbounds %struct.anon, ptr %750, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %770, i8 0, i64 2, i1 false)
  %771 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 1
  %772 = getelementptr inbounds %struct.arm_2d_region_t, ptr %771, i32 0, i32 0
  %773 = getelementptr inbounds %struct.arm_2d_location_t, ptr %772, i32 0, i32 0
  store i16 0, ptr %773, align 4, !tbaa !24
  %774 = getelementptr inbounds %struct.arm_2d_location_t, ptr %772, i32 0, i32 1
  %775 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %775, ptr %774, align 2, !tbaa !26
  %776 = getelementptr inbounds %struct.arm_2d_region_t, ptr %771, i32 0, i32 1
  %777 = getelementptr inbounds %struct.arm_2d_size_t, ptr %776, i32 0, i32 0
  %778 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %778, ptr %777, align 4, !tbaa !27
  %779 = getelementptr inbounds %struct.arm_2d_size_t, ptr %776, i32 0, i32 1
  %780 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %780, ptr %779, align 2, !tbaa !29
  %781 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 2
  %782 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %782, ptr %781, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %60) #7
  %783 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %60, i32 0, i32 0
  %784 = load i8, ptr %783, align 8
  %785 = and i8 %784, -2
  %786 = or i8 %785, 0
  store i8 %786, ptr %783, align 8
  %787 = load i8, ptr %783, align 8
  %788 = and i8 %787, -3
  %789 = or i8 %788, 0
  store i8 %789, ptr %783, align 8
  %790 = load i8, ptr %783, align 8
  %791 = and i8 %790, -5
  %792 = or i8 %791, 4
  store i8 %792, ptr %783, align 8
  %793 = load i8, ptr %783, align 8
  %794 = and i8 %793, -9
  %795 = or i8 %794, 0
  store i8 %795, ptr %783, align 8
  %796 = load i8, ptr %783, align 8
  %797 = and i8 %796, -17
  %798 = or i8 %797, 0
  store i8 %798, ptr %783, align 8
  %799 = load i8, ptr %783, align 8
  %800 = and i8 %799, 31
  %801 = or i8 %800, 0
  store i8 %801, ptr %783, align 8
  %802 = getelementptr inbounds %struct.anon, ptr %783, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %802, i8 0, i64 1, i1 false)
  %803 = getelementptr inbounds %struct.anon, ptr %783, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %803, i8 0, i64 2, i1 false)
  %804 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %60, i32 0, i32 1
  %805 = getelementptr inbounds %struct.arm_2d_region_t, ptr %804, i32 0, i32 0
  %806 = getelementptr inbounds %struct.arm_2d_location_t, ptr %805, i32 0, i32 0
  store i16 0, ptr %806, align 4, !tbaa !24
  %807 = getelementptr inbounds %struct.arm_2d_location_t, ptr %805, i32 0, i32 1
  %808 = load i16, ptr %29, align 2, !tbaa !12
  %809 = sext i16 %808 to i32
  %810 = load i16, ptr %14, align 2, !tbaa !12
  %811 = sext i16 %810 to i32
  %812 = sub nsw i32 %809, %811
  %813 = trunc i32 %812 to i16
  store i16 %813, ptr %807, align 2, !tbaa !26
  %814 = getelementptr inbounds %struct.arm_2d_region_t, ptr %804, i32 0, i32 1
  %815 = getelementptr inbounds %struct.arm_2d_size_t, ptr %814, i32 0, i32 0
  %816 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %816, ptr %815, align 4, !tbaa !27
  %817 = getelementptr inbounds %struct.arm_2d_size_t, ptr %814, i32 0, i32 1
  %818 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %818, ptr %817, align 2, !tbaa !29
  %819 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %60, i32 0, i32 2
  %820 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %820, ptr %819, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %61, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #7
  store ptr null, ptr %62, align 8, !tbaa !5
  br label %821

821:                                              ; preds = %877, %749
  %822 = load ptr, ptr %62, align 8, !tbaa !5
  %823 = getelementptr inbounds %struct.arm_2d_region_t, ptr %822, i32 1
  store ptr %823, ptr %62, align 8, !tbaa !5
  %824 = icmp eq ptr %822, null
  br i1 %824, label %826, label %825

825:                                              ; preds = %821
  store i32 39, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #7
  br label %878

826:                                              ; preds = %821
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #7
  store ptr null, ptr %64, align 8, !tbaa !5
  br label %827

827:                                              ; preds = %872, %826
  %828 = load ptr, ptr %64, align 8, !tbaa !5
  %829 = getelementptr inbounds %struct.arm_2d_region_t, ptr %828, i32 1
  store ptr %829, ptr %64, align 8, !tbaa !5
  %830 = icmp eq ptr %828, null
  br i1 %830, label %831, label %863

831:                                              ; preds = %827
  %832 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 1
  %833 = getelementptr inbounds %struct.arm_2d_region_t, ptr %832, i32 0, i32 1
  %834 = getelementptr inbounds %struct.arm_2d_size_t, ptr %833, i32 0, i32 0
  %835 = load i16, ptr %834, align 4, !tbaa !11
  %836 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 1
  %837 = getelementptr inbounds %struct.arm_2d_size_t, ptr %836, i32 0, i32 0
  store i16 %835, ptr %837, align 2, !tbaa !11
  %838 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 1
  %839 = getelementptr inbounds %struct.arm_2d_region_t, ptr %838, i32 0, i32 1
  %840 = getelementptr inbounds %struct.arm_2d_size_t, ptr %839, i32 0, i32 1
  %841 = load i16, ptr %840, align 2, !tbaa !11
  %842 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 1
  %843 = getelementptr inbounds %struct.arm_2d_size_t, ptr %842, i32 0, i32 1
  store i16 %841, ptr %843, align 2, !tbaa !11
  %844 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 0
  %845 = getelementptr inbounds %struct.arm_2d_region_t, ptr %61, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %844, ptr align 2 %845, i64 4, i1 false), !tbaa.struct !22
  %846 = getelementptr inbounds %struct.arm_2d_region_t, ptr %61, i32 0, i32 1
  %847 = getelementptr inbounds %struct.arm_2d_size_t, ptr %846, i32 0, i32 1
  %848 = load i16, ptr %847, align 2, !tbaa !11
  %849 = sext i16 %848 to i32
  %850 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %59, i32 0, i32 1
  %851 = getelementptr inbounds %struct.arm_2d_region_t, ptr %850, i32 0, i32 1
  %852 = getelementptr inbounds %struct.arm_2d_size_t, ptr %851, i32 0, i32 1
  %853 = load i16, ptr %852, align 2, !tbaa !11
  %854 = sext i16 %853 to i32
  %855 = sub nsw i32 %849, %854
  %856 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 0
  %857 = getelementptr inbounds %struct.arm_2d_location_t, ptr %856, i32 0, i32 1
  %858 = load i16, ptr %857, align 2, !tbaa !11
  %859 = sext i16 %858 to i32
  %860 = add nsw i32 %859, %855
  %861 = trunc i32 %860 to i16
  store i16 %861, ptr %857, align 2, !tbaa !11
  store i16 %861, ptr %65, align 2, !tbaa !12
  %862 = load i16, ptr %65, align 2, !tbaa !12
  br label %864

863:                                              ; preds = %827
  br label %864

864:                                              ; preds = %863, %831
  %865 = phi i32 [ 1, %831 ], [ 0, %863 ]
  %866 = icmp ne i32 %865, 0
  br i1 %866, label %868, label %867

867:                                              ; preds = %864
  store i32 41, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #7
  br label %877

868:                                              ; preds = %864
  %869 = load i8, ptr %11, align 1, !tbaa !11
  %870 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef %60, ptr noundef %59, ptr noundef %19, ptr noundef %63, i8 noundef zeroext %869)
  %871 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %872

872:                                              ; preds = %868
  %873 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %874 = zext i1 %873 to i8
  store i8 %874, ptr %66, align 1, !tbaa !9
  %875 = load i8, ptr %66, align 1, !tbaa !9, !range !14, !noundef !15
  %876 = trunc i8 %875 to i1
  br label %827, !llvm.loop !39

877:                                              ; preds = %867
  br label %821, !llvm.loop !40

878:                                              ; preds = %825
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %59) #7
  br label %879

879:                                              ; preds = %878
  br label %880

880:                                              ; preds = %879
  br label %881

881:                                              ; preds = %880
  call void @llvm.lifetime.start.p0(i64 24, ptr %67) #7
  %882 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 0
  %883 = load i8, ptr %882, align 8
  %884 = and i8 %883, -2
  %885 = or i8 %884, 0
  store i8 %885, ptr %882, align 8
  %886 = load i8, ptr %882, align 8
  %887 = and i8 %886, -3
  %888 = or i8 %887, 0
  store i8 %888, ptr %882, align 8
  %889 = load i8, ptr %882, align 8
  %890 = and i8 %889, -5
  %891 = or i8 %890, 4
  store i8 %891, ptr %882, align 8
  %892 = load i8, ptr %882, align 8
  %893 = and i8 %892, -9
  %894 = or i8 %893, 0
  store i8 %894, ptr %882, align 8
  %895 = load i8, ptr %882, align 8
  %896 = and i8 %895, -17
  %897 = or i8 %896, 0
  store i8 %897, ptr %882, align 8
  %898 = load i8, ptr %882, align 8
  %899 = and i8 %898, 31
  %900 = or i8 %899, 0
  store i8 %900, ptr %882, align 8
  %901 = getelementptr inbounds %struct.anon, ptr %882, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %901, i8 0, i64 1, i1 false)
  %902 = getelementptr inbounds %struct.anon, ptr %882, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %902, i8 0, i64 2, i1 false)
  %903 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 1
  %904 = getelementptr inbounds %struct.arm_2d_region_t, ptr %903, i32 0, i32 0
  %905 = getelementptr inbounds %struct.arm_2d_location_t, ptr %904, i32 0, i32 0
  %906 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %906, ptr %905, align 4, !tbaa !24
  %907 = getelementptr inbounds %struct.arm_2d_location_t, ptr %904, i32 0, i32 1
  %908 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %908, ptr %907, align 2, !tbaa !26
  %909 = getelementptr inbounds %struct.arm_2d_region_t, ptr %903, i32 0, i32 1
  %910 = getelementptr inbounds %struct.arm_2d_size_t, ptr %909, i32 0, i32 0
  %911 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %911, ptr %910, align 4, !tbaa !27
  %912 = getelementptr inbounds %struct.arm_2d_size_t, ptr %909, i32 0, i32 1
  %913 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %913, ptr %912, align 2, !tbaa !29
  %914 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 2
  %915 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %915, ptr %914, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %68) #7
  %916 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %68, i32 0, i32 0
  %917 = load i8, ptr %916, align 8
  %918 = and i8 %917, -2
  %919 = or i8 %918, 0
  store i8 %919, ptr %916, align 8
  %920 = load i8, ptr %916, align 8
  %921 = and i8 %920, -3
  %922 = or i8 %921, 0
  store i8 %922, ptr %916, align 8
  %923 = load i8, ptr %916, align 8
  %924 = and i8 %923, -5
  %925 = or i8 %924, 4
  store i8 %925, ptr %916, align 8
  %926 = load i8, ptr %916, align 8
  %927 = and i8 %926, -9
  %928 = or i8 %927, 0
  store i8 %928, ptr %916, align 8
  %929 = load i8, ptr %916, align 8
  %930 = and i8 %929, -17
  %931 = or i8 %930, 0
  store i8 %931, ptr %916, align 8
  %932 = load i8, ptr %916, align 8
  %933 = and i8 %932, 31
  %934 = or i8 %933, 0
  store i8 %934, ptr %916, align 8
  %935 = getelementptr inbounds %struct.anon, ptr %916, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %935, i8 0, i64 1, i1 false)
  %936 = getelementptr inbounds %struct.anon, ptr %916, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %936, i8 0, i64 2, i1 false)
  %937 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %68, i32 0, i32 1
  %938 = getelementptr inbounds %struct.arm_2d_region_t, ptr %937, i32 0, i32 0
  %939 = getelementptr inbounds %struct.arm_2d_location_t, ptr %938, i32 0, i32 0
  %940 = load i16, ptr %28, align 2, !tbaa !12
  %941 = sext i16 %940 to i32
  %942 = load i16, ptr %13, align 2, !tbaa !12
  %943 = sext i16 %942 to i32
  %944 = sub nsw i32 %941, %943
  %945 = trunc i32 %944 to i16
  store i16 %945, ptr %939, align 4, !tbaa !24
  %946 = getelementptr inbounds %struct.arm_2d_location_t, ptr %938, i32 0, i32 1
  %947 = load i16, ptr %29, align 2, !tbaa !12
  %948 = sext i16 %947 to i32
  %949 = load i16, ptr %14, align 2, !tbaa !12
  %950 = sext i16 %949 to i32
  %951 = sub nsw i32 %948, %950
  %952 = trunc i32 %951 to i16
  store i16 %952, ptr %946, align 2, !tbaa !26
  %953 = getelementptr inbounds %struct.arm_2d_region_t, ptr %937, i32 0, i32 1
  %954 = getelementptr inbounds %struct.arm_2d_size_t, ptr %953, i32 0, i32 0
  %955 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %955, ptr %954, align 4, !tbaa !27
  %956 = getelementptr inbounds %struct.arm_2d_size_t, ptr %953, i32 0, i32 1
  %957 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %957, ptr %956, align 2, !tbaa !29
  %958 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %68, i32 0, i32 2
  %959 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %959, ptr %958, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %69, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #7
  store ptr null, ptr %70, align 8, !tbaa !5
  br label %960

960:                                              ; preds = %1032, %881
  %961 = load ptr, ptr %70, align 8, !tbaa !5
  %962 = getelementptr inbounds %struct.arm_2d_region_t, ptr %961, i32 1
  store ptr %962, ptr %70, align 8, !tbaa !5
  %963 = icmp eq ptr %961, null
  br i1 %963, label %965, label %964

964:                                              ; preds = %960
  store i32 46, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #7
  br label %1033

965:                                              ; preds = %960
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #7
  store ptr null, ptr %72, align 8, !tbaa !5
  br label %966

966:                                              ; preds = %1027, %965
  %967 = load ptr, ptr %72, align 8, !tbaa !5
  %968 = getelementptr inbounds %struct.arm_2d_region_t, ptr %967, i32 1
  store ptr %968, ptr %72, align 8, !tbaa !5
  %969 = icmp eq ptr %967, null
  br i1 %969, label %970, label %1018

970:                                              ; preds = %966
  %971 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 1
  %972 = getelementptr inbounds %struct.arm_2d_region_t, ptr %971, i32 0, i32 1
  %973 = getelementptr inbounds %struct.arm_2d_size_t, ptr %972, i32 0, i32 0
  %974 = load i16, ptr %973, align 4, !tbaa !11
  %975 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 1
  %976 = getelementptr inbounds %struct.arm_2d_size_t, ptr %975, i32 0, i32 0
  store i16 %974, ptr %976, align 2, !tbaa !11
  %977 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 1
  %978 = getelementptr inbounds %struct.arm_2d_region_t, ptr %977, i32 0, i32 1
  %979 = getelementptr inbounds %struct.arm_2d_size_t, ptr %978, i32 0, i32 1
  %980 = load i16, ptr %979, align 2, !tbaa !11
  %981 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 1
  %982 = getelementptr inbounds %struct.arm_2d_size_t, ptr %981, i32 0, i32 1
  store i16 %980, ptr %982, align 2, !tbaa !11
  %983 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 0
  %984 = getelementptr inbounds %struct.arm_2d_region_t, ptr %69, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %983, ptr align 2 %984, i64 4, i1 false), !tbaa.struct !22
  %985 = getelementptr inbounds %struct.arm_2d_region_t, ptr %69, i32 0, i32 1
  %986 = getelementptr inbounds %struct.arm_2d_size_t, ptr %985, i32 0, i32 0
  %987 = load i16, ptr %986, align 2, !tbaa !11
  %988 = sext i16 %987 to i32
  %989 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 1
  %990 = getelementptr inbounds %struct.arm_2d_region_t, ptr %989, i32 0, i32 1
  %991 = getelementptr inbounds %struct.arm_2d_size_t, ptr %990, i32 0, i32 0
  %992 = load i16, ptr %991, align 4, !tbaa !11
  %993 = sext i16 %992 to i32
  %994 = sub nsw i32 %988, %993
  %995 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 0
  %996 = getelementptr inbounds %struct.arm_2d_location_t, ptr %995, i32 0, i32 0
  %997 = load i16, ptr %996, align 2, !tbaa !11
  %998 = sext i16 %997 to i32
  %999 = add nsw i32 %998, %994
  %1000 = trunc i32 %999 to i16
  store i16 %1000, ptr %996, align 2, !tbaa !11
  %1001 = getelementptr inbounds %struct.arm_2d_region_t, ptr %69, i32 0, i32 1
  %1002 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1001, i32 0, i32 1
  %1003 = load i16, ptr %1002, align 2, !tbaa !11
  %1004 = sext i16 %1003 to i32
  %1005 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %67, i32 0, i32 1
  %1006 = getelementptr inbounds %struct.arm_2d_region_t, ptr %1005, i32 0, i32 1
  %1007 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1006, i32 0, i32 1
  %1008 = load i16, ptr %1007, align 2, !tbaa !11
  %1009 = sext i16 %1008 to i32
  %1010 = sub nsw i32 %1004, %1009
  %1011 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 0
  %1012 = getelementptr inbounds %struct.arm_2d_location_t, ptr %1011, i32 0, i32 1
  %1013 = load i16, ptr %1012, align 2, !tbaa !11
  %1014 = sext i16 %1013 to i32
  %1015 = add nsw i32 %1014, %1010
  %1016 = trunc i32 %1015 to i16
  store i16 %1016, ptr %1012, align 2, !tbaa !11
  store i16 %1016, ptr %73, align 2, !tbaa !12
  %1017 = load i16, ptr %73, align 2, !tbaa !12
  br label %1019

1018:                                             ; preds = %966
  br label %1019

1019:                                             ; preds = %1018, %970
  %1020 = phi i32 [ 1, %970 ], [ 0, %1018 ]
  %1021 = icmp ne i32 %1020, 0
  br i1 %1021, label %1023, label %1022

1022:                                             ; preds = %1019
  store i32 48, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #7
  br label %1032

1023:                                             ; preds = %1019
  %1024 = load i8, ptr %11, align 1, !tbaa !11
  %1025 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef %68, ptr noundef %67, ptr noundef %19, ptr noundef %71, i8 noundef zeroext %1024)
  %1026 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %1027

1027:                                             ; preds = %1023
  %1028 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %1029 = zext i1 %1028 to i8
  store i8 %1029, ptr %74, align 1, !tbaa !9
  %1030 = load i8, ptr %74, align 1, !tbaa !9, !range !14, !noundef !15
  %1031 = trunc i8 %1030 to i1
  br label %966, !llvm.loop !41

1032:                                             ; preds = %1022
  br label %960, !llvm.loop !42

1033:                                             ; preds = %964
  call void @llvm.lifetime.end.p0(i64 24, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %67) #7
  br label %1034

1034:                                             ; preds = %1033
  br label %1035

1035:                                             ; preds = %1034
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %75, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #7
  store ptr null, ptr %76, align 8, !tbaa !5
  br label %1036

1036:                                             ; preds = %1156, %1035
  %1037 = load ptr, ptr %76, align 8, !tbaa !5
  %1038 = getelementptr inbounds %struct.arm_2d_region_t, ptr %1037, i32 1
  store ptr %1038, ptr %76, align 8, !tbaa !5
  %1039 = icmp eq ptr %1037, null
  br i1 %1039, label %1041, label %1040

1040:                                             ; preds = %1036
  store i32 51, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #7
  br label %1157

1041:                                             ; preds = %1036
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %78) #7
  store ptr null, ptr %78, align 8, !tbaa !5
  br label %1042

1042:                                             ; preds = %1151, %1041
  %1043 = load ptr, ptr %78, align 8, !tbaa !5
  %1044 = getelementptr inbounds %struct.arm_2d_region_t, ptr %1043, i32 1
  store ptr %1044, ptr %78, align 8, !tbaa !5
  %1045 = icmp eq ptr %1043, null
  br i1 %1045, label %1046, label %1097

1046:                                             ; preds = %1042
  %1047 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %1048 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1047, i32 0, i32 0
  %1049 = load i16, ptr %1048, align 2, !tbaa !11
  %1050 = sext i16 %1049 to i32
  %1051 = load i16, ptr %13, align 2, !tbaa !12
  %1052 = sext i16 %1051 to i32
  %1053 = mul nsw i32 %1052, 2
  %1054 = sub nsw i32 %1050, %1053
  %1055 = trunc i32 %1054 to i16
  %1056 = getelementptr inbounds %struct.arm_2d_region_t, ptr %77, i32 0, i32 1
  %1057 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1056, i32 0, i32 0
  store i16 %1055, ptr %1057, align 2, !tbaa !11
  %1058 = load i16, ptr %14, align 2, !tbaa !12
  %1059 = getelementptr inbounds %struct.arm_2d_region_t, ptr %77, i32 0, i32 1
  %1060 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1059, i32 0, i32 1
  store i16 %1058, ptr %1060, align 2, !tbaa !11
  %1061 = getelementptr inbounds %struct.arm_2d_region_t, ptr %77, i32 0, i32 0
  %1062 = getelementptr inbounds %struct.arm_2d_region_t, ptr %75, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %1061, ptr align 2 %1062, i64 4, i1 false), !tbaa.struct !22
  %1063 = getelementptr inbounds %struct.arm_2d_region_t, ptr %75, i32 0, i32 1
  %1064 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1063, i32 0, i32 0
  %1065 = load i16, ptr %1064, align 2, !tbaa !11
  %1066 = sext i16 %1065 to i32
  %1067 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %1068 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1067, i32 0, i32 0
  %1069 = load i16, ptr %1068, align 2, !tbaa !11
  %1070 = sext i16 %1069 to i32
  %1071 = load i16, ptr %13, align 2, !tbaa !12
  %1072 = sext i16 %1071 to i32
  %1073 = mul nsw i32 %1072, 2
  %1074 = sub nsw i32 %1070, %1073
  %1075 = sub nsw i32 %1066, %1074
  %1076 = ashr i32 %1075, 1
  %1077 = getelementptr inbounds %struct.arm_2d_region_t, ptr %77, i32 0, i32 0
  %1078 = getelementptr inbounds %struct.arm_2d_location_t, ptr %1077, i32 0, i32 0
  %1079 = load i16, ptr %1078, align 2, !tbaa !11
  %1080 = sext i16 %1079 to i32
  %1081 = add nsw i32 %1080, %1076
  %1082 = trunc i32 %1081 to i16
  store i16 %1082, ptr %1078, align 2, !tbaa !11
  %1083 = getelementptr inbounds %struct.arm_2d_region_t, ptr %75, i32 0, i32 1
  %1084 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1083, i32 0, i32 1
  %1085 = load i16, ptr %1084, align 2, !tbaa !11
  %1086 = sext i16 %1085 to i32
  %1087 = load i16, ptr %14, align 2, !tbaa !12
  %1088 = sext i16 %1087 to i32
  %1089 = sub nsw i32 %1086, %1088
  %1090 = getelementptr inbounds %struct.arm_2d_region_t, ptr %77, i32 0, i32 0
  %1091 = getelementptr inbounds %struct.arm_2d_location_t, ptr %1090, i32 0, i32 1
  %1092 = load i16, ptr %1091, align 2, !tbaa !11
  %1093 = sext i16 %1092 to i32
  %1094 = add nsw i32 %1093, %1089
  %1095 = trunc i32 %1094 to i16
  store i16 %1095, ptr %1091, align 2, !tbaa !11
  store i16 %1095, ptr %79, align 2, !tbaa !12
  %1096 = load i16, ptr %79, align 2, !tbaa !12
  br label %1098

1097:                                             ; preds = %1042
  br label %1098

1098:                                             ; preds = %1097, %1046
  %1099 = phi i32 [ 1, %1046 ], [ 0, %1097 ]
  %1100 = icmp ne i32 %1099, 0
  br i1 %1100, label %1102, label %1101

1101:                                             ; preds = %1098
  store i32 53, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %78) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #7
  br label %1156

1102:                                             ; preds = %1098
  call void @llvm.lifetime.start.p0(i64 24, ptr %80) #7
  %1103 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %80, i32 0, i32 0
  %1104 = load i8, ptr %1103, align 8
  %1105 = and i8 %1104, -2
  %1106 = or i8 %1105, 0
  store i8 %1106, ptr %1103, align 8
  %1107 = load i8, ptr %1103, align 8
  %1108 = and i8 %1107, -3
  %1109 = or i8 %1108, 0
  store i8 %1109, ptr %1103, align 8
  %1110 = load i8, ptr %1103, align 8
  %1111 = and i8 %1110, -5
  %1112 = or i8 %1111, 4
  store i8 %1112, ptr %1103, align 8
  %1113 = load i8, ptr %1103, align 8
  %1114 = and i8 %1113, -9
  %1115 = or i8 %1114, 0
  store i8 %1115, ptr %1103, align 8
  %1116 = load i8, ptr %1103, align 8
  %1117 = and i8 %1116, -17
  %1118 = or i8 %1117, 0
  store i8 %1118, ptr %1103, align 8
  %1119 = load i8, ptr %1103, align 8
  %1120 = and i8 %1119, 31
  %1121 = or i8 %1120, 0
  store i8 %1121, ptr %1103, align 8
  %1122 = getelementptr inbounds %struct.anon, ptr %1103, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %1122, i8 0, i64 1, i1 false)
  %1123 = getelementptr inbounds %struct.anon, ptr %1103, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %1123, i8 0, i64 2, i1 false)
  %1124 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %80, i32 0, i32 1
  %1125 = getelementptr inbounds %struct.arm_2d_region_t, ptr %1124, i32 0, i32 0
  %1126 = getelementptr inbounds %struct.arm_2d_location_t, ptr %1125, i32 0, i32 0
  %1127 = load i16, ptr %13, align 2, !tbaa !12
  store i16 %1127, ptr %1126, align 4, !tbaa !24
  %1128 = getelementptr inbounds %struct.arm_2d_location_t, ptr %1125, i32 0, i32 1
  %1129 = load i16, ptr %29, align 2, !tbaa !12
  %1130 = sext i16 %1129 to i32
  %1131 = load i16, ptr %14, align 2, !tbaa !12
  %1132 = sext i16 %1131 to i32
  %1133 = sub nsw i32 %1130, %1132
  %1134 = trunc i32 %1133 to i16
  store i16 %1134, ptr %1128, align 2, !tbaa !26
  %1135 = getelementptr inbounds %struct.arm_2d_region_t, ptr %1124, i32 0, i32 1
  %1136 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1135, i32 0, i32 0
  %1137 = load i16, ptr %28, align 2, !tbaa !12
  %1138 = sext i16 %1137 to i32
  %1139 = load i16, ptr %13, align 2, !tbaa !12
  %1140 = sext i16 %1139 to i32
  %1141 = mul nsw i32 %1140, 2
  %1142 = sub nsw i32 %1138, %1141
  %1143 = trunc i32 %1142 to i16
  store i16 %1143, ptr %1136, align 4, !tbaa !27
  %1144 = getelementptr inbounds %struct.arm_2d_size_t, ptr %1135, i32 0, i32 1
  %1145 = load i16, ptr %14, align 2, !tbaa !12
  store i16 %1145, ptr %1144, align 2, !tbaa !29
  %1146 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %80, i32 0, i32 2
  %1147 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %1147, ptr %1146, align 8, !tbaa !11
  %1148 = load i8, ptr %11, align 1, !tbaa !11
  %1149 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef %80, ptr noundef %19, ptr noundef %77, i8 noundef zeroext %1148)
  %1150 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 24, ptr %80) #7
  br label %1151

1151:                                             ; preds = %1102
  %1152 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %1153 = zext i1 %1152 to i8
  store i8 %1153, ptr %81, align 1, !tbaa !9
  %1154 = load i8, ptr %81, align 1, !tbaa !9, !range !14, !noundef !15
  %1155 = trunc i8 %1154 to i1
  br label %1042, !llvm.loop !43

1156:                                             ; preds = %1101
  br label %1036, !llvm.loop !44

1157:                                             ; preds = %1040
  call void @llvm.lifetime.end.p0(i64 2, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %28) #7
  br label %1158

1158:                                             ; preds = %1157
  %1159 = load ptr, ptr %26, align 8, !tbaa !5
  br label %224, !llvm.loop !45

1160:                                             ; preds = %231, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %1161

1161:                                             ; preds = %1160
  br label %1162

1162:                                             ; preds = %1161
  %1163 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %1164 = zext i1 %1163 to i8
  store i8 %1164, ptr %82, align 1, !tbaa !9
  %1165 = load i8, ptr %82, align 1, !tbaa !9, !range !14, !noundef !15
  %1166 = trunc i8 %1165 to i1
  br label %210, !llvm.loop !46

1167:                                             ; preds = %222
  br label %1168

1168:                                             ; preds = %1167
  br label %129, !llvm.loop !47

1169:                                             ; preds = %208, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %1170

1170:                                             ; preds = %1169
  br label %114, !llvm.loop !48

1171:                                             ; preds = %127
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  ret void
}

declare i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) #4

declare i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !7, i64 0}
!17 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!18 = !{!17, !7, i64 1}
!19 = !{!17, !7, i64 2}
!20 = !{!17, !7, i64 3}
!21 = !{i64 0, i64 1, !11, i64 1, i64 1, !11, i64 2, i64 1, !11, i64 3, i64 1, !11}
!22 = !{i64 0, i64 2, !12, i64 2, i64 2, !12}
!23 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!24 = !{!25, !13, i64 0}
!25 = !{!"arm_2d_location_t", !13, i64 0, !13, i64 2}
!26 = !{!25, !13, i64 2}
!27 = !{!28, !13, i64 0}
!28 = !{!"arm_2d_size_t", !13, i64 0, !13, i64 2}
!29 = !{!28, !13, i64 2}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}
!35 = distinct !{!35, !31}
!36 = distinct !{!36, !31}
!37 = distinct !{!37, !31}
!38 = distinct !{!38, !31}
!39 = distinct !{!39, !31}
!40 = distinct !{!40, !31}
!41 = distinct !{!41, !31}
!42 = distinct !{!42, !31}
!43 = distinct !{!43, !31}
!44 = distinct !{!44, !31}
!45 = distinct !{!45, !31}
!46 = distinct !{!46, !31}
!47 = distinct !{!47, !31}
!48 = distinct !{!48, !31}


; 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_tile_t = type { %union.anon, %union.anon.9, %union.anon.12 }
%union.anon = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.2 }
%union.arm_2d_color_info_t = type { %struct.anon.0 }
%struct.anon.0 = type { i8 }
%union.anon.2 = type { i16 }
%union.anon.9 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.11 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.12 = type { ptr }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__.__draw_round_corner_image = external hidden unnamed_addr constant [141 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare ptr @arm_2d_tile_generate_child(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

declare zeroext i1 @arm_2d_helper_pfb_is_region_being_drawing(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @__draw_round_corner_image(ptr noundef nonnull %0, ptr noundef %1, ptr noundef readonly %2, i1 noundef zeroext %3, i8 noundef zeroext %4, ptr noundef %5) local_unnamed_addr #4 {
  %7 = alloca %struct.arm_2d_tile_t, align 8
  %8 = alloca %struct.arm_2d_region_t, align 8
  %9 = alloca %struct.arm_2d_tile_t, align 8
  %10 = alloca %struct.arm_2d_tile_t, align 8
  %11 = alloca %struct.arm_2d_region_t, align 4
  %12 = alloca %struct.arm_2d_tile_t, align 8
  %13 = alloca %struct.arm_2d_tile_t, align 8
  %14 = alloca %struct.arm_2d_region_t, align 4
  %15 = alloca %struct.arm_2d_region_t, align 4
  %16 = alloca %struct.arm_2d_tile_t, align 8
  %17 = alloca %struct.arm_2d_region_t, align 4
  %18 = alloca %struct.arm_2d_tile_t, align 8
  %19 = alloca %struct.arm_2d_tile_t, align 8
  %20 = alloca %struct.arm_2d_tile_t, align 8
  %21 = alloca %struct.arm_2d_region_t, align 4
  %22 = alloca %struct.arm_2d_tile_t, align 8
  %23 = alloca %struct.arm_2d_tile_t, align 8
  %24 = alloca %struct.arm_2d_region_t, align 2
  %25 = alloca %struct.arm_2d_region_t, align 2
  %26 = alloca %struct.arm_2d_tile_t, align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %27, label %28

27:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 211, ptr noundef nonnull @__PRETTY_FUNCTION__.__draw_round_corner_image) #6
  unreachable

28:                                               ; preds = %6
  %.not208 = icmp eq ptr %5, null
  br i1 %.not208, label %29, label %30

29:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 212, ptr noundef nonnull @__PRETTY_FUNCTION__.__draw_round_corner_image) #6
  unreachable

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %5, i64 8
  %32 = load i16, ptr %31, align 4, !tbaa !5
  %33 = sext i16 %32 to i32
  %34 = add nsw i32 %33, 1
  %35 = lshr i32 %34, 1
  %36 = trunc i32 %35 to i16
  %37 = getelementptr inbounds i8, ptr %5, i64 10
  %38 = load i16, ptr %37, align 2, !tbaa !5
  %39 = sext i16 %38 to i32
  %40 = add nsw i32 %39, 1
  %41 = lshr i32 %40, 1
  %42 = trunc i32 %41 to i16
  %43 = icmp eq ptr %2, null
  %44 = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.24.4..sroa_idx = getelementptr inbounds i8, ptr %7, i64 10
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = getelementptr inbounds i8, ptr %0, i64 10
  %47 = getelementptr inbounds i8, ptr %9, i64 1
  %48 = getelementptr inbounds i8, ptr %9, i64 8
  %49 = getelementptr inbounds i8, ptr %9, i64 10
  %50 = getelementptr inbounds i8, ptr %9, i64 16
  %51 = getelementptr inbounds i8, ptr %10, i64 1
  %52 = getelementptr inbounds i8, ptr %10, i64 8
  %53 = getelementptr inbounds i8, ptr %10, i64 10
  %54 = getelementptr inbounds i8, ptr %10, i64 16
  %55 = getelementptr inbounds i8, ptr %11, i64 4
  %56 = getelementptr inbounds i8, ptr %11, i64 6
  %57 = getelementptr inbounds i8, ptr %12, i64 1
  %58 = getelementptr inbounds i8, ptr %12, i64 2
  %59 = getelementptr inbounds i8, ptr %12, i64 4
  %60 = getelementptr inbounds i8, ptr %12, i64 6
  %61 = getelementptr inbounds i8, ptr %12, i64 8
  %62 = getelementptr inbounds i8, ptr %12, i64 10
  %63 = getelementptr inbounds i8, ptr %12, i64 16
  %64 = getelementptr inbounds i8, ptr %13, i64 1
  %65 = getelementptr inbounds i8, ptr %13, i64 2
  %66 = getelementptr inbounds i8, ptr %13, i64 4
  %67 = getelementptr inbounds i8, ptr %13, i64 6
  %68 = getelementptr inbounds i8, ptr %13, i64 8
  %69 = getelementptr inbounds i8, ptr %13, i64 10
  %70 = getelementptr inbounds i8, ptr %13, i64 16
  %71 = getelementptr inbounds i8, ptr %14, i64 4
  %72 = getelementptr inbounds i8, ptr %14, i64 6
  %73 = trunc i32 %34 to i16
  %74 = and i16 %73, -2
  %75 = getelementptr inbounds i8, ptr %15, i64 4
  %76 = getelementptr inbounds i8, ptr %15, i64 6
  %77 = getelementptr inbounds i8, ptr %16, i64 1
  %78 = getelementptr inbounds i8, ptr %16, i64 2
  %79 = getelementptr inbounds i8, ptr %16, i64 4
  %80 = getelementptr inbounds i8, ptr %16, i64 6
  %81 = getelementptr inbounds i8, ptr %16, i64 8
  %82 = getelementptr inbounds i8, ptr %16, i64 10
  %83 = getelementptr inbounds i8, ptr %16, i64 16
  %84 = getelementptr inbounds i8, ptr %17, i64 4
  %85 = trunc i32 %40 to i16
  %86 = and i16 %85, -2
  %87 = getelementptr inbounds i8, ptr %17, i64 6
  %88 = getelementptr inbounds i8, ptr %17, i64 2
  %89 = getelementptr inbounds i8, ptr %18, i64 1
  %90 = getelementptr inbounds i8, ptr %18, i64 2
  %91 = getelementptr inbounds i8, ptr %18, i64 4
  %92 = getelementptr inbounds i8, ptr %18, i64 6
  %93 = getelementptr inbounds i8, ptr %18, i64 8
  %94 = getelementptr inbounds i8, ptr %18, i64 10
  %95 = getelementptr inbounds i8, ptr %18, i64 16
  %96 = getelementptr inbounds i8, ptr %19, i64 1
  %97 = getelementptr inbounds i8, ptr %19, i64 2
  %98 = getelementptr inbounds i8, ptr %19, i64 4
  %99 = getelementptr inbounds i8, ptr %19, i64 6
  %100 = getelementptr inbounds i8, ptr %19, i64 8
  %101 = getelementptr inbounds i8, ptr %19, i64 10
  %102 = getelementptr inbounds i8, ptr %19, i64 16
  %103 = getelementptr inbounds i8, ptr %20, i64 1
  %104 = getelementptr inbounds i8, ptr %20, i64 2
  %105 = getelementptr inbounds i8, ptr %20, i64 4
  %106 = getelementptr inbounds i8, ptr %20, i64 6
  %107 = getelementptr inbounds i8, ptr %20, i64 8
  %108 = getelementptr inbounds i8, ptr %20, i64 10
  %109 = getelementptr inbounds i8, ptr %20, i64 16
  %110 = getelementptr inbounds i8, ptr %21, i64 4
  %111 = getelementptr inbounds i8, ptr %21, i64 6
  %112 = getelementptr inbounds i8, ptr %21, i64 2
  %113 = getelementptr inbounds i8, ptr %22, i64 1
  %114 = getelementptr inbounds i8, ptr %22, i64 2
  %115 = getelementptr inbounds i8, ptr %22, i64 4
  %116 = getelementptr inbounds i8, ptr %22, i64 6
  %117 = getelementptr inbounds i8, ptr %22, i64 8
  %118 = getelementptr inbounds i8, ptr %22, i64 10
  %119 = getelementptr inbounds i8, ptr %22, i64 16
  %120 = getelementptr inbounds i8, ptr %23, i64 1
  %121 = getelementptr inbounds i8, ptr %23, i64 2
  %122 = getelementptr inbounds i8, ptr %23, i64 4
  %123 = getelementptr inbounds i8, ptr %23, i64 6
  %124 = getelementptr inbounds i8, ptr %23, i64 8
  %125 = getelementptr inbounds i8, ptr %23, i64 10
  %126 = getelementptr inbounds i8, ptr %23, i64 16
  %127 = getelementptr inbounds i8, ptr %24, i64 4
  %128 = getelementptr inbounds i8, ptr %24, i64 6
  %129 = getelementptr inbounds i8, ptr %24, i64 2
  %130 = getelementptr inbounds i8, ptr %25, i64 4
  %131 = getelementptr inbounds i8, ptr %25, i64 6
  %132 = getelementptr inbounds i8, ptr %25, i64 2
  %133 = getelementptr inbounds i8, ptr %26, i64 1
  %134 = getelementptr inbounds i8, ptr %26, i64 2
  %135 = getelementptr inbounds i8, ptr %26, i64 4
  %136 = getelementptr inbounds i8, ptr %26, i64 6
  %137 = getelementptr inbounds i8, ptr %26, i64 8
  %138 = getelementptr inbounds i8, ptr %26, i64 10
  %139 = getelementptr inbounds i8, ptr %26, i64 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store i64 0, ptr %8, align 8
  br i1 %43, label %140, label %144

140:                                              ; preds = %30
  %141 = getelementptr inbounds i8, ptr %1, i64 8
  %142 = getelementptr inbounds i8, ptr %8, i64 4
  %143 = load i32, ptr %141, align 4
  store i32 %143, ptr %142, align 4
  br label %.preheader248

144:                                              ; preds = %30
  %145 = load i64, ptr %2, align 2
  store i64 %145, ptr %8, align 8
  br label %.preheader248

.preheader248:                                    ; preds = %140, %144
  %146 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %1, ptr noundef nonnull %8, ptr noundef nonnull %7, i1 noundef zeroext false) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %.sroa.10.4.copyload257 = load i16, ptr %44, align 8
  %.sroa.24.4.copyload258 = load i16, ptr %.sroa.24.4..sroa_idx, align 2
  %147 = call zeroext i1 @arm_2d_helper_pfb_is_region_being_drawing(ptr noundef nonnull %7, ptr noundef null, ptr noundef null) #7
  br i1 %147, label %.critedge, label %.loopexit249

.critedge:                                        ; preds = %.preheader248
  %148 = sub i16 %.sroa.24.4.copyload258, %42
  %149 = sub i16 %.sroa.10.4.copyload257, %74
  %150 = sub i16 %.sroa.24.4.copyload258, %86
  %151 = load i16, ptr %45, align 4, !tbaa !5
  %.sroa.10.3. = call i16 @llvm.smin.i16(i16 %.sroa.10.4.copyload257, i16 %151)
  %152 = load i16, ptr %46, align 2, !tbaa !5
  %153 = call i16 @llvm.smin.i16(i16 %.sroa.24.4.copyload258, i16 %152)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  store i8 4, ptr %9, align 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %47, i8 0, i64 7, i1 false)
  store i16 %36, ptr %48, align 8, !tbaa !8
  store i16 %42, ptr %49, align 2, !tbaa !11
  store ptr %5, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  store i8 4, ptr %10, align 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %51, i8 0, i64 7, i1 false)
  store i16 %36, ptr %52, align 8, !tbaa !8
  store i16 %42, ptr %53, align 2, !tbaa !11
  store ptr %0, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store i16 %36, ptr %55, align 4, !tbaa !5
  store i16 %42, ptr %56, align 2, !tbaa !5
  store i32 0, ptr %11, align 4
  %154 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %11, i8 noundef zeroext %4) #7
  %155 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  %156 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  store i8 4, ptr %12, align 8
  store i8 0, ptr %57, align 1
  store i16 0, ptr %58, align 2
  store i16 %36, ptr %59, align 4, !tbaa !12
  store i16 0, ptr %60, align 2, !tbaa !14
  store i16 %36, ptr %61, align 8, !tbaa !8
  store i16 %42, ptr %62, align 2, !tbaa !11
  store ptr %5, ptr %63, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  store i8 4, ptr %13, align 8
  store i8 0, ptr %64, align 1
  store i16 0, ptr %65, align 2
  %157 = sub i16 %.sroa.10.3., %36
  store i16 %157, ptr %66, align 4, !tbaa !12
  store i16 0, ptr %67, align 2, !tbaa !14
  store i16 %36, ptr %68, align 8, !tbaa !8
  store i16 %42, ptr %69, align 2, !tbaa !11
  store ptr %0, ptr %70, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  store i16 %36, ptr %71, align 4, !tbaa !5
  store i16 %42, ptr %72, align 2, !tbaa !5
  store i32 0, ptr %14, align 4
  %158 = sub i16 %.sroa.10.4.copyload257, %36
  store i16 %158, ptr %14, align 4, !tbaa !5
  %159 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef nonnull %7, ptr noundef nonnull %14, i8 noundef zeroext %4) #7
  %160 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  %161 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  %162 = sub i16 %.sroa.10.3., %74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i16 %149, ptr %75, align 4, !tbaa !5
  store i16 %42, ptr %76, align 2, !tbaa !5
  store i32 0, ptr %15, align 4
  store i16 %36, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #7
  store i8 4, ptr %16, align 8
  store i8 0, ptr %77, align 1
  store i16 0, ptr %78, align 2
  store i16 %36, ptr %79, align 4, !tbaa !12
  store i16 0, ptr %80, align 2, !tbaa !14
  store i16 %162, ptr %81, align 8, !tbaa !8
  store i16 %42, ptr %82, align 2, !tbaa !11
  store ptr %0, ptr %83, align 8, !tbaa !5
  %163 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef nonnull %16, ptr noundef nonnull %7, ptr noundef nonnull %15, i8 noundef zeroext %4) #7
  %164 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #7
  %165 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %166 = sub i16 %153, %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  store i16 %.sroa.10.4.copyload257, ptr %84, align 4, !tbaa !5
  store i16 %150, ptr %87, align 2, !tbaa !5
  store i32 0, ptr %17, align 4
  store i16 %42, ptr %88, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #7
  store i8 4, ptr %18, align 8
  store i8 0, ptr %89, align 1
  store i16 0, ptr %90, align 2
  store i16 0, ptr %91, align 4, !tbaa !12
  store i16 %42, ptr %92, align 2, !tbaa !14
  store i16 %.sroa.10.3., ptr %93, align 8, !tbaa !8
  store i16 %166, ptr %94, align 2, !tbaa !11
  store ptr %0, ptr %95, align 8, !tbaa !5
  %167 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef nonnull %18, ptr noundef nonnull %7, ptr noundef nonnull %17, i8 noundef zeroext %4) #7
  %168 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  %169 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #7
  store i8 4, ptr %19, align 8
  store i8 0, ptr %96, align 1
  store i16 0, ptr %97, align 2
  store i16 0, ptr %98, align 4, !tbaa !12
  store i16 %42, ptr %99, align 2, !tbaa !14
  store i16 %36, ptr %100, align 8, !tbaa !8
  store i16 %42, ptr %101, align 2, !tbaa !11
  store ptr %5, ptr %102, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #7
  store i8 4, ptr %20, align 8
  store i8 0, ptr %103, align 1
  store i16 0, ptr %104, align 2
  store i16 0, ptr %105, align 4, !tbaa !12
  %170 = sub i16 %153, %42
  store i16 %170, ptr %106, align 2, !tbaa !14
  store i16 %36, ptr %107, align 8, !tbaa !8
  store i16 %42, ptr %108, align 2, !tbaa !11
  store ptr %0, ptr %109, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  store i16 %36, ptr %110, align 4, !tbaa !5
  store i16 %42, ptr %111, align 2, !tbaa !5
  store i32 0, ptr %21, align 4
  store i16 %148, ptr %112, align 2, !tbaa !5
  %171 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %7, ptr noundef nonnull %21, i8 noundef zeroext %4) #7
  %172 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  %173 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #7
  store i8 4, ptr %22, align 8
  store i8 0, ptr %113, align 1
  store i16 0, ptr %114, align 2
  store i16 %36, ptr %115, align 4, !tbaa !12
  store i16 %42, ptr %116, align 2, !tbaa !14
  store i16 %36, ptr %117, align 8, !tbaa !8
  store i16 %42, ptr %118, align 2, !tbaa !11
  store ptr %5, ptr %119, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #7
  store i8 4, ptr %23, align 8
  store i8 0, ptr %120, align 1
  store i16 0, ptr %121, align 2
  store i16 %157, ptr %122, align 4, !tbaa !12
  store i16 %170, ptr %123, align 2, !tbaa !14
  store i16 %36, ptr %124, align 8, !tbaa !8
  store i16 %42, ptr %125, align 2, !tbaa !11
  store ptr %0, ptr %126, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  store i16 %36, ptr %127, align 2, !tbaa !5
  store i16 %42, ptr %128, align 2, !tbaa !5
  store i16 %158, ptr %24, align 2, !tbaa !5
  store i16 %148, ptr %129, align 2, !tbaa !5
  %174 = call i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef null, ptr noundef nonnull %23, ptr noundef nonnull %22, ptr noundef nonnull %7, ptr noundef nonnull %24, i8 noundef zeroext %4) #7
  %175 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  %176 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  store i16 %149, ptr %130, align 2, !tbaa !5
  store i16 %42, ptr %131, align 2, !tbaa !5
  store i16 %36, ptr %25, align 2, !tbaa !5
  store i16 %148, ptr %132, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #7
  store i8 4, ptr %26, align 8
  store i8 0, ptr %133, align 1
  store i16 0, ptr %134, align 2
  store i16 %36, ptr %135, align 4, !tbaa !12
  store i16 %170, ptr %136, align 2, !tbaa !14
  store i16 %162, ptr %137, align 8, !tbaa !8
  store i16 %42, ptr %138, align 2, !tbaa !11
  store ptr %0, ptr %139, align 8, !tbaa !5
  %177 = call i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef null, ptr noundef nonnull %26, ptr noundef nonnull %7, ptr noundef nonnull %25, i8 noundef zeroext %4) #7
  %178 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #7
  %179 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br label %.loopexit249, !llvm.loop !15

.loopexit249:                                     ; preds = %.critedge, %.preheader248
  %180 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  ret void
}

declare i32 @arm_2dp_rgb565_tile_copy_with_src_mask_and_opacity_only(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

declare i32 @arm_2dp_rgb565_tile_copy_with_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.smin.i16(i16, i16) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"arm_2d_size_t", !10, i64 0, !10, i64 2}
!10 = !{!"short", !6, i64 0}
!11 = !{!9, !10, i64 2}
!12 = !{!13, !10, i64 0}
!13 = !{!"arm_2d_location_t", !10, i64 0, !10, i64 2}
!14 = !{!13, !10, i64 2}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass