; LLVM IR from ARM-software/Arm-2D :: examples/common/controls (progress_bar_round)

; 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_region_t = type { %union.anon, %union.anon.1 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.1 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.arm_2d_tile_t = type { %union.anon.10, %union.anon.21, %union.anon.22 }
%union.anon.10 = type { %struct.anon.11 }
%struct.anon.11 = type { i8, %union.arm_2d_color_info_t, %union.anon.14 }
%union.arm_2d_color_info_t = type { %struct.anon.12 }
%struct.anon.12 = type { i8 }
%union.anon.14 = type { i16 }
%union.anon.21 = type { %struct.arm_2d_region_t }
%union.anon.22 = type { ptr }
%union.arm_2d_color_rgb565_t = type { i16 }
%struct.progress_bar_round_t = type { %struct.anon }
%struct.anon = type { %struct.progress_bar_round_cfg_t, %struct.arm_2d_helper_dirty_region_item_t, i32, i16, i8 }
%struct.progress_bar_round_cfg_t = type { ptr, %struct.anon.0, ptr }
%struct.anon.0 = type { i16, i16 }
%struct.arm_2d_helper_dirty_region_item_t = type { [48 x i8], %struct.arm_2d_region_t }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@__PRETTY_FUNCTION__.progress_bar_round_show = external hidden unnamed_addr constant [139 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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

declare zeroext i1 @arm_2d_helper_dirty_region_item_suspend_update(ptr noundef, i1 noundef zeroext) #3

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

79:                                               ; preds = %7
  %80 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %80, ptr %9, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %79, %7
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = icmp ne ptr null, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  br label %86

85:                                               ; preds = %81
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 166, ptr noundef @__PRETTY_FUNCTION__.progress_bar_round_show) #7
  unreachable

86:                                               ; preds = %84
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.progress_bar_round_t, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.anon, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !12
  %92 = icmp ne ptr null, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %86
  br label %95

94:                                               ; preds = %86
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 167, ptr noundef @__PRETTY_FUNCTION__.progress_bar_round_show) #7
  unreachable

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = call i32 @arm_2d_target_tile_is_new_frame(ptr noundef %96)
  %98 = icmp ne i32 %97, 0
  %99 = zext i1 %98 to i8
  store i8 %99, ptr %15, align 1, !tbaa !21
  %100 = load i8, ptr %15, align 1, !tbaa !21, !range !22, !noundef !23
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %167

102:                                              ; preds = %95
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.progress_bar_round_t, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.anon, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %105, i32 0, i32 1
  %107 = getelementptr inbounds %struct.anon.0, ptr %106, i32 0, i32 1
  %108 = load i16, ptr %107, align 2, !tbaa !24
  %109 = sext i16 %108 to i32
  %110 = load i16, ptr %13, align 2, !tbaa !9
  %111 = sext i16 %110 to i32
  %112 = icmp slt i32 %109, %111
  br i1 %112, label %113, label %121

113:                                              ; preds = %102
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.progress_bar_round_t, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %struct.anon, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %116, i32 0, i32 1
  %118 = getelementptr inbounds %struct.anon.0, ptr %117, i32 0, i32 1
  %119 = load i16, ptr %118, align 2, !tbaa !24
  %120 = sext i16 %119 to i32
  br label %124

121:                                              ; preds = %102
  %122 = load i16, ptr %13, align 2, !tbaa !9
  %123 = sext i16 %122 to i32
  br label %124

124:                                              ; preds = %121, %113
  %125 = phi i32 [ %120, %113 ], [ %123, %121 ]
  %126 = trunc i32 %125 to i16
  store i16 %126, ptr %13, align 2, !tbaa !9
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.progress_bar_round_t, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds %struct.anon, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %129, i32 0, i32 1
  %131 = getelementptr inbounds %struct.anon.0, ptr %130, i32 0, i32 0
  %132 = load i16, ptr %131, align 8, !tbaa !25
  %133 = sext i16 %132 to i32
  %134 = load i16, ptr %13, align 2, !tbaa !9
  %135 = sext i16 %134 to i32
  %136 = icmp sgt i32 %133, %135
  br i1 %136, label %137, label %145

137:                                              ; preds = %124
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.progress_bar_round_t, ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds %struct.anon, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %140, i32 0, i32 1
  %142 = getelementptr inbounds %struct.anon.0, ptr %141, i32 0, i32 0
  %143 = load i16, ptr %142, align 8, !tbaa !25
  %144 = sext i16 %143 to i32
  br label %148

145:                                              ; preds = %124
  %146 = load i16, ptr %13, align 2, !tbaa !9
  %147 = sext i16 %146 to i32
  br label %148

148:                                              ; preds = %145, %137
  %149 = phi i32 [ %144, %137 ], [ %147, %145 ]
  %150 = trunc i32 %149 to i16
  store i16 %150, ptr %13, align 2, !tbaa !9
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.progress_bar_round_t, ptr %151, i32 0, i32 0
  %153 = getelementptr inbounds %struct.anon, ptr %152, i32 0, i32 1
  %154 = load i16, ptr %13, align 2, !tbaa !9
  %155 = sext i16 %154 to i32
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.progress_bar_round_t, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %struct.anon, ptr %157, i32 0, i32 3
  %159 = load i16, ptr %158, align 4, !tbaa !26
  %160 = sext i16 %159 to i32
  %161 = icmp eq i32 %155, %160
  %162 = call zeroext i1 @arm_2d_helper_dirty_region_item_suspend_update(ptr noundef %153, i1 noundef zeroext %161)
  %163 = load i16, ptr %13, align 2, !tbaa !9
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.progress_bar_round_t, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct.anon, ptr %165, i32 0, i32 3
  store i16 %163, ptr %166, align 4, !tbaa !26
  br label %167

167:                                              ; preds = %148, %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %826, %167
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %169, i32 1
  store ptr %170, ptr %17, align 8, !tbaa !5
  %171 = icmp eq ptr %169, null
  br i1 %171, label %172, label %177

172:                                              ; preds = %168
  %173 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 0
  store i8 0, ptr %173, align 1, !tbaa !27
  %174 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 1
  store i8 0, ptr %174, align 1, !tbaa !29
  %175 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 2
  store i8 0, ptr %175, align 1, !tbaa !30
  %176 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 3
  store i8 0, ptr %176, align 1, !tbaa !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %16, ptr align 1 %18, i64 4, i1 false), !tbaa.struct !32
  br label %178

177:                                              ; preds = %168
  br label %178

178:                                              ; preds = %177, %172
  %179 = phi i32 [ 1, %172 ], [ 0, %177 ]
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %182, label %181

181:                                              ; preds = %178
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %827

182:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.memset.p0.i64(ptr align 2 %20, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %824, %182
  %184 = load ptr, ptr %21, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.arm_2d_region_t, ptr %184, i32 1
  store ptr %185, ptr %21, align 8, !tbaa !5
  %186 = icmp eq ptr %184, null
  br i1 %186, label %187, label %255

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.memset.p0.i64(ptr align 2 %22, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %188, ptr %23, align 8, !tbaa !5
  %189 = load ptr, ptr %23, align 8, !tbaa !5
  %190 = icmp eq ptr null, %189
  br i1 %190, label %191, label %197

191:                                              ; preds = %187
  %192 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %192, ptr %23, align 8, !tbaa !5
  %193 = load ptr, ptr %23, align 8, !tbaa !5
  %194 = icmp eq ptr null, %193
  br i1 %194, label %195, label %196

195:                                              ; preds = %191
  store i32 4, ptr %19, align 4
  br label %252

196:                                              ; preds = %191
  br label %197

197:                                              ; preds = %196, %187
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = icmp eq ptr null, %198
  br i1 %199, label %200, label %205

200:                                              ; preds = %197
  %201 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %202 = load ptr, ptr %23, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %202, i32 0, i32 1
  %204 = getelementptr inbounds %struct.arm_2d_region_t, ptr %203, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %201, ptr align 4 %204, i64 4, i1 false), !tbaa.struct !33
  br label %207

205:                                              ; preds = %197
  %206 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %22, ptr align 2 %206, i64 8, i1 false), !tbaa.struct !34
  br label %207

207:                                              ; preds = %205, %200
  %208 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 0
  %209 = load i8, ptr %208, align 1, !tbaa !27
  %210 = zext i8 %209 to i32
  %211 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 0
  %212 = getelementptr inbounds %struct.arm_2d_location_t, ptr %211, i32 0, i32 0
  %213 = load i16, ptr %212, align 2, !tbaa !11
  %214 = sext i16 %213 to i32
  %215 = add nsw i32 %214, %210
  %216 = trunc i32 %215 to i16
  store i16 %216, ptr %212, align 2, !tbaa !11
  %217 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 2
  %218 = load i8, ptr %217, align 1, !tbaa !30
  %219 = zext i8 %218 to i32
  %220 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 0
  %221 = getelementptr inbounds %struct.arm_2d_location_t, ptr %220, i32 0, i32 1
  %222 = load i16, ptr %221, align 2, !tbaa !11
  %223 = sext i16 %222 to i32
  %224 = add nsw i32 %223, %219
  %225 = trunc i32 %224 to i16
  store i16 %225, ptr %221, align 2, !tbaa !11
  %226 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 0
  %227 = load i8, ptr %226, align 1, !tbaa !27
  %228 = zext i8 %227 to i32
  %229 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 1
  %230 = load i8, ptr %229, align 1, !tbaa !29
  %231 = zext i8 %230 to i32
  %232 = add nsw i32 %228, %231
  %233 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, 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 = sub nsw i32 %236, %232
  %238 = trunc i32 %237 to i16
  store i16 %238, ptr %234, align 2, !tbaa !11
  %239 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 2
  %240 = load i8, ptr %239, align 1, !tbaa !30
  %241 = zext i8 %240 to i32
  %242 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 3
  %243 = load i8, ptr %242, align 1, !tbaa !31
  %244 = zext i8 %243 to i32
  %245 = add nsw i32 %241, %244
  %246 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %247 = getelementptr inbounds %struct.arm_2d_size_t, ptr %246, i32 0, i32 1
  %248 = load i16, ptr %247, align 2, !tbaa !11
  %249 = sext i16 %248 to i32
  %250 = sub nsw i32 %249, %245
  %251 = trunc i32 %250 to i16
  store i16 %251, ptr %247, align 2, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %20, ptr align 2 %22, i64 8, i1 false), !tbaa.struct !34
  store i32 0, ptr %19, align 4
  br label %252

252:                                              ; preds = %207, %195
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %253 = load i32, ptr %19, align 4
  switch i32 %253, label %825 [
    i32 0, label %254
  ]

254:                                              ; preds = %252
  br label %256

255:                                              ; preds = %183
  br label %256

256:                                              ; preds = %255, %254
  %257 = phi i32 [ 1, %254 ], [ 0, %255 ]
  %258 = icmp ne i32 %257, 0
  br i1 %258, label %260, label %259

259:                                              ; preds = %256
  store i32 4, ptr %19, align 4
  br label %825

260:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %261 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %261, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store ptr null, ptr %25, align 8, !tbaa !5
  br label %262

262:                                              ; preds = %821, %260
  %263 = load ptr, ptr %25, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %263, i32 1
  store ptr %264, ptr %25, align 8, !tbaa !5
  %265 = icmp eq ptr %263, null
  br i1 %265, label %267, label %266

266:                                              ; preds = %262
  store i32 7, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %823

267:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %268 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %269 = getelementptr inbounds %struct.arm_2d_region_t, ptr %20, i32 0, i32 1
  %270 = getelementptr inbounds %struct.arm_2d_size_t, ptr %269, i32 0, i32 0
  %271 = load i16, ptr %270, align 2, !tbaa !11
  store i16 %271, ptr %268, align 2, !tbaa !35
  %272 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 1
  %273 = load ptr, ptr %8, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.progress_bar_round_t, ptr %273, i32 0, i32 0
  %275 = getelementptr inbounds %struct.anon, ptr %274, i32 0, i32 0
  %276 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %275, i32 0, i32 2
  %277 = load ptr, ptr %276, align 8, !tbaa !12
  %278 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %277, i32 0, i32 1
  %279 = getelementptr inbounds %struct.arm_2d_region_t, ptr %278, i32 0, i32 1
  %280 = getelementptr inbounds %struct.arm_2d_size_t, ptr %279, i32 0, i32 1
  %281 = load i16, ptr %280, align 2, !tbaa !11
  store i16 %281, ptr %272, align 2, !tbaa !37
  %282 = load ptr, ptr %10, align 8, !tbaa !5
  %283 = icmp eq ptr null, %282
  br i1 %283, label %284, label %292

284:                                              ; preds = %267
  %285 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %286 = load i16, ptr %285, align 2, !tbaa !35
  %287 = sext i16 %286 to i32
  %288 = mul nsw i32 %287, 3
  %289 = ashr i32 %288, 3
  %290 = trunc i32 %289 to i16
  %291 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  store i16 %290, ptr %291, align 2, !tbaa !35
  br label %292

292:                                              ; preds = %284, %267
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %27, ptr align 2 %20, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store ptr null, ptr %28, align 8, !tbaa !5
  br label %293

293:                                              ; preds = %819, %292
  %294 = load ptr, ptr %28, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.arm_2d_region_t, ptr %294, i32 1
  store ptr %295, ptr %28, align 8, !tbaa !5
  %296 = icmp eq ptr %294, null
  br i1 %296, label %298, label %297

297:                                              ; preds = %293
  store i32 10, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %820

298:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store ptr null, ptr %30, align 8, !tbaa !5
  br label %299

299:                                              ; preds = %814, %298
  %300 = load ptr, ptr %30, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.arm_2d_region_t, ptr %300, i32 1
  store ptr %301, ptr %30, align 8, !tbaa !5
  %302 = icmp eq ptr %300, null
  br i1 %302, label %303, label %345

303:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %31, ptr align 2 %26, i64 4, i1 false), !tbaa.struct !33
  %304 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 0
  %305 = load i16, ptr %304, align 2, !tbaa !35
  %306 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %307 = getelementptr inbounds %struct.arm_2d_size_t, ptr %306, i32 0, i32 0
  store i16 %305, ptr %307, align 2, !tbaa !11
  %308 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 1
  %309 = load i16, ptr %308, align 2, !tbaa !37
  %310 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %311 = getelementptr inbounds %struct.arm_2d_size_t, ptr %310, i32 0, i32 1
  store i16 %309, ptr %311, align 2, !tbaa !11
  %312 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %313 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %312, ptr align 2 %313, i64 4, i1 false), !tbaa.struct !33
  %314 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 1
  %315 = getelementptr inbounds %struct.arm_2d_size_t, ptr %314, i32 0, i32 0
  %316 = load i16, ptr %315, align 2, !tbaa !11
  %317 = sext i16 %316 to i32
  %318 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 0
  %319 = load i16, ptr %318, align 2, !tbaa !35
  %320 = sext i16 %319 to i32
  %321 = sub nsw i32 %317, %320
  %322 = ashr i32 %321, 1
  %323 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %324 = getelementptr inbounds %struct.arm_2d_location_t, ptr %323, i32 0, i32 0
  %325 = load i16, ptr %324, align 2, !tbaa !11
  %326 = sext i16 %325 to i32
  %327 = add nsw i32 %326, %322
  %328 = trunc i32 %327 to i16
  store i16 %328, ptr %324, align 2, !tbaa !11
  %329 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 1
  %330 = getelementptr inbounds %struct.arm_2d_size_t, ptr %329, i32 0, i32 1
  %331 = load i16, ptr %330, align 2, !tbaa !11
  %332 = sext i16 %331 to i32
  %333 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 1
  %334 = load i16, ptr %333, align 2, !tbaa !37
  %335 = sext i16 %334 to i32
  %336 = sub nsw i32 %332, %335
  %337 = ashr i32 %336, 1
  %338 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %339 = getelementptr inbounds %struct.arm_2d_location_t, ptr %338, i32 0, i32 1
  %340 = load i16, ptr %339, align 2, !tbaa !11
  %341 = sext i16 %340 to i32
  %342 = add nsw i32 %341, %337
  %343 = trunc i32 %342 to i16
  store i16 %343, ptr %339, align 2, !tbaa !11
  store i16 %343, ptr %32, align 2, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  %344 = load i16, ptr %32, align 2, !tbaa !9
  br label %346

345:                                              ; preds = %299
  br label %346

346:                                              ; preds = %345, %303
  %347 = phi i32 [ 1, %303 ], [ 0, %345 ]
  %348 = icmp ne i32 %347, 0
  br i1 %348, label %350, label %349

349:                                              ; preds = %346
  store i32 12, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %819

350:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  store ptr null, ptr %34, align 8, !tbaa !5
  br label %351

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

355:                                              ; preds = %351
  %356 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 0
  store i8 0, ptr %356, align 1, !tbaa !27
  %357 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 1
  store i8 0, ptr %357, align 1, !tbaa !29
  %358 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 2
  store i8 0, ptr %358, align 1, !tbaa !30
  %359 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 3
  store i8 0, ptr %359, align 1, !tbaa !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %33, ptr align 1 %35, i64 4, i1 false), !tbaa.struct !32
  br label %361

360:                                              ; preds = %351
  br label %361

361:                                              ; preds = %360, %355
  %362 = phi i32 [ 1, %355 ], [ 0, %360 ]
  %363 = icmp ne i32 %362, 0
  br i1 %363, label %365, label %364

364:                                              ; preds = %361
  store i32 15, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %813

365:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 24, ptr %36) #8
  call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  store ptr null, ptr %37, align 8, !tbaa !5
  br label %366

366:                                              ; preds = %810, %365
  %367 = load ptr, ptr %37, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %367, i32 1
  store ptr %368, ptr %37, align 8, !tbaa !5
  %369 = icmp eq ptr %367, null
  br i1 %369, label %370, label %431

370:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  call void @llvm.memset.p0.i64(ptr align 2 %38, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %371 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %371, ptr %39, align 8, !tbaa !5
  %372 = load ptr, ptr %39, align 8, !tbaa !5
  %373 = icmp eq ptr null, %372
  br i1 %373, label %374, label %380

374:                                              ; preds = %370
  %375 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %375, ptr %39, align 8, !tbaa !5
  %376 = load ptr, ptr %39, align 8, !tbaa !5
  %377 = icmp eq ptr null, %376
  br i1 %377, label %378, label %379

378:                                              ; preds = %374
  store i32 17, ptr %19, align 4
  br label %427

379:                                              ; preds = %374
  br label %380

380:                                              ; preds = %379, %370
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %38, ptr align 2 %29, i64 8, i1 false), !tbaa.struct !34
  %381 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 0
  %382 = load i8, ptr %381, align 1, !tbaa !27
  %383 = zext i8 %382 to i32
  %384 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 0
  %385 = getelementptr inbounds %struct.arm_2d_location_t, ptr %384, i32 0, i32 0
  %386 = load i16, ptr %385, align 2, !tbaa !11
  %387 = sext i16 %386 to i32
  %388 = add nsw i32 %387, %383
  %389 = trunc i32 %388 to i16
  store i16 %389, ptr %385, align 2, !tbaa !11
  %390 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 2
  %391 = load i8, ptr %390, align 1, !tbaa !30
  %392 = zext i8 %391 to i32
  %393 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 0
  %394 = getelementptr inbounds %struct.arm_2d_location_t, ptr %393, i32 0, i32 1
  %395 = load i16, ptr %394, align 2, !tbaa !11
  %396 = sext i16 %395 to i32
  %397 = add nsw i32 %396, %392
  %398 = trunc i32 %397 to i16
  store i16 %398, ptr %394, align 2, !tbaa !11
  %399 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 0
  %400 = load i8, ptr %399, align 1, !tbaa !27
  %401 = zext i8 %400 to i32
  %402 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 1
  %403 = load i8, ptr %402, align 1, !tbaa !29
  %404 = zext i8 %403 to i32
  %405 = add nsw i32 %401, %404
  %406 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 1
  %407 = getelementptr inbounds %struct.arm_2d_size_t, ptr %406, i32 0, i32 0
  %408 = load i16, ptr %407, align 2, !tbaa !11
  %409 = sext i16 %408 to i32
  %410 = sub nsw i32 %409, %405
  %411 = trunc i32 %410 to i16
  store i16 %411, ptr %407, align 2, !tbaa !11
  %412 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 2
  %413 = load i8, ptr %412, align 1, !tbaa !30
  %414 = zext i8 %413 to i32
  %415 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 3
  %416 = load i8, ptr %415, align 1, !tbaa !31
  %417 = zext i8 %416 to i32
  %418 = add nsw i32 %414, %417
  %419 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 1
  %420 = getelementptr inbounds %struct.arm_2d_size_t, ptr %419, i32 0, i32 1
  %421 = load i16, ptr %420, align 2, !tbaa !11
  %422 = sext i16 %421 to i32
  %423 = sub nsw i32 %422, %418
  %424 = trunc i32 %423 to i16
  store i16 %424, ptr %420, align 2, !tbaa !11
  %425 = load ptr, ptr %39, align 8, !tbaa !5
  %426 = call ptr @arm_2d_tile_generate_child(ptr noundef %425, ptr noundef %38, ptr noundef %36, i1 noundef zeroext false)
  store ptr %426, ptr %40, align 8, !tbaa !5
  store i32 0, ptr %19, align 4
  br label %427

427:                                              ; preds = %380, %378
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  %428 = load i32, ptr %19, align 4
  switch i32 %428, label %811 [
    i32 0, label %429
  ]

429:                                              ; preds = %427
  %430 = load ptr, ptr %40, align 8, !tbaa !5
  br label %432

431:                                              ; preds = %366
  br label %432

432:                                              ; preds = %431, %429
  %433 = phi i32 [ 1, %429 ], [ 0, %431 ]
  %434 = icmp ne i32 %433, 0
  br i1 %434, label %436, label %435

435:                                              ; preds = %432
  store i32 17, ptr %19, align 4
  br label %811

436:                                              ; preds = %432
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  call void @llvm.memset.p0.i64(ptr align 2 %41, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  store ptr null, ptr %42, align 8, !tbaa !5
  br label %437

437:                                              ; preds = %804, %436
  %438 = load ptr, ptr %42, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.arm_2d_region_t, ptr %438, i32 1
  store ptr %439, ptr %42, align 8, !tbaa !5
  %440 = icmp eq ptr %438, null
  br i1 %440, label %441, label %445

441:                                              ; preds = %437
  %442 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %443 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %36, i32 0, i32 1
  %444 = getelementptr inbounds %struct.arm_2d_region_t, ptr %443, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %442, ptr align 4 %444, i64 4, i1 false), !tbaa.struct !33
  br label %446

445:                                              ; preds = %437
  br label %446

446:                                              ; preds = %445, %441
  %447 = phi i32 [ 1, %441 ], [ 0, %445 ]
  %448 = icmp ne i32 %447, 0
  br i1 %448, label %450, label %449

449:                                              ; preds = %446
  store i32 20, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %809

450:                                              ; preds = %446
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  store ptr %36, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  store ptr null, ptr %44, align 8, !tbaa !5
  br label %451

451:                                              ; preds = %801, %450
  %452 = load ptr, ptr %44, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %452, i32 1
  store ptr %453, ptr %44, align 8, !tbaa !5
  %454 = icmp eq ptr %452, null
  br i1 %454, label %456, label %455

455:                                              ; preds = %451
  store i32 23, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %803

456:                                              ; preds = %451
  call void @llvm.lifetime.start.p0(i64 2, ptr %45) #8
  %457 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %458 = getelementptr inbounds %struct.arm_2d_size_t, ptr %457, i32 0, i32 0
  %459 = load i16, ptr %458, align 2, !tbaa !11
  store i16 %459, ptr %45, align 2, !tbaa !9
  %460 = load i8, ptr %15, align 1, !tbaa !21, !range !22, !noundef !23
  %461 = trunc i8 %460 to i1
  br i1 %461, label %462, label %487

462:                                              ; preds = %456
  call void @llvm.lifetime.start.p0(i64 2, ptr %46) #8
  %463 = load ptr, ptr %8, align 8, !tbaa !5
  %464 = getelementptr inbounds %struct.progress_bar_round_t, ptr %463, i32 0, i32 0
  %465 = getelementptr inbounds %struct.anon, ptr %464, i32 0, i32 0
  %466 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %465, i32 0, i32 1
  %467 = getelementptr inbounds %struct.anon.0, ptr %466, i32 0, i32 1
  %468 = load i16, ptr %467, align 2, !tbaa !24
  %469 = sext i16 %468 to i32
  %470 = load ptr, ptr %8, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.progress_bar_round_t, ptr %470, i32 0, i32 0
  %472 = getelementptr inbounds %struct.anon, ptr %471, i32 0, i32 0
  %473 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %472, i32 0, i32 1
  %474 = getelementptr inbounds %struct.anon.0, ptr %473, i32 0, i32 0
  %475 = load i16, ptr %474, align 8, !tbaa !25
  %476 = sext i16 %475 to i32
  %477 = sub nsw i32 %469, %476
  %478 = trunc i32 %477 to i16
  store i16 %478, ptr %46, align 2, !tbaa !9
  %479 = load i16, ptr %45, align 2, !tbaa !9
  %480 = call i32 @reinterpret_q16_s16(i16 noundef signext %479)
  %481 = load i16, ptr %46, align 2, !tbaa !9
  %482 = sext i16 %481 to i32
  %483 = call i32 @div_n_q16(i32 noundef %480, i32 noundef %482)
  %484 = load ptr, ptr %8, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.progress_bar_round_t, ptr %484, i32 0, i32 0
  %486 = getelementptr inbounds %struct.anon, ptr %485, i32 0, i32 2
  store i32 %483, ptr %486, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 2, ptr %46) #8
  br label %487

487:                                              ; preds = %462, %456
  %488 = load i16, ptr %11, align 2, !tbaa !9
  %489 = load i8, ptr %14, align 1, !tbaa !11
  %490 = load ptr, ptr %8, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.progress_bar_round_t, ptr %490, i32 0, i32 0
  %492 = getelementptr inbounds %struct.anon, ptr %491, i32 0, i32 0
  %493 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %492, i32 0, i32 2
  %494 = load ptr, ptr %493, align 8, !tbaa !12
  call void @__draw_round_corner_box(ptr noundef %36, ptr noundef null, i16 noundef zeroext %488, i8 noundef zeroext %489, ptr noundef %494)
  call void @llvm.lifetime.start.p0(i64 2, ptr %47) #8
  %495 = load ptr, ptr %8, align 8, !tbaa !5
  %496 = getelementptr inbounds %struct.progress_bar_round_t, ptr %495, i32 0, i32 0
  %497 = getelementptr inbounds %struct.anon, ptr %496, i32 0, i32 2
  %498 = load i32, ptr %497, align 8, !tbaa !38
  %499 = load ptr, ptr %8, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.progress_bar_round_t, ptr %499, i32 0, i32 0
  %501 = getelementptr inbounds %struct.anon, ptr %500, i32 0, i32 3
  %502 = load i16, ptr %501, align 4, !tbaa !26
  %503 = sext i16 %502 to i32
  %504 = load ptr, ptr %8, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.progress_bar_round_t, ptr %504, i32 0, i32 0
  %506 = getelementptr inbounds %struct.anon, ptr %505, i32 0, i32 0
  %507 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %506, i32 0, i32 1
  %508 = getelementptr inbounds %struct.anon.0, ptr %507, i32 0, i32 0
  %509 = load i16, ptr %508, align 8, !tbaa !25
  %510 = sext i16 %509 to i32
  %511 = sub nsw i32 %503, %510
  %512 = call i32 @mul_n_q16(i32 noundef %498, i32 noundef %511)
  %513 = call signext i16 @reinterpret_s16_q16(i32 noundef %512)
  store i16 %513, ptr %47, align 2, !tbaa !9
  %514 = load ptr, ptr %8, align 8, !tbaa !5
  %515 = getelementptr inbounds %struct.progress_bar_round_t, ptr %514, i32 0, i32 0
  %516 = getelementptr inbounds %struct.anon, ptr %515, i32 0, i32 3
  %517 = load i16, ptr %516, align 4, !tbaa !26
  %518 = sext i16 %517 to i32
  %519 = load ptr, ptr %8, align 8, !tbaa !5
  %520 = getelementptr inbounds %struct.progress_bar_round_t, ptr %519, i32 0, i32 0
  %521 = getelementptr inbounds %struct.anon, ptr %520, i32 0, i32 0
  %522 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %521, i32 0, i32 1
  %523 = getelementptr inbounds %struct.anon.0, ptr %522, i32 0, i32 1
  %524 = load i16, ptr %523, align 2, !tbaa !24
  %525 = sext i16 %524 to i32
  %526 = icmp eq i32 %518, %525
  br i1 %526, label %527, label %529

527:                                              ; preds = %487
  %528 = load i16, ptr %45, align 2, !tbaa !9
  store i16 %528, ptr %47, align 2, !tbaa !9
  br label %529

529:                                              ; preds = %527, %487
  call void @llvm.lifetime.start.p0(i64 2, ptr %48) #8
  %530 = load ptr, ptr %8, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct.progress_bar_round_t, ptr %530, i32 0, i32 0
  %532 = getelementptr inbounds %struct.anon, ptr %531, i32 0, i32 0
  %533 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %532, i32 0, i32 2
  %534 = load ptr, ptr %533, align 8, !tbaa !12
  %535 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %534, i32 0, i32 1
  %536 = getelementptr inbounds %struct.arm_2d_region_t, ptr %535, i32 0, i32 1
  %537 = getelementptr inbounds %struct.arm_2d_size_t, ptr %536, i32 0, i32 0
  %538 = load i16, ptr %537, align 4, !tbaa !11
  %539 = sext i16 %538 to i32
  %540 = ashr i32 %539, 1
  %541 = trunc i32 %540 to i16
  store i16 %541, ptr %48, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %49) #8
  %542 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %543 = getelementptr inbounds %struct.arm_2d_size_t, ptr %542, i32 0, i32 0
  %544 = load i16, ptr %543, align 2, !tbaa !11
  %545 = sext i16 %544 to i32
  %546 = load i16, ptr %48, align 2, !tbaa !9
  %547 = sext i16 %546 to i32
  %548 = sub nsw i32 %545, %547
  %549 = trunc i32 %548 to i16
  store i16 %549, ptr %49, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %50, ptr align 2 %41, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  store ptr null, ptr %51, align 8, !tbaa !5
  br label %550

550:                                              ; preds = %782, %529
  %551 = load ptr, ptr %51, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct.arm_2d_region_t, ptr %551, i32 1
  store ptr %552, ptr %51, align 8, !tbaa !5
  %553 = icmp eq ptr %551, null
  br i1 %553, label %555, label %554

554:                                              ; preds = %550
  store i32 26, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %783

555:                                              ; preds = %550
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %52, ptr align 2 %50, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  store ptr null, ptr %53, align 8, !tbaa !5
  br label %556

556:                                              ; preds = %777, %555
  %557 = load ptr, ptr %53, align 8, !tbaa !5
  %558 = getelementptr inbounds %struct.arm_2d_region_t, ptr %557, i32 1
  store ptr %558, ptr %53, align 8, !tbaa !5
  %559 = icmp eq ptr %557, null
  br i1 %559, label %560, label %565

560:                                              ; preds = %556
  %561 = load i16, ptr %47, align 2, !tbaa !9
  %562 = getelementptr inbounds %struct.arm_2d_region_t, ptr %52, i32 0, i32 1
  %563 = getelementptr inbounds %struct.arm_2d_size_t, ptr %562, i32 0, i32 0
  store i16 %561, ptr %563, align 2, !tbaa !11
  store i16 %561, ptr %54, align 2, !tbaa !9
  %564 = load i16, ptr %54, align 2, !tbaa !9
  br label %566

565:                                              ; preds = %556
  br label %566

566:                                              ; preds = %565, %560
  %567 = phi i32 [ 1, %560 ], [ 0, %565 ]
  %568 = icmp ne i32 %567, 0
  br i1 %568, label %570, label %569

569:                                              ; preds = %566
  store i32 28, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %782

570:                                              ; preds = %566
  br label %571

571:                                              ; preds = %570
  %572 = load ptr, ptr %8, align 8, !tbaa !5
  %573 = getelementptr inbounds %struct.progress_bar_round_t, ptr %572, i32 0, i32 0
  %574 = getelementptr inbounds %struct.anon, ptr %573, i32 0, i32 0
  %575 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %574, i32 0, i32 2
  %576 = load ptr, ptr %575, align 8, !tbaa !12
  %577 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %577, ptr %55, align 2, !tbaa !11
  %578 = load i8, ptr %14, align 1, !tbaa !11
  %579 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %55, i32 0, i32 0
  %580 = load i16, ptr %579, align 2
  %581 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef %36, ptr noundef %52, ptr noundef %576, i16 %580, i8 noundef zeroext %578)
  %582 = load i16, ptr %47, align 2, !tbaa !9
  %583 = sext i16 %582 to i32
  %584 = load i16, ptr %48, align 2, !tbaa !9
  %585 = sext i16 %584 to i32
  %586 = icmp sle i32 %583, %585
  br i1 %586, label %587, label %588

587:                                              ; preds = %571
  br label %728

588:                                              ; preds = %571
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %56, ptr align 2 %52, i64 8, i1 false), !tbaa.struct !34
  %589 = load i16, ptr %48, align 2, !tbaa !9
  %590 = sext i16 %589 to i32
  %591 = getelementptr inbounds %struct.arm_2d_region_t, ptr %56, i32 0, i32 0
  %592 = getelementptr inbounds %struct.arm_2d_location_t, ptr %591, i32 0, i32 0
  %593 = load i16, ptr %592, align 2, !tbaa !11
  %594 = sext i16 %593 to i32
  %595 = add nsw i32 %594, %590
  %596 = trunc i32 %595 to i16
  store i16 %596, ptr %592, align 2, !tbaa !11
  %597 = load i16, ptr %48, align 2, !tbaa !9
  %598 = sext i16 %597 to i32
  %599 = getelementptr inbounds %struct.arm_2d_region_t, ptr %56, i32 0, i32 1
  %600 = getelementptr inbounds %struct.arm_2d_size_t, ptr %599, i32 0, i32 0
  %601 = load i16, ptr %600, align 2, !tbaa !11
  %602 = sext i16 %601 to i32
  %603 = sub nsw i32 %602, %598
  %604 = trunc i32 %603 to i16
  store i16 %604, ptr %600, align 2, !tbaa !11
  %605 = load i16, ptr %47, align 2, !tbaa !9
  %606 = sext i16 %605 to i32
  %607 = load i16, ptr %49, align 2, !tbaa !9
  %608 = sext i16 %607 to i32
  %609 = icmp sle i32 %606, %608
  br i1 %609, label %610, label %616

610:                                              ; preds = %588
  %611 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %611, ptr %57, align 2, !tbaa !11
  %612 = load i8, ptr %14, align 1, !tbaa !11
  %613 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %57, i32 0, i32 0
  %614 = load i16, ptr %613, align 2
  %615 = call i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef null, ptr noundef %36, ptr noundef %56, i16 %614, i8 noundef zeroext %612)
  store i32 31, ptr %19, align 4
  br label %724

616:                                              ; preds = %588
  %617 = load i16, ptr %49, align 2, !tbaa !9
  %618 = sext i16 %617 to i32
  %619 = load i16, ptr %48, align 2, !tbaa !9
  %620 = sext i16 %619 to i32
  %621 = sub nsw i32 %618, %620
  %622 = trunc i32 %621 to i16
  %623 = getelementptr inbounds %struct.arm_2d_region_t, ptr %56, i32 0, i32 1
  %624 = getelementptr inbounds %struct.arm_2d_size_t, ptr %623, i32 0, i32 0
  store i16 %622, ptr %624, align 2, !tbaa !11
  %625 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %625, ptr %58, align 2, !tbaa !11
  %626 = load i8, ptr %14, align 1, !tbaa !11
  %627 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %58, i32 0, i32 0
  %628 = load i16, ptr %627, align 2
  %629 = call i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef null, ptr noundef %36, ptr noundef %56, i16 %628, i8 noundef zeroext %626)
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %59, ptr align 2 %41, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  store ptr null, ptr %60, align 8, !tbaa !5
  br label %630

630:                                              ; preds = %722, %616
  %631 = load ptr, ptr %60, align 8, !tbaa !5
  %632 = getelementptr inbounds %struct.arm_2d_region_t, ptr %631, i32 1
  store ptr %632, ptr %60, align 8, !tbaa !5
  %633 = icmp eq ptr %631, null
  br i1 %633, label %635, label %634

634:                                              ; preds = %630
  store i32 33, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %723

635:                                              ; preds = %630
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %61, ptr align 2 %59, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #8
  store ptr null, ptr %62, align 8, !tbaa !5
  br label %636

636:                                              ; preds = %717, %635
  %637 = load ptr, ptr %62, align 8, !tbaa !5
  %638 = getelementptr inbounds %struct.arm_2d_region_t, ptr %637, i32 1
  store ptr %638, ptr %62, align 8, !tbaa !5
  %639 = icmp eq ptr %637, null
  br i1 %639, label %640, label %658

640:                                              ; preds = %636
  %641 = load i16, ptr %48, align 2, !tbaa !9
  %642 = getelementptr inbounds %struct.arm_2d_region_t, ptr %61, 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 %59, i32 0, i32 1
  %645 = getelementptr inbounds %struct.arm_2d_size_t, ptr %644, i32 0, i32 0
  %646 = load i16, ptr %645, align 2, !tbaa !11
  %647 = sext i16 %646 to i32
  %648 = load i16, ptr %48, align 2, !tbaa !9
  %649 = sext i16 %648 to i32
  %650 = sub nsw i32 %647, %649
  %651 = getelementptr inbounds %struct.arm_2d_region_t, ptr %61, i32 0, i32 0
  %652 = getelementptr inbounds %struct.arm_2d_location_t, ptr %651, i32 0, i32 0
  %653 = load i16, ptr %652, align 2, !tbaa !11
  %654 = sext i16 %653 to i32
  %655 = add nsw i32 %654, %650
  %656 = trunc i32 %655 to i16
  store i16 %656, ptr %652, align 2, !tbaa !11
  store i16 %656, ptr %63, align 2, !tbaa !9
  %657 = load i16, ptr %63, align 2, !tbaa !9
  br label %659

658:                                              ; preds = %636
  br label %659

659:                                              ; preds = %658, %640
  %660 = phi i32 [ 1, %640 ], [ 0, %658 ]
  %661 = icmp ne i32 %660, 0
  br i1 %661, label %663, label %662

662:                                              ; preds = %659
  store i32 35, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  br label %722

663:                                              ; preds = %659
  %664 = call zeroext i1 @arm_2d_region_intersect(ptr noundef %52, ptr noundef %61, ptr noundef %56)
  br i1 %664, label %665, label %716

665:                                              ; preds = %663
  call void @llvm.lifetime.start.p0(i64 24, ptr %64) #8
  %666 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %64, i32 0, i32 0
  %667 = load i8, ptr %666, align 8
  %668 = and i8 %667, -2
  %669 = or i8 %668, 0
  store i8 %669, ptr %666, align 8
  %670 = load i8, ptr %666, align 8
  %671 = and i8 %670, -3
  %672 = or i8 %671, 0
  store i8 %672, ptr %666, align 8
  %673 = load i8, ptr %666, align 8
  %674 = and i8 %673, -5
  %675 = or i8 %674, 4
  store i8 %675, ptr %666, align 8
  %676 = load i8, ptr %666, align 8
  %677 = and i8 %676, -9
  %678 = or i8 %677, 0
  store i8 %678, ptr %666, align 8
  %679 = load i8, ptr %666, align 8
  %680 = and i8 %679, -17
  %681 = or i8 %680, 0
  store i8 %681, ptr %666, align 8
  %682 = load i8, ptr %666, align 8
  %683 = and i8 %682, 31
  %684 = or i8 %683, 0
  store i8 %684, ptr %666, align 8
  %685 = getelementptr inbounds %struct.anon.11, ptr %666, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %685, i8 0, i64 1, i1 false)
  %686 = getelementptr inbounds %struct.anon.11, ptr %666, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %686, i8 0, i64 2, i1 false)
  %687 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %64, i32 0, i32 1
  %688 = getelementptr inbounds %struct.arm_2d_region_t, ptr %687, i32 0, i32 0
  %689 = getelementptr inbounds %struct.arm_2d_location_t, ptr %688, i32 0, i32 0
  %690 = load i16, ptr %48, align 2, !tbaa !9
  store i16 %690, ptr %689, align 4, !tbaa !39
  %691 = getelementptr inbounds %struct.arm_2d_location_t, ptr %688, i32 0, i32 1
  store i16 0, ptr %691, align 2, !tbaa !41
  %692 = getelementptr inbounds %struct.arm_2d_region_t, ptr %687, i32 0, i32 1
  %693 = getelementptr inbounds %struct.arm_2d_size_t, ptr %692, i32 0, i32 0
  %694 = load i16, ptr %48, align 2, !tbaa !9
  store i16 %694, ptr %693, align 4, !tbaa !35
  %695 = getelementptr inbounds %struct.arm_2d_size_t, ptr %692, i32 0, i32 1
  %696 = load ptr, ptr %8, align 8, !tbaa !5
  %697 = getelementptr inbounds %struct.progress_bar_round_t, ptr %696, i32 0, i32 0
  %698 = getelementptr inbounds %struct.anon, ptr %697, i32 0, i32 0
  %699 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %698, i32 0, i32 2
  %700 = load ptr, ptr %699, align 8, !tbaa !12
  %701 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %700, i32 0, i32 1
  %702 = getelementptr inbounds %struct.arm_2d_region_t, ptr %701, i32 0, i32 1
  %703 = getelementptr inbounds %struct.arm_2d_size_t, ptr %702, i32 0, i32 1
  %704 = load i16, ptr %703, align 2, !tbaa !11
  store i16 %704, ptr %695, align 2, !tbaa !37
  %705 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %64, i32 0, i32 2
  %706 = load ptr, ptr %8, align 8, !tbaa !5
  %707 = getelementptr inbounds %struct.progress_bar_round_t, ptr %706, i32 0, i32 0
  %708 = getelementptr inbounds %struct.anon, ptr %707, i32 0, i32 0
  %709 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %708, i32 0, i32 2
  %710 = load ptr, ptr %709, align 8, !tbaa !12
  store ptr %710, ptr %705, align 8, !tbaa !11
  %711 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %711, ptr %65, align 2, !tbaa !11
  %712 = load i8, ptr %14, align 1, !tbaa !11
  %713 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %65, i32 0, i32 0
  %714 = load i16, ptr %713, align 2
  %715 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef %36, ptr noundef %56, ptr noundef %64, i16 %714, i8 noundef zeroext %712)
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #8
  br label %716

716:                                              ; preds = %665, %663
  br label %717

717:                                              ; preds = %716
  %718 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %719 = zext i1 %718 to i8
  store i8 %719, ptr %66, align 1, !tbaa !21
  %720 = load i8, ptr %66, align 1, !tbaa !21, !range !22, !noundef !23
  %721 = trunc i8 %720 to i1
  br label %636, !llvm.loop !42

722:                                              ; preds = %662
  br label %630, !llvm.loop !44

723:                                              ; preds = %634
  store i32 0, ptr %19, align 4
  br label %724

724:                                              ; preds = %723, %610
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  %725 = load i32, ptr %19, align 4
  switch i32 %725, label %829 [
    i32 0, label %726
    i32 31, label %728
  ]

726:                                              ; preds = %724
  br label %727

727:                                              ; preds = %726
  br label %728

728:                                              ; preds = %727, %724, %587
  %729 = load ptr, ptr %8, align 8, !tbaa !5
  %730 = getelementptr inbounds %struct.progress_bar_round_t, ptr %729, i32 0, i32 0
  %731 = getelementptr inbounds %struct.anon, ptr %730, i32 0, i32 4
  %732 = load i8, ptr %731, align 2, !tbaa !45, !range !22, !noundef !23
  %733 = trunc i8 %732 to i1
  br i1 %733, label %776, label %734

734:                                              ; preds = %728
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %67, ptr align 2 %52, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #8
  store ptr null, ptr %68, align 8, !tbaa !5
  br label %735

735:                                              ; preds = %774, %734
  %736 = load ptr, ptr %68, align 8, !tbaa !5
  %737 = getelementptr inbounds %struct.arm_2d_region_t, ptr %736, i32 1
  store ptr %737, ptr %68, align 8, !tbaa !5
  %738 = icmp eq ptr %736, null
  br i1 %738, label %740, label %739

739:                                              ; preds = %735
  store i32 38, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #8
  br label %775

740:                                              ; preds = %735
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %69, ptr align 2 %67, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #8
  store ptr null, ptr %70, align 8, !tbaa !5
  br label %741

741:                                              ; preds = %769, %740
  %742 = load ptr, ptr %70, align 8, !tbaa !5
  %743 = getelementptr inbounds %struct.arm_2d_region_t, ptr %742, i32 1
  store ptr %743, ptr %70, align 8, !tbaa !5
  %744 = icmp eq ptr %742, null
  br i1 %744, label %745, label %760

745:                                              ; preds = %741
  %746 = getelementptr inbounds %struct.arm_2d_region_t, ptr %69, i32 0, i32 1
  %747 = getelementptr inbounds %struct.arm_2d_size_t, ptr %746, i32 0, i32 0
  store i16 1, ptr %747, align 2, !tbaa !11
  %748 = getelementptr inbounds %struct.arm_2d_region_t, ptr %67, i32 0, i32 1
  %749 = getelementptr inbounds %struct.arm_2d_size_t, ptr %748, i32 0, i32 0
  %750 = load i16, ptr %749, align 2, !tbaa !11
  %751 = sext i16 %750 to i32
  %752 = sub nsw i32 %751, 1
  %753 = getelementptr inbounds %struct.arm_2d_region_t, ptr %69, i32 0, i32 0
  %754 = getelementptr inbounds %struct.arm_2d_location_t, ptr %753, i32 0, i32 0
  %755 = load i16, ptr %754, align 2, !tbaa !11
  %756 = sext i16 %755 to i32
  %757 = add nsw i32 %756, %752
  %758 = trunc i32 %757 to i16
  store i16 %758, ptr %754, align 2, !tbaa !11
  store i16 %758, ptr %71, align 2, !tbaa !9
  %759 = load i16, ptr %71, align 2, !tbaa !9
  br label %761

760:                                              ; preds = %741
  br label %761

761:                                              ; preds = %760, %745
  %762 = phi i32 [ 1, %745 ], [ 0, %760 ]
  %763 = icmp ne i32 %762, 0
  br i1 %763, label %765, label %764

764:                                              ; preds = %761
  store i32 40, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #8
  br label %774

765:                                              ; preds = %761
  %766 = load ptr, ptr %8, align 8, !tbaa !5
  %767 = getelementptr inbounds %struct.progress_bar_round_t, ptr %766, i32 0, i32 0
  %768 = getelementptr inbounds %struct.anon, ptr %767, i32 0, i32 1
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %768, ptr noundef %36, ptr noundef %41, ptr noundef %69)
  br label %769

769:                                              ; preds = %765
  %770 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %771 = zext i1 %770 to i8
  store i8 %771, ptr %72, align 1, !tbaa !21
  %772 = load i8, ptr %72, align 1, !tbaa !21, !range !22, !noundef !23
  %773 = trunc i8 %772 to i1
  br label %741, !llvm.loop !46

774:                                              ; preds = %764
  br label %735, !llvm.loop !47

775:                                              ; preds = %739
  br label %776

776:                                              ; preds = %775, %728
  br label %777

777:                                              ; preds = %776
  %778 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %779 = zext i1 %778 to i8
  store i8 %779, ptr %73, align 1, !tbaa !21
  %780 = load i8, ptr %73, align 1, !tbaa !21, !range !22, !noundef !23
  %781 = trunc i8 %780 to i1
  br label %556, !llvm.loop !48

782:                                              ; preds = %569
  br label %550, !llvm.loop !49

783:                                              ; preds = %554
  %784 = load i16, ptr %47, align 2, !tbaa !9
  %785 = sext i16 %784 to i32
  %786 = icmp eq i32 0, %785
  br i1 %786, label %793, label %787

787:                                              ; preds = %783
  %788 = load ptr, ptr %8, align 8, !tbaa !5
  %789 = getelementptr inbounds %struct.progress_bar_round_t, ptr %788, i32 0, i32 0
  %790 = getelementptr inbounds %struct.anon, ptr %789, i32 0, i32 4
  %791 = load i8, ptr %790, align 2, !tbaa !45, !range !22, !noundef !23
  %792 = trunc i8 %791 to i1
  br i1 %792, label %793, label %800

793:                                              ; preds = %787, %783
  %794 = load ptr, ptr %8, align 8, !tbaa !5
  %795 = getelementptr inbounds %struct.progress_bar_round_t, ptr %794, i32 0, i32 0
  %796 = getelementptr inbounds %struct.anon, ptr %795, i32 0, i32 4
  store i8 0, ptr %796, align 2, !tbaa !45
  %797 = load ptr, ptr %8, align 8, !tbaa !5
  %798 = getelementptr inbounds %struct.progress_bar_round_t, ptr %797, i32 0, i32 0
  %799 = getelementptr inbounds %struct.anon, ptr %798, i32 0, i32 1
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %799, ptr noundef %36, ptr noundef null, ptr noundef %41)
  br label %800

800:                                              ; preds = %793, %787
  call void @llvm.lifetime.end.p0(i64 2, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %45) #8
  br label %801

801:                                              ; preds = %800
  %802 = load ptr, ptr %43, align 8, !tbaa !5
  br label %451, !llvm.loop !50

803:                                              ; preds = %455
  br label %804

804:                                              ; preds = %803
  %805 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %806 = zext i1 %805 to i8
  store i8 %806, ptr %74, align 1, !tbaa !21
  %807 = load i8, ptr %74, align 1, !tbaa !21, !range !22, !noundef !23
  %808 = trunc i8 %807 to i1
  br label %437, !llvm.loop !51

809:                                              ; preds = %449
  br label %810

810:                                              ; preds = %809
  br label %366, !llvm.loop !52

811:                                              ; preds = %435, %427
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #8
  br label %812

812:                                              ; preds = %811
  br label %351, !llvm.loop !53

813:                                              ; preds = %364
  br label %814

814:                                              ; preds = %813
  %815 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %816 = zext i1 %815 to i8
  store i8 %816, ptr %75, align 1, !tbaa !21
  %817 = load i8, ptr %75, align 1, !tbaa !21, !range !22, !noundef !23
  %818 = trunc i8 %817 to i1
  br label %299, !llvm.loop !54

819:                                              ; preds = %349
  br label %293, !llvm.loop !55

820:                                              ; preds = %297
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %821

821:                                              ; preds = %820
  %822 = load ptr, ptr %24, align 8, !tbaa !5
  br label %262, !llvm.loop !56

823:                                              ; preds = %266
  br label %824

824:                                              ; preds = %823
  br label %183, !llvm.loop !57

825:                                              ; preds = %259, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %826

826:                                              ; preds = %825
  br label %168, !llvm.loop !58

827:                                              ; preds = %181
  %828 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  ret void

829:                                              ; preds = %724
  unreachable
}

declare ptr @arm_2d_get_default_frame_buffer() #3

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

declare i32 @arm_2d_target_tile_is_new_frame(ptr noundef) #3

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @div_n_q16(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @reinterpret_q16_s16(i16 noundef signext) #6

declare void @__draw_round_corner_box(ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden signext i16 @reinterpret_s16_q16(i32 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mul_n_q16(i32 noundef, i32 noundef) #6

declare i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) #3

declare i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) #3

declare zeroext i1 @arm_2d_region_intersect(ptr noundef, ptr noundef, ptr noundef) #3

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #3

declare void @__arm_2d_helper_dirty_region_item_update(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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


; 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.10, %union.anon.21, %union.anon.22 }
%union.anon.10 = type { %struct.anon.11 }
%struct.anon.11 = type { i8, %union.arm_2d_color_info_t, %union.anon.14 }
%union.arm_2d_color_info_t = type { %struct.anon.12 }
%struct.anon.12 = type { i8 }
%union.anon.14 = type { i16 }
%union.anon.21 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon, %union.anon.1 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.1 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.22 = type { ptr }

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@__PRETTY_FUNCTION__.progress_bar_round_show = external hidden unnamed_addr constant [139 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare zeroext i1 @arm_2d_helper_dirty_region_item_suspend_update(ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @progress_bar_round_show(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef readonly %2, i16 noundef zeroext %3, i16 noundef zeroext %4, i16 noundef signext %5, i8 noundef zeroext %6) local_unnamed_addr #3 {
  %8 = alloca %struct.arm_2d_tile_t, align 8
  %9 = alloca %struct.arm_2d_region_t, align 8
  %10 = alloca %struct.arm_2d_region_t, align 8
  %11 = alloca %struct.arm_2d_region_t, align 8
  %12 = alloca %struct.arm_2d_region_t, align 8
  %13 = alloca %struct.arm_2d_region_t, align 4
  %14 = alloca %struct.arm_2d_tile_t, align 8
  %15 = alloca %struct.arm_2d_region_t, align 4
  %16 = icmp eq ptr %1, inttoptr (i64 -1 to ptr)
  br i1 %16, label %17, label %19

17:                                               ; preds = %7
  %18 = tail call ptr @arm_2d_get_default_frame_buffer() #7
  br label %19

19:                                               ; preds = %7, %17
  %.0 = phi ptr [ %18, %17 ], [ %1, %7 ]
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %22, label %23

22:                                               ; preds = %19
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 167, ptr noundef nonnull @__PRETTY_FUNCTION__.progress_bar_round_show) #8
  unreachable

23:                                               ; preds = %19
  %24 = tail call i32 @arm_2d_target_tile_is_new_frame(ptr noundef %.0) #7
  %.not202 = icmp eq i32 %24, 0
  br i1 %.not202, label %.preheader262, label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = getelementptr inbounds i8, ptr %0, i64 10
  %28 = load i16, ptr %27, align 2, !tbaa !18
  %. = tail call i16 @llvm.smin.i16(i16 %28, i16 %5)
  %29 = load i16, ptr %26, align 8, !tbaa !19
  %.in203 = tail call i16 @llvm.smax.i16(i16 %29, i16 %.)
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  %31 = getelementptr inbounds i8, ptr %0, i64 84
  %32 = load i16, ptr %31, align 4, !tbaa !20
  %33 = icmp eq i16 %.in203, %32
  %34 = tail call zeroext i1 @arm_2d_helper_dirty_region_item_suspend_update(ptr noundef nonnull %30, i1 noundef zeroext %33) #7
  store i16 %.in203, ptr %31, align 4, !tbaa !20
  br label %.preheader262

.preheader262:                                    ; preds = %25, %23
  %35 = icmp eq ptr %.0, null
  %36 = icmp eq ptr %2, null
  %.sroa.787.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 2
  %.sroa.990.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 4
  %.sroa.12.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 6
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 2
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 4
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 6
  %37 = getelementptr inbounds i8, ptr %10, i64 4
  %38 = getelementptr inbounds i8, ptr %8, i64 8
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = getelementptr inbounds i8, ptr %0, i64 10
  %41 = getelementptr inbounds i8, ptr %0, i64 80
  %42 = getelementptr inbounds i8, ptr %0, i64 84
  %43 = getelementptr inbounds i8, ptr %11, i64 4
  %44 = getelementptr inbounds i8, ptr %12, i64 4
  %.sroa.520.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 6
  %.sroa.417.0..sroa_idx18 = getelementptr inbounds i8, ptr %13, i64 4
  %.sroa.520.0..sroa_idx21 = getelementptr inbounds i8, ptr %13, i64 6
  %45 = getelementptr inbounds i8, ptr %14, i64 1
  %46 = getelementptr inbounds i8, ptr %14, i64 2
  %47 = getelementptr inbounds i8, ptr %14, i64 4
  %48 = getelementptr inbounds i8, ptr %14, i64 6
  %49 = getelementptr inbounds i8, ptr %14, i64 8
  %50 = getelementptr inbounds i8, ptr %14, i64 10
  %51 = getelementptr inbounds i8, ptr %14, i64 16
  %52 = getelementptr inbounds i8, ptr %0, i64 86
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 6
  %.sroa.4.0..sroa_idx7 = getelementptr inbounds i8, ptr %15, i64 4
  %.sroa.5.0..sroa_idx9 = getelementptr inbounds i8, ptr %15, i64 6
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %35, label %54, label %57

54:                                               ; preds = %.preheader262
  %55 = tail call ptr @arm_2d_get_default_frame_buffer() #7
  %56 = icmp eq ptr %55, null
  br i1 %56, label %.thread241, label %57

57:                                               ; preds = %54, %.preheader262
  %.0180 = phi ptr [ %55, %54 ], [ %.0, %.preheader262 ]
  br i1 %36, label %58, label %60

58:                                               ; preds = %57
  %59 = getelementptr inbounds i8, ptr %.0180, i64 8
  %.sroa.12.4..sroa_idx = getelementptr inbounds i8, ptr %.0180, i64 10
  br label %.preheader258

60:                                               ; preds = %57
  %.sroa.085.0.copyload = load i16, ptr %2, align 2
  %.sroa.787.0.copyload = load i16, ptr %.sroa.787.0..sroa_idx, align 2, !tbaa !21
  br label %.preheader258

.preheader258:                                    ; preds = %58, %60
  %.sroa.12.2.in = phi ptr [ %.sroa.12.4..sroa_idx, %58 ], [ %.sroa.12.0..sroa_idx, %60 ]
  %.sroa.990.2.in = phi ptr [ %59, %58 ], [ %.sroa.990.0..sroa_idx, %60 ]
  %.sroa.787.2 = phi i16 [ 0, %58 ], [ %.sroa.787.0.copyload, %60 ]
  %.sroa.085.2 = phi i16 [ 0, %58 ], [ %.sroa.085.0.copyload, %60 ]
  %.sroa.990.2206 = load i16, ptr %.sroa.990.2.in, align 2
  %.sroa.12.2207 = load i16, ptr %.sroa.12.2.in, align 2, !tbaa !21
  %61 = sext i16 %.sroa.990.2206 to i32
  %62 = mul nsw i32 %61, 3
  %63 = lshr i32 %62, 3
  %64 = trunc i32 %63 to i16
  %.sroa.077.0 = select i1 %36, i16 %64, i16 %.sroa.990.2206
  %65 = sext i16 %.sroa.077.0 to i32
  %66 = sub nsw i32 %61, %65
  %67 = lshr i32 %66, 1
  %68 = trunc i32 %67 to i16
  %69 = add i16 %.sroa.085.2, %68
  %70 = sext i16 %.sroa.12.2207 to i32
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 10
  %73 = load i16, ptr %72, align 2, !tbaa !21
  %74 = sext i16 %73 to i32
  %75 = sub nsw i32 %70, %74
  %76 = lshr i32 %75, 1
  %77 = trunc i32 %76 to i16
  %78 = add i16 %.sroa.787.2, %77
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 0, ptr %9, align 8
  br i1 %35, label %79, label %83

79:                                               ; preds = %.preheader258
  %80 = tail call ptr @arm_2d_get_default_frame_buffer() #7
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %83

82:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %.thread241.loopexit

83:                                               ; preds = %.preheader258, %79
  %.0188 = phi ptr [ %80, %79 ], [ %.0, %.preheader258 ]
  store i16 %69, ptr %9, align 8
  store i16 %78, ptr %.sroa.6.0..sroa_idx, align 2, !tbaa !21
  store i16 %.sroa.077.0, ptr %.sroa.8.0..sroa_idx, align 4
  store i16 %73, ptr %.sroa.9.0..sroa_idx, align 2, !tbaa !21
  %84 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %.0188, ptr noundef nonnull %9, ptr noundef nonnull %8, i1 noundef zeroext false) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  store i64 0, ptr %10, align 8
  %85 = load i32, ptr %38, align 8
  store i32 %85, ptr %37, align 4
  %86 = trunc i32 %85 to i16
  br i1 %.not202, label %94, label %87

87:                                               ; preds = %83
  %88 = load i16, ptr %40, align 2, !tbaa !18
  %89 = load i16, ptr %39, align 8, !tbaa !19
  %90 = sub i16 %88, %89
  %91 = call i32 @reinterpret_q16_s16(i16 noundef signext %86)
  %92 = sext i16 %90 to i32
  %93 = call i32 @div_n_q16(i32 noundef %91, i32 noundef %92)
  store i32 %93, ptr %41, align 8, !tbaa !22
  br label %94

94:                                               ; preds = %87, %83
  %95 = load ptr, ptr %20, align 8, !tbaa !5
  call void @__draw_round_corner_box(ptr noundef nonnull %8, ptr noundef null, i16 noundef zeroext %3, i8 noundef zeroext %6, ptr noundef %95) #7
  %96 = load i32, ptr %41, align 8, !tbaa !22
  %97 = load i16, ptr %42, align 4, !tbaa !20
  %98 = sext i16 %97 to i32
  %99 = load i16, ptr %39, align 8, !tbaa !19
  %100 = sext i16 %99 to i32
  %101 = sub nsw i32 %98, %100
  %102 = call i32 @mul_n_q16(i32 noundef %96, i32 noundef %101)
  %103 = call signext i16 @reinterpret_s16_q16(i32 noundef %102)
  %104 = load i16, ptr %42, align 4, !tbaa !20
  %105 = load i16, ptr %40, align 2, !tbaa !18
  %106 = icmp eq i16 %104, %105
  %spec.select = select i1 %106, i16 %86, i16 %103
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  %109 = load i16, ptr %108, align 4, !tbaa !21
  %110 = ashr i16 %109, 1
  %111 = load i16, ptr %37, align 4, !tbaa !21
  %112 = sub i16 %111, %110
  %113 = load i64, ptr %10, align 8
  %.not220 = icmp sgt i16 %spec.select, %110
  %114 = sub i16 %112, %110
  %.not220.fr = freeze i1 %.not220
  br i1 %.not220.fr, label %.split266.us, label %.split

.split266.us:                                     ; preds = %94
  %.not221 = icmp sgt i16 %spec.select, %112
  %.not221.fr = freeze i1 %.not221
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store i64 %113, ptr %11, align 8
  store i16 %spec.select, ptr %43, align 4, !tbaa !21
  %115 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %107, i16 %4, i8 noundef zeroext %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %116 = load i64, ptr %11, align 8
  store i64 %116, ptr %12, align 8
  %117 = trunc i64 %116 to i16
  %118 = add i16 %110, %117
  store i16 %118, ptr %12, align 8, !tbaa !21
  br i1 %.not221.fr, label %.split.us.us.us, label %.split.us.us

.split.us.us.us:                                  ; preds = %.split266.us
  store i16 %114, ptr %44, align 4, !tbaa !21
  %119 = call i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %12, i16 %4, i8 noundef zeroext %6) #7
  %120 = load i32, ptr %10, align 8, !tbaa !21
  %.sroa.417.0.copyload.us.us.us.us = load i16, ptr %37, align 4
  %.sroa.520.0.copyload.us.us.us.us = load i16, ptr %.sroa.520.0..sroa_idx, align 2, !tbaa !21
  %121 = sub i16 %.sroa.417.0.copyload.us.us.us.us, %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store i32 %120, ptr %13, align 4, !tbaa !21
  store i16 %.sroa.520.0.copyload.us.us.us.us, ptr %.sroa.520.0..sroa_idx21, align 2, !tbaa !21
  store i16 %110, ptr %.sroa.417.0..sroa_idx18, align 4, !tbaa !21
  %122 = trunc i32 %120 to i16
  %123 = add i16 %121, %122
  store i16 %123, ptr %13, align 4, !tbaa !21
  %124 = call zeroext i1 @arm_2d_region_intersect(ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %12) #7
  br i1 %124, label %131, label %.critedge229.us.us.us.us

.critedge231.us.us.us.us:                         ; preds = %.critedge229.us.us.us.us
  %125 = load i32, ptr %11, align 8, !tbaa !21
  %.sroa.4.0.copyload.us.us.us.us = load i16, ptr %43, align 4
  %.sroa.5.0.copyload.us.us.us.us = load i16, ptr %.sroa.5.0..sroa_idx, align 2, !tbaa !21
  %126 = add i16 %.sroa.4.0.copyload.us.us.us.us, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i32 %125, ptr %15, align 4, !tbaa !21
  store i16 %.sroa.5.0.copyload.us.us.us.us, ptr %.sroa.5.0..sroa_idx9, align 2, !tbaa !21
  store i16 1, ptr %.sroa.4.0..sroa_idx7, align 4, !tbaa !21
  %127 = trunc i32 %125 to i16
  %128 = add i16 %126, %127
  store i16 %128, ptr %15, align 4, !tbaa !21
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %53, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %15) #7
  %129 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %.critedge227.split.us.us.split.us.us

.critedge227.split.us.us.split.us.us:             ; preds = %.critedge229.us.us.us.us, %.critedge231.us.us.us.us
  %130 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %.split268.us

131:                                              ; preds = %.split.us.us.us
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  store i8 4, ptr %14, align 8
  store i8 0, ptr %45, align 1
  store i16 0, ptr %46, align 2
  store i16 %110, ptr %47, align 4, !tbaa !23
  store i16 0, ptr %48, align 2, !tbaa !25
  store i16 %110, ptr %49, align 8, !tbaa !26
  %132 = load ptr, ptr %20, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 10
  %134 = load i16, ptr %133, align 2, !tbaa !21
  store i16 %134, ptr %50, align 2, !tbaa !28
  store ptr %132, ptr %51, align 8, !tbaa !21
  %135 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %12, ptr noundef nonnull %14, i16 %4, i8 noundef zeroext %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %.critedge229.us.us.us.us

.critedge229.us.us.us.us:                         ; preds = %131, %.split.us.us.us
  %136 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %137 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %138 = trunc nuw i8 %137 to i1
  br i1 %138, label %.critedge227.split.us.us.split.us.us, label %.critedge231.us.us.us.us

.split.us.us:                                     ; preds = %.split266.us
  %139 = lshr i64 %116, 32
  %140 = trunc i64 %139 to i16
  %141 = sub i16 %140, %110
  store i16 %141, ptr %44, align 4, !tbaa !21
  %142 = call i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %12, i16 %4, i8 noundef zeroext %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %143 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %144 = trunc nuw i8 %143 to i1
  br i1 %144, label %.critedge227.split.us.us.split, label %.critedge231.us.us

.critedge231.us.us:                               ; preds = %.split.us.us
  %145 = load i32, ptr %11, align 8, !tbaa !21
  %.sroa.4.0.copyload.us.us = load i16, ptr %43, align 4
  %.sroa.5.0.copyload.us.us = load i16, ptr %.sroa.5.0..sroa_idx, align 2, !tbaa !21
  %146 = add i16 %.sroa.4.0.copyload.us.us, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i32 %145, ptr %15, align 4, !tbaa !21
  store i16 %.sroa.5.0.copyload.us.us, ptr %.sroa.5.0..sroa_idx9, align 2, !tbaa !21
  store i16 1, ptr %.sroa.4.0..sroa_idx7, align 4, !tbaa !21
  %147 = trunc i32 %145 to i16
  %148 = add i16 %146, %147
  store i16 %148, ptr %15, align 4, !tbaa !21
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %53, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %15) #7
  %149 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %.critedge227.split.us.us.split

.critedge227.split.us.us.split:                   ; preds = %.critedge231.us.us, %.split.us.us
  %150 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %.split268.us

.split268.us:                                     ; preds = %.critedge227.split.us.us.split, %.critedge227.split.us.us.split.us.us, %.critedge227.split
  %151 = icmp eq i16 %spec.select, 0
  br i1 %151, label %164, label %161

.split:                                           ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store i64 %113, ptr %11, align 8
  store i16 %spec.select, ptr %43, align 4, !tbaa !21
  %152 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %107, i16 %4, i8 noundef zeroext %6) #7
  %153 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %154 = trunc nuw i8 %153 to i1
  br i1 %154, label %.critedge227.split, label %.critedge231

.critedge231:                                     ; preds = %.split
  %155 = load i32, ptr %11, align 8, !tbaa !21
  %.sroa.4.0.copyload = load i16, ptr %43, align 4
  %.sroa.5.0.copyload = load i16, ptr %.sroa.5.0..sroa_idx, align 2, !tbaa !21
  %156 = add i16 %.sroa.4.0.copyload, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i32 %155, ptr %15, align 4, !tbaa !21
  store i16 %.sroa.5.0.copyload, ptr %.sroa.5.0..sroa_idx9, align 2, !tbaa !21
  store i16 1, ptr %.sroa.4.0..sroa_idx7, align 4, !tbaa !21
  %157 = trunc i32 %155 to i16
  %158 = add i16 %156, %157
  store i16 %158, ptr %15, align 4, !tbaa !21
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %53, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %15) #7
  %159 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %.critedge227.split

.critedge227.split:                               ; preds = %.critedge231, %.split
  %160 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %.split268.us

161:                                              ; preds = %.split268.us
  %162 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %163 = trunc nuw i8 %162 to i1
  br i1 %163, label %164, label %.critedge

164:                                              ; preds = %161, %.split268.us
  store i8 0, ptr %52, align 2, !tbaa !29
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %53, ptr noundef nonnull %8, ptr noundef null, ptr noundef nonnull %10) #7
  br label %.critedge

.critedge:                                        ; preds = %164, %161
  %165 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.thread241.loopexit

.thread241.loopexit:                              ; preds = %.critedge, %82
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  %166 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  br label %.thread241

.thread241:                                       ; preds = %.thread241.loopexit, %54
  %167 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  ret void
}

declare ptr @arm_2d_get_default_frame_buffer() local_unnamed_addr #2

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

declare i32 @arm_2d_target_tile_is_new_frame(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @div_n_q16(i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @reinterpret_q16_s16(i16 noundef signext) local_unnamed_addr #5

declare void @__draw_round_corner_box(ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden signext i16 @reinterpret_s16_q16(i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mul_n_q16(i32 noundef, i32 noundef) local_unnamed_addr #5

declare i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) local_unnamed_addr #2

declare i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) local_unnamed_addr #2

declare zeroext i1 @arm_2d_region_intersect(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @__arm_2d_helper_dirty_region_item_update(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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 nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 16}
!6 = !{!"progress_bar_round_t", !7, i64 0}
!7 = !{!"", !8, i64 0, !14, i64 24, !16, i64 80, !13, i64 84, !17, i64 86}
!8 = !{!"progress_bar_round_cfg_t", !9, i64 0, !12, i64 8, !9, i64 16}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"", !13, i64 0, !13, i64 2}
!13 = !{!"short", !10, i64 0}
!14 = !{!"arm_2d_helper_dirty_region_item_t", !10, i64 0, !15, i64 48}
!15 = !{!"arm_2d_region_t", !10, i64 0, !10, i64 4}
!16 = !{!"int", !10, i64 0}
!17 = !{!"_Bool", !10, i64 0}
!18 = !{!6, !13, i64 10}
!19 = !{!6, !13, i64 8}
!20 = !{!6, !13, i64 84}
!21 = !{!10, !10, i64 0}
!22 = !{!6, !16, i64 80}
!23 = !{!24, !13, i64 0}
!24 = !{!"arm_2d_location_t", !13, i64 0, !13, i64 2}
!25 = !{!24, !13, i64 2}
!26 = !{!27, !13, i64 0}
!27 = !{!"arm_2d_size_t", !13, i64 0, !13, i64 2}
!28 = !{!27, !13, i64 2}
!29 = !{!6, !17, i64 86}
!30 = !{i8 0, i8 2}
!31 = !{}


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