; 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
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.progress_bar_round_show2 = external hidden unnamed_addr constant [140 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

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) #4

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) #4

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) #5

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

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) #5

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

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_op_wait_async(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @progress_bar_round_show2(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) #6 {
  %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 %struct.arm_2d_region_t, align 2
  %49 = alloca ptr, align 8
  %50 = alloca %struct.arm_2d_region_t, align 2
  %51 = alloca ptr, align 8
  %52 = alloca i16, align 2
  %53 = alloca %union.arm_2d_color_rgb565_t, align 2
  %54 = alloca i8, align 1
  %55 = alloca i16, align 2
  %56 = alloca %struct.arm_2d_region_t, align 2
  %57 = alloca ptr, align 8
  %58 = alloca %struct.arm_2d_region_t, align 2
  %59 = alloca ptr, align 8
  %60 = alloca i16, align 2
  %61 = alloca %struct.arm_2d_region_t, align 2
  %62 = alloca ptr, align 8
  %63 = alloca %struct.arm_2d_region_t, align 2
  %64 = alloca ptr, align 8
  %65 = alloca i16, align 2
  %66 = alloca %union.arm_2d_color_rgb565_t, align 2
  %67 = alloca i8, align 1
  %68 = alloca i8, align 1
  %69 = alloca %struct.arm_2d_region_t, align 2
  %70 = alloca ptr, align 8
  %71 = alloca %struct.arm_2d_region_t, align 2
  %72 = alloca ptr, align 8
  %73 = alloca i16, align 2
  %74 = alloca %struct.arm_2d_region_t, align 2
  %75 = alloca ptr, align 8
  %76 = alloca %struct.arm_2d_region_t, align 2
  %77 = alloca ptr, align 8
  %78 = alloca i16, align 2
  %79 = alloca %struct.arm_2d_tile_t, align 8
  %80 = alloca %union.arm_2d_color_rgb565_t, align 2
  %81 = alloca i8, align 1
  %82 = alloca i8, align 1
  %83 = alloca i8, align 1
  %84 = 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
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = ptrtoint ptr %85 to i64
  %87 = icmp eq i64 -1, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %7
  %89 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %89, ptr %9, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %88, %7
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = icmp ne ptr null, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  br label %95

94:                                               ; preds = %90
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 322, ptr noundef @__PRETTY_FUNCTION__.progress_bar_round_show2) #7
  unreachable

95:                                               ; preds = %93
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.progress_bar_round_t, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds %struct.anon, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = icmp ne ptr null, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %95
  br label %104

103:                                              ; preds = %95
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__.progress_bar_round_show2) #7
  unreachable

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = call i32 @arm_2d_target_tile_is_new_frame(ptr noundef %105)
  %107 = icmp ne i32 %106, 0
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %15, align 1, !tbaa !21
  %109 = load i8, ptr %15, align 1, !tbaa !21, !range !22, !noundef !23
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %176

111:                                              ; preds = %104
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.progress_bar_round_t, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %struct.anon, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds %struct.anon.0, ptr %115, i32 0, i32 1
  %117 = load i16, ptr %116, align 2, !tbaa !24
  %118 = sext i16 %117 to i32
  %119 = load i16, ptr %13, align 2, !tbaa !9
  %120 = sext i16 %119 to i32
  %121 = icmp slt i32 %118, %120
  br i1 %121, label %122, label %130

122:                                              ; preds = %111
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.progress_bar_round_t, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.anon, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %125, i32 0, i32 1
  %127 = getelementptr inbounds %struct.anon.0, ptr %126, i32 0, i32 1
  %128 = load i16, ptr %127, align 2, !tbaa !24
  %129 = sext i16 %128 to i32
  br label %133

130:                                              ; preds = %111
  %131 = load i16, ptr %13, align 2, !tbaa !9
  %132 = sext i16 %131 to i32
  br label %133

133:                                              ; preds = %130, %122
  %134 = phi i32 [ %129, %122 ], [ %132, %130 ]
  %135 = trunc i32 %134 to i16
  store i16 %135, ptr %13, align 2, !tbaa !9
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.progress_bar_round_t, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %struct.anon, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %struct.anon.0, ptr %139, i32 0, i32 0
  %141 = load i16, ptr %140, align 8, !tbaa !25
  %142 = sext i16 %141 to i32
  %143 = load i16, ptr %13, align 2, !tbaa !9
  %144 = sext i16 %143 to i32
  %145 = icmp sgt i32 %142, %144
  br i1 %145, label %146, label %154

146:                                              ; preds = %133
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.progress_bar_round_t, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds %struct.anon, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %149, i32 0, i32 1
  %151 = getelementptr inbounds %struct.anon.0, ptr %150, i32 0, i32 0
  %152 = load i16, ptr %151, align 8, !tbaa !25
  %153 = sext i16 %152 to i32
  br label %157

154:                                              ; preds = %133
  %155 = load i16, ptr %13, align 2, !tbaa !9
  %156 = sext i16 %155 to i32
  br label %157

157:                                              ; preds = %154, %146
  %158 = phi i32 [ %153, %146 ], [ %156, %154 ]
  %159 = trunc i32 %158 to i16
  store i16 %159, ptr %13, align 2, !tbaa !9
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.progress_bar_round_t, ptr %160, i32 0, i32 0
  %162 = getelementptr inbounds %struct.anon, ptr %161, i32 0, i32 1
  %163 = load i16, ptr %13, align 2, !tbaa !9
  %164 = sext i16 %163 to i32
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.progress_bar_round_t, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.anon, ptr %166, i32 0, i32 3
  %168 = load i16, ptr %167, align 4, !tbaa !26
  %169 = sext i16 %168 to i32
  %170 = icmp eq i32 %164, %169
  %171 = call zeroext i1 @arm_2d_helper_dirty_region_item_suspend_update(ptr noundef %162, i1 noundef zeroext %170)
  %172 = load i16, ptr %13, align 2, !tbaa !9
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.progress_bar_round_t, ptr %173, i32 0, i32 0
  %175 = getelementptr inbounds %struct.anon, ptr %174, i32 0, i32 3
  store i16 %172, ptr %175, align 4, !tbaa !26
  br label %176

176:                                              ; preds = %157, %104
  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 %177

177:                                              ; preds = %889, %176
  %178 = load ptr, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %178, i32 1
  store ptr %179, ptr %17, align 8, !tbaa !5
  %180 = icmp eq ptr %178, null
  br i1 %180, label %181, label %186

181:                                              ; preds = %177
  %182 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 0
  store i8 0, ptr %182, align 1, !tbaa !27
  %183 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 1
  store i8 0, ptr %183, align 1, !tbaa !29
  %184 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 2
  store i8 0, ptr %184, align 1, !tbaa !30
  %185 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %18, i32 0, i32 3
  store i8 0, ptr %185, 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 %187

186:                                              ; preds = %177
  br label %187

187:                                              ; preds = %186, %181
  %188 = phi i32 [ 1, %181 ], [ 0, %186 ]
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %191, label %190

190:                                              ; preds = %187
  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 %890

191:                                              ; preds = %187
  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 %192

192:                                              ; preds = %887, %191
  %193 = load ptr, ptr %21, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.arm_2d_region_t, ptr %193, i32 1
  store ptr %194, ptr %21, align 8, !tbaa !5
  %195 = icmp eq ptr %193, null
  br i1 %195, label %196, label %264

196:                                              ; preds = %192
  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
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %197, ptr %23, align 8, !tbaa !5
  %198 = load ptr, ptr %23, align 8, !tbaa !5
  %199 = icmp eq ptr null, %198
  br i1 %199, label %200, label %206

200:                                              ; preds = %196
  %201 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %201, ptr %23, align 8, !tbaa !5
  %202 = load ptr, ptr %23, align 8, !tbaa !5
  %203 = icmp eq ptr null, %202
  br i1 %203, label %204, label %205

204:                                              ; preds = %200
  store i32 4, ptr %19, align 4
  br label %261

205:                                              ; preds = %200
  br label %206

206:                                              ; preds = %205, %196
  %207 = load ptr, ptr %10, align 8, !tbaa !5
  %208 = icmp eq ptr null, %207
  br i1 %208, label %209, label %214

209:                                              ; preds = %206
  %210 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %211 = load ptr, ptr %23, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %211, i32 0, i32 1
  %213 = getelementptr inbounds %struct.arm_2d_region_t, ptr %212, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %210, ptr align 4 %213, i64 4, i1 false), !tbaa.struct !33
  br label %216

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

216:                                              ; preds = %214, %209
  %217 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 0
  %218 = load i8, ptr %217, align 1, !tbaa !27
  %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 0
  %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 2
  %227 = load i8, ptr %226, align 1, !tbaa !30
  %228 = zext i8 %227 to i32
  %229 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 0
  %230 = getelementptr inbounds %struct.arm_2d_location_t, ptr %229, i32 0, i32 1
  %231 = load i16, ptr %230, align 2, !tbaa !11
  %232 = sext i16 %231 to i32
  %233 = add nsw i32 %232, %228
  %234 = trunc i32 %233 to i16
  store i16 %234, ptr %230, align 2, !tbaa !11
  %235 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 0
  %236 = load i8, ptr %235, align 1, !tbaa !27
  %237 = zext i8 %236 to i32
  %238 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 1
  %239 = load i8, ptr %238, align 1, !tbaa !29
  %240 = zext i8 %239 to i32
  %241 = add nsw i32 %237, %240
  %242 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %243 = getelementptr inbounds %struct.arm_2d_size_t, ptr %242, i32 0, i32 0
  %244 = load i16, ptr %243, align 2, !tbaa !11
  %245 = sext i16 %244 to i32
  %246 = sub nsw i32 %245, %241
  %247 = trunc i32 %246 to i16
  store i16 %247, ptr %243, align 2, !tbaa !11
  %248 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 2
  %249 = load i8, ptr %248, align 1, !tbaa !30
  %250 = zext i8 %249 to i32
  %251 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %16, i32 0, i32 3
  %252 = load i8, ptr %251, align 1, !tbaa !31
  %253 = zext i8 %252 to i32
  %254 = add nsw i32 %250, %253
  %255 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %256 = getelementptr inbounds %struct.arm_2d_size_t, ptr %255, i32 0, i32 1
  %257 = load i16, ptr %256, align 2, !tbaa !11
  %258 = sext i16 %257 to i32
  %259 = sub nsw i32 %258, %254
  %260 = trunc i32 %259 to i16
  store i16 %260, ptr %256, 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 %261

261:                                              ; preds = %216, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %262 = load i32, ptr %19, align 4
  switch i32 %262, label %888 [
    i32 0, label %263
  ]

263:                                              ; preds = %261
  br label %265

264:                                              ; preds = %192
  br label %265

265:                                              ; preds = %264, %263
  %266 = phi i32 [ 1, %263 ], [ 0, %264 ]
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %269, label %268

268:                                              ; preds = %265
  store i32 4, ptr %19, align 4
  br label %888

269:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %270 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %270, 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 %271

271:                                              ; preds = %884, %269
  %272 = load ptr, ptr %25, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %272, i32 1
  store ptr %273, ptr %25, align 8, !tbaa !5
  %274 = icmp eq ptr %272, null
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  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 %886

276:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %277 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %278 = getelementptr inbounds %struct.arm_2d_region_t, ptr %20, i32 0, i32 1
  %279 = getelementptr inbounds %struct.arm_2d_size_t, ptr %278, i32 0, i32 0
  %280 = load i16, ptr %279, align 2, !tbaa !11
  store i16 %280, ptr %277, align 2, !tbaa !35
  %281 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 1
  %282 = load ptr, ptr %8, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.progress_bar_round_t, ptr %282, i32 0, i32 0
  %284 = getelementptr inbounds %struct.anon, ptr %283, i32 0, i32 0
  %285 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %284, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !12
  %287 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %286, i32 0, i32 1
  %288 = getelementptr inbounds %struct.arm_2d_region_t, ptr %287, i32 0, i32 1
  %289 = getelementptr inbounds %struct.arm_2d_size_t, ptr %288, i32 0, i32 1
  %290 = load i16, ptr %289, align 2, !tbaa !11
  store i16 %290, ptr %281, align 2, !tbaa !37
  %291 = load ptr, ptr %10, align 8, !tbaa !5
  %292 = icmp eq ptr null, %291
  br i1 %292, label %293, label %301

293:                                              ; preds = %276
  %294 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %295 = load i16, ptr %294, align 2, !tbaa !35
  %296 = sext i16 %295 to i32
  %297 = mul nsw i32 %296, 3
  %298 = ashr i32 %297, 3
  %299 = trunc i32 %298 to i16
  %300 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  store i16 %299, ptr %300, align 2, !tbaa !35
  br label %301

301:                                              ; preds = %293, %276
  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 %302

302:                                              ; preds = %882, %301
  %303 = load ptr, ptr %28, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.arm_2d_region_t, ptr %303, i32 1
  store ptr %304, ptr %28, align 8, !tbaa !5
  %305 = icmp eq ptr %303, null
  br i1 %305, label %307, label %306

306:                                              ; preds = %302
  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 %883

307:                                              ; preds = %302
  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 %308

308:                                              ; preds = %877, %307
  %309 = load ptr, ptr %30, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.arm_2d_region_t, ptr %309, i32 1
  store ptr %310, ptr %30, align 8, !tbaa !5
  %311 = icmp eq ptr %309, null
  br i1 %311, label %312, label %354

312:                                              ; preds = %308
  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
  %313 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 0
  %314 = load i16, ptr %313, align 2, !tbaa !35
  %315 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %316 = getelementptr inbounds %struct.arm_2d_size_t, ptr %315, i32 0, i32 0
  store i16 %314, ptr %316, align 2, !tbaa !11
  %317 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 1
  %318 = load i16, ptr %317, align 2, !tbaa !37
  %319 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %320 = getelementptr inbounds %struct.arm_2d_size_t, ptr %319, i32 0, i32 1
  store i16 %318, ptr %320, align 2, !tbaa !11
  %321 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %322 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %321, ptr align 2 %322, i64 4, i1 false), !tbaa.struct !33
  %323 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 1
  %324 = getelementptr inbounds %struct.arm_2d_size_t, ptr %323, i32 0, i32 0
  %325 = load i16, ptr %324, align 2, !tbaa !11
  %326 = sext i16 %325 to i32
  %327 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 0
  %328 = load i16, ptr %327, align 2, !tbaa !35
  %329 = sext i16 %328 to i32
  %330 = sub nsw i32 %326, %329
  %331 = ashr i32 %330, 1
  %332 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %333 = getelementptr inbounds %struct.arm_2d_location_t, ptr %332, i32 0, i32 0
  %334 = load i16, ptr %333, align 2, !tbaa !11
  %335 = sext i16 %334 to i32
  %336 = add nsw i32 %335, %331
  %337 = trunc i32 %336 to i16
  store i16 %337, ptr %333, align 2, !tbaa !11
  %338 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 1
  %339 = getelementptr inbounds %struct.arm_2d_size_t, ptr %338, i32 0, i32 1
  %340 = load i16, ptr %339, align 2, !tbaa !11
  %341 = sext i16 %340 to i32
  %342 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 1
  %343 = load i16, ptr %342, align 2, !tbaa !37
  %344 = sext i16 %343 to i32
  %345 = sub nsw i32 %341, %344
  %346 = ashr i32 %345, 1
  %347 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  %348 = getelementptr inbounds %struct.arm_2d_location_t, ptr %347, i32 0, i32 1
  %349 = load i16, ptr %348, align 2, !tbaa !11
  %350 = sext i16 %349 to i32
  %351 = add nsw i32 %350, %346
  %352 = trunc i32 %351 to i16
  store i16 %352, ptr %348, align 2, !tbaa !11
  store i16 %352, ptr %32, align 2, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  %353 = load i16, ptr %32, align 2, !tbaa !9
  br label %355

354:                                              ; preds = %308
  br label %355

355:                                              ; preds = %354, %312
  %356 = phi i32 [ 1, %312 ], [ 0, %354 ]
  %357 = icmp ne i32 %356, 0
  br i1 %357, label %359, label %358

358:                                              ; preds = %355
  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 %882

359:                                              ; preds = %355
  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 %360

360:                                              ; preds = %875, %359
  %361 = load ptr, ptr %34, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %361, i32 1
  store ptr %362, ptr %34, align 8, !tbaa !5
  %363 = icmp eq ptr %361, null
  br i1 %363, label %364, label %369

364:                                              ; preds = %360
  %365 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 0
  store i8 0, ptr %365, align 1, !tbaa !27
  %366 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 1
  store i8 0, ptr %366, align 1, !tbaa !29
  %367 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 2
  store i8 0, ptr %367, align 1, !tbaa !30
  %368 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %35, i32 0, i32 3
  store i8 0, ptr %368, 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 %370

369:                                              ; preds = %360
  br label %370

370:                                              ; preds = %369, %364
  %371 = phi i32 [ 1, %364 ], [ 0, %369 ]
  %372 = icmp ne i32 %371, 0
  br i1 %372, label %374, label %373

373:                                              ; preds = %370
  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 %876

374:                                              ; preds = %370
  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 %375

375:                                              ; preds = %873, %374
  %376 = load ptr, ptr %37, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %376, i32 1
  store ptr %377, ptr %37, align 8, !tbaa !5
  %378 = icmp eq ptr %376, null
  br i1 %378, label %379, label %440

379:                                              ; preds = %375
  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
  %380 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %380, ptr %39, align 8, !tbaa !5
  %381 = load ptr, ptr %39, align 8, !tbaa !5
  %382 = icmp eq ptr null, %381
  br i1 %382, label %383, label %389

383:                                              ; preds = %379
  %384 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %384, ptr %39, align 8, !tbaa !5
  %385 = load ptr, ptr %39, align 8, !tbaa !5
  %386 = icmp eq ptr null, %385
  br i1 %386, label %387, label %388

387:                                              ; preds = %383
  store i32 17, ptr %19, align 4
  br label %436

388:                                              ; preds = %383
  br label %389

389:                                              ; preds = %388, %379
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %38, ptr align 2 %29, i64 8, i1 false), !tbaa.struct !34
  %390 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 0
  %391 = load i8, ptr %390, align 1, !tbaa !27
  %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 0
  %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 2
  %400 = load i8, ptr %399, align 1, !tbaa !30
  %401 = zext i8 %400 to i32
  %402 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 0
  %403 = getelementptr inbounds %struct.arm_2d_location_t, ptr %402, i32 0, i32 1
  %404 = load i16, ptr %403, align 2, !tbaa !11
  %405 = sext i16 %404 to i32
  %406 = add nsw i32 %405, %401
  %407 = trunc i32 %406 to i16
  store i16 %407, ptr %403, align 2, !tbaa !11
  %408 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 0
  %409 = load i8, ptr %408, align 1, !tbaa !27
  %410 = zext i8 %409 to i32
  %411 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 1
  %412 = load i8, ptr %411, align 1, !tbaa !29
  %413 = zext i8 %412 to i32
  %414 = add nsw i32 %410, %413
  %415 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 1
  %416 = getelementptr inbounds %struct.arm_2d_size_t, ptr %415, i32 0, i32 0
  %417 = load i16, ptr %416, align 2, !tbaa !11
  %418 = sext i16 %417 to i32
  %419 = sub nsw i32 %418, %414
  %420 = trunc i32 %419 to i16
  store i16 %420, ptr %416, align 2, !tbaa !11
  %421 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 2
  %422 = load i8, ptr %421, align 1, !tbaa !30
  %423 = zext i8 %422 to i32
  %424 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %33, i32 0, i32 3
  %425 = load i8, ptr %424, align 1, !tbaa !31
  %426 = zext i8 %425 to i32
  %427 = add nsw i32 %423, %426
  %428 = getelementptr inbounds %struct.arm_2d_region_t, ptr %38, i32 0, i32 1
  %429 = getelementptr inbounds %struct.arm_2d_size_t, ptr %428, i32 0, i32 1
  %430 = load i16, ptr %429, align 2, !tbaa !11
  %431 = sext i16 %430 to i32
  %432 = sub nsw i32 %431, %427
  %433 = trunc i32 %432 to i16
  store i16 %433, ptr %429, align 2, !tbaa !11
  %434 = load ptr, ptr %39, align 8, !tbaa !5
  %435 = call ptr @arm_2d_tile_generate_child(ptr noundef %434, ptr noundef %38, ptr noundef %36, i1 noundef zeroext false)
  store ptr %435, ptr %40, align 8, !tbaa !5
  store i32 0, ptr %19, align 4
  br label %436

436:                                              ; preds = %389, %387
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  %437 = load i32, ptr %19, align 4
  switch i32 %437, label %874 [
    i32 0, label %438
  ]

438:                                              ; preds = %436
  %439 = load ptr, ptr %40, align 8, !tbaa !5
  br label %441

440:                                              ; preds = %375
  br label %441

441:                                              ; preds = %440, %438
  %442 = phi i32 [ 1, %438 ], [ 0, %440 ]
  %443 = icmp ne i32 %442, 0
  br i1 %443, label %445, label %444

444:                                              ; preds = %441
  store i32 17, ptr %19, align 4
  br label %874

445:                                              ; preds = %441
  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 %446

446:                                              ; preds = %867, %445
  %447 = load ptr, ptr %42, align 8, !tbaa !5
  %448 = getelementptr inbounds %struct.arm_2d_region_t, ptr %447, i32 1
  store ptr %448, ptr %42, align 8, !tbaa !5
  %449 = icmp eq ptr %447, null
  br i1 %449, label %450, label %454

450:                                              ; preds = %446
  %451 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %452 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %36, i32 0, i32 1
  %453 = getelementptr inbounds %struct.arm_2d_region_t, ptr %452, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %451, ptr align 4 %453, i64 4, i1 false), !tbaa.struct !33
  br label %455

454:                                              ; preds = %446
  br label %455

455:                                              ; preds = %454, %450
  %456 = phi i32 [ 1, %450 ], [ 0, %454 ]
  %457 = icmp ne i32 %456, 0
  br i1 %457, label %459, label %458

458:                                              ; preds = %455
  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 %872

459:                                              ; preds = %455
  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 %460

460:                                              ; preds = %864, %459
  %461 = load ptr, ptr %44, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %461, i32 1
  store ptr %462, ptr %44, align 8, !tbaa !5
  %463 = icmp eq ptr %461, null
  br i1 %463, label %465, label %464

464:                                              ; preds = %460
  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 %866

465:                                              ; preds = %460
  call void @llvm.lifetime.start.p0(i64 2, ptr %45) #8
  %466 = getelementptr inbounds %struct.arm_2d_region_t, ptr %41, i32 0, i32 1
  %467 = getelementptr inbounds %struct.arm_2d_size_t, ptr %466, i32 0, i32 0
  %468 = load i16, ptr %467, align 2, !tbaa !11
  %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 2
  %474 = load ptr, ptr %473, align 8, !tbaa !12
  %475 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %474, i32 0, i32 1
  %476 = getelementptr inbounds %struct.arm_2d_region_t, ptr %475, i32 0, i32 1
  %477 = getelementptr inbounds %struct.arm_2d_size_t, ptr %476, i32 0, i32 0
  %478 = load i16, ptr %477, align 4, !tbaa !11
  %479 = sext i16 %478 to i32
  %480 = sub nsw i32 %469, %479
  %481 = trunc i32 %480 to i16
  store i16 %481, ptr %45, align 2, !tbaa !9
  %482 = load i8, ptr %15, align 1, !tbaa !21, !range !22, !noundef !23
  %483 = trunc i8 %482 to i1
  br i1 %483, label %484, label %509

484:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 2, ptr %46) #8
  %485 = load ptr, ptr %8, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.progress_bar_round_t, ptr %485, i32 0, i32 0
  %487 = getelementptr inbounds %struct.anon, ptr %486, i32 0, i32 0
  %488 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %487, i32 0, i32 1
  %489 = getelementptr inbounds %struct.anon.0, ptr %488, i32 0, i32 1
  %490 = load i16, ptr %489, align 2, !tbaa !24
  %491 = sext i16 %490 to i32
  %492 = load ptr, ptr %8, align 8, !tbaa !5
  %493 = getelementptr inbounds %struct.progress_bar_round_t, ptr %492, i32 0, i32 0
  %494 = getelementptr inbounds %struct.anon, ptr %493, i32 0, i32 0
  %495 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %494, i32 0, i32 1
  %496 = getelementptr inbounds %struct.anon.0, ptr %495, i32 0, i32 0
  %497 = load i16, ptr %496, align 8, !tbaa !25
  %498 = sext i16 %497 to i32
  %499 = sub nsw i32 %491, %498
  %500 = trunc i32 %499 to i16
  store i16 %500, ptr %46, align 2, !tbaa !9
  %501 = load i16, ptr %45, align 2, !tbaa !9
  %502 = call i32 @reinterpret_q16_s16(i16 noundef signext %501)
  %503 = load i16, ptr %46, align 2, !tbaa !9
  %504 = sext i16 %503 to i32
  %505 = call i32 @div_n_q16(i32 noundef %502, i32 noundef %504)
  %506 = load ptr, ptr %8, align 8, !tbaa !5
  %507 = getelementptr inbounds %struct.progress_bar_round_t, ptr %506, i32 0, i32 0
  %508 = getelementptr inbounds %struct.anon, ptr %507, i32 0, i32 2
  store i32 %505, ptr %508, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 2, ptr %46) #8
  br label %509

509:                                              ; preds = %484, %465
  %510 = load i16, ptr %11, align 2, !tbaa !9
  %511 = load i8, ptr %14, align 1, !tbaa !11
  %512 = load ptr, ptr %8, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct.progress_bar_round_t, ptr %512, i32 0, i32 0
  %514 = getelementptr inbounds %struct.anon, ptr %513, i32 0, i32 0
  %515 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %514, i32 0, i32 2
  %516 = load ptr, ptr %515, align 8, !tbaa !12
  call void @__draw_round_corner_box(ptr noundef %36, ptr noundef null, i16 noundef zeroext %510, i8 noundef zeroext %511, ptr noundef %516)
  call void @llvm.lifetime.start.p0(i64 2, ptr %47) #8
  %517 = load ptr, ptr %8, align 8, !tbaa !5
  %518 = getelementptr inbounds %struct.progress_bar_round_t, ptr %517, i32 0, i32 0
  %519 = getelementptr inbounds %struct.anon, ptr %518, i32 0, i32 0
  %520 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %519, i32 0, i32 2
  %521 = load ptr, ptr %520, align 8, !tbaa !12
  %522 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %521, i32 0, i32 1
  %523 = getelementptr inbounds %struct.arm_2d_region_t, ptr %522, i32 0, i32 1
  %524 = getelementptr inbounds %struct.arm_2d_size_t, ptr %523, i32 0, i32 0
  %525 = load i16, ptr %524, align 4, !tbaa !11
  %526 = sext i16 %525 to i32
  %527 = ashr i32 %526, 1
  %528 = trunc i32 %527 to i16
  store i16 %528, ptr %47, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %48, ptr align 2 %41, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  store ptr null, ptr %49, align 8, !tbaa !5
  br label %529

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

533:                                              ; preds = %529
  store i32 26, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %566

534:                                              ; preds = %529
  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 %48, 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 %535

535:                                              ; preds = %560, %534
  %536 = load ptr, ptr %51, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.arm_2d_region_t, ptr %536, i32 1
  store ptr %537, ptr %51, align 8, !tbaa !5
  %538 = icmp eq ptr %536, null
  br i1 %538, label %539, label %544

539:                                              ; preds = %535
  %540 = load i16, ptr %47, align 2, !tbaa !9
  %541 = getelementptr inbounds %struct.arm_2d_region_t, ptr %50, i32 0, i32 1
  %542 = getelementptr inbounds %struct.arm_2d_size_t, ptr %541, i32 0, i32 0
  store i16 %540, ptr %542, align 2, !tbaa !11
  store i16 %540, ptr %52, align 2, !tbaa !9
  %543 = load i16, ptr %52, align 2, !tbaa !9
  br label %545

544:                                              ; preds = %535
  br label %545

545:                                              ; preds = %544, %539
  %546 = phi i32 [ 1, %539 ], [ 0, %544 ]
  %547 = icmp ne i32 %546, 0
  br i1 %547, label %549, label %548

548:                                              ; preds = %545
  store i32 28, 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 %565

549:                                              ; preds = %545
  %550 = load ptr, ptr %8, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.progress_bar_round_t, ptr %550, i32 0, i32 0
  %552 = getelementptr inbounds %struct.anon, ptr %551, i32 0, i32 0
  %553 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %552, i32 0, i32 2
  %554 = load ptr, ptr %553, align 8, !tbaa !12
  %555 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %555, ptr %53, align 2, !tbaa !11
  %556 = load i8, ptr %14, align 1, !tbaa !11
  %557 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %53, i32 0, i32 0
  %558 = load i16, ptr %557, align 2
  %559 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef %36, ptr noundef %50, ptr noundef %554, i16 %558, i8 noundef zeroext %556)
  br label %560

560:                                              ; preds = %549
  %561 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %562 = zext i1 %561 to i8
  store i8 %562, ptr %54, align 1, !tbaa !21
  %563 = load i8, ptr %54, align 1, !tbaa !21, !range !22, !noundef !23
  %564 = trunc i8 %563 to i1
  br label %535, !llvm.loop !39

565:                                              ; preds = %548
  br label %529, !llvm.loop !41

566:                                              ; preds = %533
  call void @llvm.lifetime.start.p0(i64 2, ptr %55) #8
  %567 = load ptr, ptr %8, align 8, !tbaa !5
  %568 = getelementptr inbounds %struct.progress_bar_round_t, ptr %567, i32 0, i32 0
  %569 = getelementptr inbounds %struct.anon, ptr %568, i32 0, i32 2
  %570 = load i32, ptr %569, align 8, !tbaa !38
  %571 = load ptr, ptr %8, align 8, !tbaa !5
  %572 = getelementptr inbounds %struct.progress_bar_round_t, ptr %571, i32 0, i32 0
  %573 = getelementptr inbounds %struct.anon, ptr %572, i32 0, i32 3
  %574 = load i16, ptr %573, align 4, !tbaa !26
  %575 = sext i16 %574 to i32
  %576 = load ptr, ptr %8, align 8, !tbaa !5
  %577 = getelementptr inbounds %struct.progress_bar_round_t, ptr %576, i32 0, i32 0
  %578 = getelementptr inbounds %struct.anon, ptr %577, i32 0, i32 0
  %579 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %578, i32 0, i32 1
  %580 = getelementptr inbounds %struct.anon.0, ptr %579, i32 0, i32 0
  %581 = load i16, ptr %580, align 8, !tbaa !25
  %582 = sext i16 %581 to i32
  %583 = sub nsw i32 %575, %582
  %584 = call i32 @mul_n_q16(i32 noundef %570, i32 noundef %583)
  %585 = call signext i16 @reinterpret_s16_q16(i32 noundef %584)
  store i16 %585, ptr %55, align 2, !tbaa !9
  %586 = load ptr, ptr %8, align 8, !tbaa !5
  %587 = getelementptr inbounds %struct.progress_bar_round_t, ptr %586, i32 0, i32 0
  %588 = getelementptr inbounds %struct.anon, ptr %587, i32 0, i32 3
  %589 = load i16, ptr %588, align 4, !tbaa !26
  %590 = sext i16 %589 to i32
  %591 = load ptr, ptr %8, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct.progress_bar_round_t, ptr %591, i32 0, i32 0
  %593 = getelementptr inbounds %struct.anon, ptr %592, i32 0, i32 0
  %594 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %593, i32 0, i32 1
  %595 = getelementptr inbounds %struct.anon.0, ptr %594, i32 0, i32 1
  %596 = load i16, ptr %595, align 2, !tbaa !24
  %597 = sext i16 %596 to i32
  %598 = icmp eq i32 %590, %597
  br i1 %598, label %599, label %601

599:                                              ; preds = %566
  %600 = load i16, ptr %45, align 2, !tbaa !9
  store i16 %600, ptr %55, align 2, !tbaa !9
  br label %601

601:                                              ; preds = %599, %566
  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 %41, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  store ptr null, ptr %57, align 8, !tbaa !5
  br label %602

602:                                              ; preds = %710, %601
  %603 = load ptr, ptr %57, align 8, !tbaa !5
  %604 = getelementptr inbounds %struct.arm_2d_region_t, ptr %603, i32 1
  store ptr %604, ptr %57, align 8, !tbaa !5
  %605 = icmp eq ptr %603, null
  br i1 %605, label %607, label %606

606:                                              ; preds = %602
  store i32 31, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  br label %711

607:                                              ; preds = %602
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %58, ptr align 2 %56, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  store ptr null, ptr %59, align 8, !tbaa !5
  br label %608

608:                                              ; preds = %705, %607
  %609 = load ptr, ptr %59, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.arm_2d_region_t, ptr %609, i32 1
  store ptr %610, ptr %59, align 8, !tbaa !5
  %611 = icmp eq ptr %609, null
  br i1 %611, label %612, label %666

612:                                              ; preds = %608
  %613 = load ptr, ptr %8, align 8, !tbaa !5
  %614 = getelementptr inbounds %struct.progress_bar_round_t, ptr %613, i32 0, i32 0
  %615 = getelementptr inbounds %struct.anon, ptr %614, i32 0, i32 0
  %616 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %615, i32 0, i32 2
  %617 = load ptr, ptr %616, align 8, !tbaa !12
  %618 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %617, i32 0, i32 1
  %619 = getelementptr inbounds %struct.arm_2d_region_t, ptr %618, i32 0, i32 1
  %620 = getelementptr inbounds %struct.arm_2d_size_t, ptr %619, i32 0, i32 1
  %621 = load i16, ptr %620, align 2, !tbaa !11
  %622 = getelementptr inbounds %struct.arm_2d_region_t, ptr %58, i32 0, i32 1
  %623 = getelementptr inbounds %struct.arm_2d_size_t, ptr %622, i32 0, i32 1
  store i16 %621, ptr %623, align 2, !tbaa !11
  %624 = getelementptr inbounds %struct.arm_2d_region_t, ptr %56, i32 0, i32 1
  %625 = getelementptr inbounds %struct.arm_2d_size_t, ptr %624, i32 0, i32 1
  %626 = load i16, ptr %625, align 2, !tbaa !11
  %627 = sext i16 %626 to i32
  %628 = load ptr, ptr %8, align 8, !tbaa !5
  %629 = getelementptr inbounds %struct.progress_bar_round_t, ptr %628, i32 0, i32 0
  %630 = getelementptr inbounds %struct.anon, ptr %629, i32 0, i32 0
  %631 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %630, i32 0, i32 2
  %632 = load ptr, ptr %631, align 8, !tbaa !12
  %633 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %632, i32 0, i32 1
  %634 = getelementptr inbounds %struct.arm_2d_region_t, ptr %633, i32 0, i32 1
  %635 = getelementptr inbounds %struct.arm_2d_size_t, ptr %634, i32 0, i32 1
  %636 = load i16, ptr %635, align 2, !tbaa !11
  %637 = sext i16 %636 to i32
  %638 = sub nsw i32 %627, %637
  %639 = ashr i32 %638, 1
  %640 = getelementptr inbounds %struct.arm_2d_region_t, ptr %58, i32 0, i32 0
  %641 = getelementptr inbounds %struct.arm_2d_location_t, ptr %640, i32 0, i32 1
  %642 = load i16, ptr %641, align 2, !tbaa !11
  %643 = sext i16 %642 to i32
  %644 = add nsw i32 %643, %639
  %645 = trunc i32 %644 to i16
  store i16 %645, ptr %641, align 2, !tbaa !11
  %646 = load i16, ptr %47, align 2, !tbaa !9
  %647 = sext i16 %646 to i32
  %648 = load i16, ptr %47, align 2, !tbaa !9
  %649 = sext i16 %648 to i32
  %650 = add nsw i32 %647, %649
  %651 = getelementptr inbounds %struct.arm_2d_region_t, ptr %58, i32 0, i32 1
  %652 = getelementptr inbounds %struct.arm_2d_size_t, ptr %651, i32 0, i32 0
  %653 = load i16, ptr %652, align 2, !tbaa !11
  %654 = sext i16 %653 to i32
  %655 = sub nsw i32 %654, %650
  %656 = trunc i32 %655 to i16
  store i16 %656, ptr %652, align 2, !tbaa !11
  %657 = load i16, ptr %47, align 2, !tbaa !9
  %658 = sext i16 %657 to i32
  %659 = getelementptr inbounds %struct.arm_2d_region_t, ptr %58, i32 0, i32 0
  %660 = getelementptr inbounds %struct.arm_2d_location_t, ptr %659, i32 0, i32 0
  %661 = load i16, ptr %660, align 2, !tbaa !11
  %662 = sext i16 %661 to i32
  %663 = add nsw i32 %662, %658
  %664 = trunc i32 %663 to i16
  store i16 %664, ptr %660, align 2, !tbaa !11
  store i16 %664, ptr %60, align 2, !tbaa !9
  %665 = load i16, ptr %60, align 2, !tbaa !9
  br label %667

666:                                              ; preds = %608
  br label %667

667:                                              ; preds = %666, %612
  %668 = phi i32 [ 1, %612 ], [ 0, %666 ]
  %669 = icmp ne i32 %668, 0
  br i1 %669, label %671, label %670

670:                                              ; preds = %667
  store i32 33, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  br label %710

671:                                              ; preds = %667
  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 %58, 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 %672

672:                                              ; preds = %703, %671
  %673 = load ptr, ptr %62, align 8, !tbaa !5
  %674 = getelementptr inbounds %struct.arm_2d_region_t, ptr %673, i32 1
  store ptr %674, ptr %62, align 8, !tbaa !5
  %675 = icmp eq ptr %673, null
  br i1 %675, label %677, label %676

676:                                              ; preds = %672
  store i32 36, 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 %704

677:                                              ; preds = %672
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %63, ptr align 2 %61, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  store ptr null, ptr %64, align 8, !tbaa !5
  br label %678

678:                                              ; preds = %698, %677
  %679 = load ptr, ptr %64, align 8, !tbaa !5
  %680 = getelementptr inbounds %struct.arm_2d_region_t, ptr %679, i32 1
  store ptr %680, ptr %64, align 8, !tbaa !5
  %681 = icmp eq ptr %679, null
  br i1 %681, label %682, label %687

682:                                              ; preds = %678
  %683 = load i16, ptr %55, align 2, !tbaa !9
  %684 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 1
  %685 = getelementptr inbounds %struct.arm_2d_size_t, ptr %684, i32 0, i32 0
  store i16 %683, ptr %685, align 2, !tbaa !11
  store i16 %683, ptr %65, align 2, !tbaa !9
  %686 = load i16, ptr %65, align 2, !tbaa !9
  br label %688

687:                                              ; preds = %678
  br label %688

688:                                              ; preds = %687, %682
  %689 = phi i32 [ 1, %682 ], [ 0, %687 ]
  %690 = icmp ne i32 %689, 0
  br i1 %690, label %692, label %691

691:                                              ; preds = %688
  store i32 38, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #8
  br label %703

692:                                              ; preds = %688
  %693 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %693, ptr %66, align 2, !tbaa !11
  %694 = load i8, ptr %14, align 1, !tbaa !11
  %695 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %66, i32 0, i32 0
  %696 = load i16, ptr %695, align 2
  %697 = call i32 @arm_2dp_rgb565_fill_colour_with_opacity(ptr noundef null, ptr noundef %36, ptr noundef %63, i16 %696, i8 noundef zeroext %694)
  br label %698

698:                                              ; preds = %692
  %699 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %700 = zext i1 %699 to i8
  store i8 %700, ptr %67, align 1, !tbaa !21
  %701 = load i8, ptr %67, align 1, !tbaa !21, !range !22, !noundef !23
  %702 = trunc i8 %701 to i1
  br label %678, !llvm.loop !42

703:                                              ; preds = %691
  br label %672, !llvm.loop !43

704:                                              ; preds = %676
  br label %705

705:                                              ; preds = %704
  %706 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %707 = zext i1 %706 to i8
  store i8 %707, ptr %68, align 1, !tbaa !21
  %708 = load i8, ptr %68, align 1, !tbaa !21, !range !22, !noundef !23
  %709 = trunc i8 %708 to i1
  br label %608, !llvm.loop !44

710:                                              ; preds = %670
  br label %602, !llvm.loop !45

711:                                              ; preds = %606
  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 %41, 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 %712

712:                                              ; preds = %845, %711
  %713 = load ptr, ptr %70, align 8, !tbaa !5
  %714 = getelementptr inbounds %struct.arm_2d_region_t, ptr %713, i32 1
  store ptr %714, ptr %70, align 8, !tbaa !5
  %715 = icmp eq ptr %713, null
  br i1 %715, label %717, label %716

716:                                              ; preds = %712
  store i32 41, 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 %846

717:                                              ; preds = %712
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %71, ptr align 2 %69, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #8
  store ptr null, ptr %72, align 8, !tbaa !5
  br label %718

718:                                              ; preds = %840, %717
  %719 = load ptr, ptr %72, align 8, !tbaa !5
  %720 = getelementptr inbounds %struct.arm_2d_region_t, ptr %719, i32 1
  store ptr %720, ptr %72, align 8, !tbaa !5
  %721 = icmp eq ptr %719, null
  br i1 %721, label %722, label %733

722:                                              ; preds = %718
  %723 = load i16, ptr %55, align 2, !tbaa !9
  %724 = sext i16 %723 to i32
  %725 = load i16, ptr %47, align 2, !tbaa !9
  %726 = sext i16 %725 to i32
  %727 = mul nsw i32 %726, 2
  %728 = add nsw i32 %724, %727
  %729 = trunc i32 %728 to i16
  %730 = getelementptr inbounds %struct.arm_2d_region_t, ptr %71, i32 0, i32 1
  %731 = getelementptr inbounds %struct.arm_2d_size_t, ptr %730, i32 0, i32 0
  store i16 %729, ptr %731, align 2, !tbaa !11
  store i16 %729, ptr %73, align 2, !tbaa !9
  %732 = load i16, ptr %73, align 2, !tbaa !9
  br label %734

733:                                              ; preds = %718
  br label %734

734:                                              ; preds = %733, %722
  %735 = phi i32 [ 1, %722 ], [ 0, %733 ]
  %736 = icmp ne i32 %735, 0
  br i1 %736, label %738, label %737

737:                                              ; preds = %734
  store i32 43, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #8
  br label %845

738:                                              ; preds = %734
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %74, ptr align 2 %71, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #8
  store ptr null, ptr %75, align 8, !tbaa !5
  br label %739

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

743:                                              ; preds = %739
  store i32 46, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #8
  br label %839

744:                                              ; preds = %739
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %76, ptr align 2 %74, i64 8, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #8
  store ptr null, ptr %77, align 8, !tbaa !5
  br label %745

745:                                              ; preds = %833, %744
  %746 = load ptr, ptr %77, align 8, !tbaa !5
  %747 = getelementptr inbounds %struct.arm_2d_region_t, ptr %746, i32 1
  store ptr %747, ptr %77, align 8, !tbaa !5
  %748 = icmp eq ptr %746, null
  br i1 %748, label %749, label %767

749:                                              ; preds = %745
  %750 = load i16, ptr %47, align 2, !tbaa !9
  %751 = getelementptr inbounds %struct.arm_2d_region_t, ptr %76, i32 0, i32 1
  %752 = getelementptr inbounds %struct.arm_2d_size_t, ptr %751, i32 0, i32 0
  store i16 %750, ptr %752, align 2, !tbaa !11
  %753 = getelementptr inbounds %struct.arm_2d_region_t, ptr %74, i32 0, i32 1
  %754 = getelementptr inbounds %struct.arm_2d_size_t, ptr %753, i32 0, i32 0
  %755 = load i16, ptr %754, align 2, !tbaa !11
  %756 = sext i16 %755 to i32
  %757 = load i16, ptr %47, align 2, !tbaa !9
  %758 = sext i16 %757 to i32
  %759 = sub nsw i32 %756, %758
  %760 = getelementptr inbounds %struct.arm_2d_region_t, ptr %76, i32 0, i32 0
  %761 = getelementptr inbounds %struct.arm_2d_location_t, ptr %760, i32 0, i32 0
  %762 = load i16, ptr %761, align 2, !tbaa !11
  %763 = sext i16 %762 to i32
  %764 = add nsw i32 %763, %759
  %765 = trunc i32 %764 to i16
  store i16 %765, ptr %761, align 2, !tbaa !11
  store i16 %765, ptr %78, align 2, !tbaa !9
  %766 = load i16, ptr %78, align 2, !tbaa !9
  br label %768

767:                                              ; preds = %745
  br label %768

768:                                              ; preds = %767, %749
  %769 = phi i32 [ 1, %749 ], [ 0, %767 ]
  %770 = icmp ne i32 %769, 0
  br i1 %770, label %772, label %771

771:                                              ; preds = %768
  store i32 48, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #8
  br label %838

772:                                              ; preds = %768
  call void @llvm.lifetime.start.p0(i64 24, ptr %79) #8
  %773 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %79, i32 0, i32 0
  %774 = load i8, ptr %773, align 8
  %775 = and i8 %774, -2
  %776 = or i8 %775, 0
  store i8 %776, ptr %773, align 8
  %777 = load i8, ptr %773, align 8
  %778 = and i8 %777, -3
  %779 = or i8 %778, 0
  store i8 %779, ptr %773, align 8
  %780 = load i8, ptr %773, align 8
  %781 = and i8 %780, -5
  %782 = or i8 %781, 4
  store i8 %782, ptr %773, align 8
  %783 = load i8, ptr %773, align 8
  %784 = and i8 %783, -9
  %785 = or i8 %784, 0
  store i8 %785, ptr %773, align 8
  %786 = load i8, ptr %773, align 8
  %787 = and i8 %786, -17
  %788 = or i8 %787, 0
  store i8 %788, ptr %773, align 8
  %789 = load i8, ptr %773, align 8
  %790 = and i8 %789, 31
  %791 = or i8 %790, 0
  store i8 %791, ptr %773, align 8
  %792 = getelementptr inbounds %struct.anon.11, ptr %773, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 1 %792, i8 0, i64 1, i1 false)
  %793 = getelementptr inbounds %struct.anon.11, ptr %773, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %793, i8 0, i64 2, i1 false)
  %794 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %79, i32 0, i32 1
  %795 = getelementptr inbounds %struct.arm_2d_region_t, ptr %794, i32 0, i32 0
  %796 = getelementptr inbounds %struct.arm_2d_location_t, ptr %795, i32 0, i32 0
  %797 = load i16, ptr %47, align 2, !tbaa !9
  store i16 %797, ptr %796, align 4, !tbaa !46
  %798 = getelementptr inbounds %struct.arm_2d_location_t, ptr %795, i32 0, i32 1
  store i16 0, ptr %798, align 2, !tbaa !48
  %799 = getelementptr inbounds %struct.arm_2d_region_t, ptr %794, i32 0, i32 1
  %800 = getelementptr inbounds %struct.arm_2d_size_t, ptr %799, i32 0, i32 0
  %801 = load i16, ptr %47, align 2, !tbaa !9
  store i16 %801, ptr %800, align 4, !tbaa !35
  %802 = getelementptr inbounds %struct.arm_2d_size_t, ptr %799, i32 0, i32 1
  %803 = load ptr, ptr %8, align 8, !tbaa !5
  %804 = getelementptr inbounds %struct.progress_bar_round_t, ptr %803, i32 0, i32 0
  %805 = getelementptr inbounds %struct.anon, ptr %804, i32 0, i32 0
  %806 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %805, i32 0, i32 2
  %807 = load ptr, ptr %806, align 8, !tbaa !12
  %808 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %807, i32 0, i32 1
  %809 = getelementptr inbounds %struct.arm_2d_region_t, ptr %808, i32 0, i32 1
  %810 = getelementptr inbounds %struct.arm_2d_size_t, ptr %809, i32 0, i32 1
  %811 = load i16, ptr %810, align 2, !tbaa !11
  store i16 %811, ptr %802, align 2, !tbaa !37
  %812 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %79, i32 0, i32 2
  %813 = load ptr, ptr %8, align 8, !tbaa !5
  %814 = getelementptr inbounds %struct.progress_bar_round_t, ptr %813, i32 0, i32 0
  %815 = getelementptr inbounds %struct.anon, ptr %814, i32 0, i32 0
  %816 = getelementptr inbounds %struct.progress_bar_round_cfg_t, ptr %815, i32 0, i32 2
  %817 = load ptr, ptr %816, align 8, !tbaa !12
  store ptr %817, ptr %812, align 8, !tbaa !11
  %818 = load i16, ptr %12, align 2, !tbaa !9
  store i16 %818, ptr %80, align 2, !tbaa !11
  %819 = load i8, ptr %14, align 1, !tbaa !11
  %820 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %80, i32 0, i32 0
  %821 = load i16, ptr %820, align 2
  %822 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef %36, ptr noundef %76, ptr noundef %79, i16 %821, i8 noundef zeroext %819)
  %823 = load ptr, ptr %8, align 8, !tbaa !5
  %824 = getelementptr inbounds %struct.progress_bar_round_t, ptr %823, i32 0, i32 0
  %825 = getelementptr inbounds %struct.anon, ptr %824, i32 0, i32 4
  %826 = load i8, ptr %825, align 2, !tbaa !49, !range !22, !noundef !23
  %827 = trunc i8 %826 to i1
  br i1 %827, label %832, label %828

828:                                              ; preds = %772
  %829 = load ptr, ptr %8, align 8, !tbaa !5
  %830 = getelementptr inbounds %struct.progress_bar_round_t, ptr %829, i32 0, i32 0
  %831 = getelementptr inbounds %struct.anon, ptr %830, i32 0, i32 1
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %831, ptr noundef %36, ptr noundef %71, ptr noundef %76)
  br label %832

832:                                              ; preds = %828, %772
  call void @llvm.lifetime.end.p0(i64 24, ptr %79) #8
  br label %833

833:                                              ; preds = %832
  %834 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %835 = zext i1 %834 to i8
  store i8 %835, ptr %81, align 1, !tbaa !21
  %836 = load i8, ptr %81, align 1, !tbaa !21, !range !22, !noundef !23
  %837 = trunc i8 %836 to i1
  br label %745, !llvm.loop !50

838:                                              ; preds = %771
  br label %739, !llvm.loop !51

839:                                              ; preds = %743
  br label %840

840:                                              ; preds = %839
  %841 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %842 = zext i1 %841 to i8
  store i8 %842, ptr %82, align 1, !tbaa !21
  %843 = load i8, ptr %82, align 1, !tbaa !21, !range !22, !noundef !23
  %844 = trunc i8 %843 to i1
  br label %718, !llvm.loop !52

845:                                              ; preds = %737
  br label %712, !llvm.loop !53

846:                                              ; preds = %716
  %847 = load i16, ptr %55, align 2, !tbaa !9
  %848 = sext i16 %847 to i32
  %849 = icmp eq i32 0, %848
  br i1 %849, label %856, label %850

850:                                              ; preds = %846
  %851 = load ptr, ptr %8, align 8, !tbaa !5
  %852 = getelementptr inbounds %struct.progress_bar_round_t, ptr %851, i32 0, i32 0
  %853 = getelementptr inbounds %struct.anon, ptr %852, i32 0, i32 4
  %854 = load i8, ptr %853, align 2, !tbaa !49, !range !22, !noundef !23
  %855 = trunc i8 %854 to i1
  br i1 %855, label %856, label %863

856:                                              ; preds = %850, %846
  %857 = load ptr, ptr %8, align 8, !tbaa !5
  %858 = getelementptr inbounds %struct.progress_bar_round_t, ptr %857, i32 0, i32 0
  %859 = getelementptr inbounds %struct.anon, ptr %858, i32 0, i32 4
  store i8 0, ptr %859, align 2, !tbaa !49
  %860 = load ptr, ptr %8, align 8, !tbaa !5
  %861 = getelementptr inbounds %struct.progress_bar_round_t, ptr %860, i32 0, i32 0
  %862 = getelementptr inbounds %struct.anon, ptr %861, i32 0, i32 1
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %862, ptr noundef %36, ptr noundef null, ptr noundef %41)
  br label %863

863:                                              ; preds = %856, %850
  call void @llvm.lifetime.end.p0(i64 2, ptr %55) #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 %864

864:                                              ; preds = %863
  %865 = load ptr, ptr %43, align 8, !tbaa !5
  br label %460, !llvm.loop !54

866:                                              ; preds = %464
  br label %867

867:                                              ; preds = %866
  %868 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %869 = zext i1 %868 to i8
  store i8 %869, ptr %83, align 1, !tbaa !21
  %870 = load i8, ptr %83, align 1, !tbaa !21, !range !22, !noundef !23
  %871 = trunc i8 %870 to i1
  br label %446, !llvm.loop !55

872:                                              ; preds = %458
  br label %873

873:                                              ; preds = %872
  br label %375, !llvm.loop !56

874:                                              ; preds = %444, %436
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #8
  br label %875

875:                                              ; preds = %874
  br label %360, !llvm.loop !57

876:                                              ; preds = %373
  br label %877

877:                                              ; preds = %876
  %878 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %879 = zext i1 %878 to i8
  store i8 %879, ptr %84, align 1, !tbaa !21
  %880 = load i8, ptr %84, align 1, !tbaa !21, !range !22, !noundef !23
  %881 = trunc i8 %880 to i1
  br label %308, !llvm.loop !58

882:                                              ; preds = %358
  br label %302, !llvm.loop !59

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

884:                                              ; preds = %883
  %885 = load ptr, ptr %24, align 8, !tbaa !5
  br label %271, !llvm.loop !60

886:                                              ; preds = %275
  br label %887

887:                                              ; preds = %886
  br label %192, !llvm.loop !61

888:                                              ; preds = %268, %261
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %889

889:                                              ; preds = %888
  br label %177, !llvm.loop !62

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

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 = { 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 = { 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 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}
!42 = distinct !{!42, !40}
!43 = distinct !{!43, !40}
!44 = distinct !{!44, !40}
!45 = distinct !{!45, !40}
!46 = !{!47, !10, i64 0}
!47 = !{!"arm_2d_location_t", !10, i64 0, !10, i64 2}
!48 = !{!47, !10, i64 2}
!49 = !{!13, !20, i64 86}
!50 = distinct !{!50, !40}
!51 = distinct !{!51, !40}
!52 = distinct !{!52, !40}
!53 = distinct !{!53, !40}
!54 = distinct !{!54, !40}
!55 = distinct !{!55, !40}
!56 = distinct !{!56, !40}
!57 = distinct !{!57, !40}
!58 = distinct !{!58, !40}
!59 = distinct !{!59, !40}
!60 = distinct !{!60, !40}
!61 = distinct !{!61, !40}
!62 = distinct !{!62, !40}


; 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
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.progress_bar_round_show2 = external hidden unnamed_addr constant [140 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

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) #3

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) #3

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 #4

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

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 #4

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

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_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: nounwind uwtable
define dso_local void @progress_bar_round_show2(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 #5 {
  %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 4
  %13 = alloca %struct.arm_2d_region_t, align 8
  %14 = alloca %struct.arm_2d_region_t, align 4
  %15 = alloca %struct.arm_2d_tile_t, align 8
  %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 323, ptr noundef nonnull @__PRETTY_FUNCTION__.progress_bar_round_show2) #8
  unreachable

23:                                               ; preds = %19
  %24 = tail call i32 @arm_2d_target_tile_is_new_frame(ptr noundef %.0) #7
  %.not221 = icmp eq i32 %24, 0
  br i1 %.not221, label %.preheader287, 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
  %.in222 = 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 %.in222, %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 %.in222, ptr %31, align 4, !tbaa !20
  br label %.preheader287

.preheader287:                                    ; preds = %25, %23
  %35 = icmp eq ptr %.0, null
  %36 = icmp eq ptr %2, null
  %.sroa.7104.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 2
  %.sroa.9107.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 4
  %.sroa.12.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 6
  %.sroa.685.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 2
  %.sroa.888.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 %11, i64 4
  %43 = getelementptr inbounds i8, ptr %0, i64 84
  %.sroa.639.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 6
  %.sroa.533.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 4
  %.sroa.634.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 6
  %44 = getelementptr inbounds i8, ptr %13, i64 4
  %.sroa.4.0..sroa_idx8 = getelementptr inbounds i8, ptr %14, i64 4
  %.sroa.5.0..sroa_idx10 = getelementptr inbounds i8, ptr %14, i64 6
  %45 = getelementptr inbounds i8, ptr %15, i64 1
  %46 = getelementptr inbounds i8, ptr %15, i64 2
  %47 = getelementptr inbounds i8, ptr %15, i64 4
  %48 = getelementptr inbounds i8, ptr %15, i64 6
  %49 = getelementptr inbounds i8, ptr %15, i64 8
  %50 = getelementptr inbounds i8, ptr %15, i64 10
  %51 = getelementptr inbounds i8, ptr %15, i64 16
  %52 = getelementptr inbounds i8, ptr %0, i64 86
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %35, label %54, label %57

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

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

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

60:                                               ; preds = %57
  %.sroa.0102.0.copyload = load i16, ptr %2, align 2
  %.sroa.7104.0.copyload = load i16, ptr %.sroa.7104.0..sroa_idx, align 2, !tbaa !21
  br label %.preheader283

.preheader283:                                    ; preds = %58, %60
  %.sroa.12.2.in = phi ptr [ %.sroa.12.4..sroa_idx, %58 ], [ %.sroa.12.0..sroa_idx, %60 ]
  %.sroa.9107.2.in = phi ptr [ %59, %58 ], [ %.sroa.9107.0..sroa_idx, %60 ]
  %.sroa.7104.2 = phi i16 [ 0, %58 ], [ %.sroa.7104.0.copyload, %60 ]
  %.sroa.0102.2 = phi i16 [ 0, %58 ], [ %.sroa.0102.0.copyload, %60 ]
  %.sroa.9107.2225 = load i16, ptr %.sroa.9107.2.in, align 2
  %.sroa.12.2226 = load i16, ptr %.sroa.12.2.in, align 2, !tbaa !21
  %61 = sext i16 %.sroa.9107.2225 to i32
  %62 = mul nsw i32 %61, 3
  %63 = lshr i32 %62, 3
  %64 = trunc i32 %63 to i16
  %.sroa.094.0 = select i1 %36, i16 %64, i16 %.sroa.9107.2225
  %65 = sext i16 %.sroa.094.0 to i32
  %66 = sub nsw i32 %61, %65
  %67 = lshr i32 %66, 1
  %68 = trunc i32 %67 to i16
  %69 = add i16 %.sroa.0102.2, %68
  %70 = sext i16 %.sroa.12.2226 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.7104.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 = %.preheader283
  %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 %.thread265.loopexit

83:                                               ; preds = %.preheader283, %79
  %.0211 = phi ptr [ %80, %79 ], [ %.0, %.preheader283 ]
  store i16 %69, ptr %9, align 8
  store i16 %78, ptr %.sroa.685.0..sroa_idx, align 2, !tbaa !21
  store i16 %.sroa.094.0, ptr %.sroa.888.0..sroa_idx, align 4, !tbaa !21
  store i16 %73, ptr %.sroa.9.0..sroa_idx, align 2, !tbaa !21
  %84 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %.0211, 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
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load i16, ptr %88, align 4, !tbaa !21
  %90 = sub i16 %86, %89
  br i1 %.not221, label %.loopexit, label %91

91:                                               ; preds = %83
  %92 = load i16, ptr %40, align 2, !tbaa !18
  %93 = load i16, ptr %39, align 8, !tbaa !19
  %94 = sub i16 %92, %93
  %95 = call i32 @reinterpret_q16_s16(i16 noundef signext %90)
  %96 = sext i16 %94 to i32
  %97 = call i32 @div_n_q16(i32 noundef %95, i32 noundef %96)
  store i32 %97, ptr %41, align 8, !tbaa !22
  %.pre = load ptr, ptr %20, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %83, %91
  %98 = phi ptr [ %.pre, %91 ], [ %87, %83 ]
  call void @__draw_round_corner_box(ptr noundef nonnull %8, ptr noundef null, i16 noundef zeroext %3, i8 noundef zeroext %6, ptr noundef %98) #7
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 8
  %101 = load i16, ptr %100, align 4, !tbaa !21
  %102 = ashr i16 %101, 1
  %103 = load i64, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store i64 %103, ptr %11, align 8
  store i16 %102, ptr %42, align 4, !tbaa !21
  %104 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef %99, i16 %4, i8 noundef zeroext %6) #7
  %105 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %106 = load i32, ptr %41, align 8, !tbaa !22
  %107 = load i16, ptr %43, align 4, !tbaa !20
  %108 = sext i16 %107 to i32
  %109 = load i16, ptr %39, align 8, !tbaa !19
  %110 = sext i16 %109 to i32
  %111 = sub nsw i32 %108, %110
  %112 = call i32 @mul_n_q16(i32 noundef %106, i32 noundef %111)
  %113 = call signext i16 @reinterpret_s16_q16(i32 noundef %112)
  %114 = load i16, ptr %43, align 4, !tbaa !20
  %115 = load i16, ptr %40, align 2, !tbaa !18
  %116 = icmp eq i16 %114, %115
  %spec.select = select i1 %116, i16 %90, i16 %113
  %117 = and i16 %101, -2
  %.sroa.639.0.copyload = load i16, ptr %.sroa.639.0..sroa_idx, align 2, !tbaa !21
  %118 = sext i16 %.sroa.639.0.copyload to i32
  %119 = load ptr, ptr %20, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 10
  %121 = load i16, ptr %120, align 2, !tbaa !21
  %122 = sext i16 %121 to i32
  %123 = sub nsw i32 %118, %122
  %124 = lshr i32 %123, 1
  %125 = trunc i32 %124 to i16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %126 = load <2 x i16>, ptr %10, align 8
  %127 = insertelement <2 x i16> poison, i16 %102, i64 0
  %128 = insertelement <2 x i16> %127, i16 %125, i64 1
  %129 = add <2 x i16> %126, %128
  store <2 x i16> %129, ptr %12, align 4
  store i16 %121, ptr %.sroa.634.0..sroa_idx, align 2, !tbaa !21
  store i16 %spec.select, ptr %.sroa.533.0..sroa_idx, align 4, !tbaa !21
  %130 = 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
  %131 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %132 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  %133 = load i64, ptr %10, align 8
  %134 = add i16 %spec.select, %117
  %135 = sub i16 %134, %102
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store i64 %133, ptr %13, align 8
  store i16 %134, ptr %44, align 4, !tbaa !21
  %136 = trunc i64 %133 to i32
  %137 = lshr i64 %133, 48
  %138 = trunc nuw i64 %137 to i16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  store i32 %136, ptr %14, align 4, !tbaa !21
  store i16 %138, ptr %.sroa.5.0..sroa_idx10, align 2, !tbaa !21
  store i16 %102, ptr %.sroa.4.0..sroa_idx8, align 4, !tbaa !21
  %139 = trunc i64 %133 to i16
  %140 = add i16 %135, %139
  store i16 %140, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  store i8 4, ptr %15, align 8
  store i8 0, ptr %45, align 1
  store i16 0, ptr %46, align 2
  store i16 %102, ptr %47, align 4, !tbaa !23
  store i16 0, ptr %48, align 2, !tbaa !25
  store i16 %102, ptr %49, align 8, !tbaa !26
  %141 = load ptr, ptr %20, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 10
  %143 = load i16, ptr %142, align 2, !tbaa !21
  store i16 %143, ptr %50, align 2, !tbaa !28
  store ptr %141, ptr %51, align 8, !tbaa !21
  %144 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %14, ptr noundef nonnull %15, i16 %4, i8 noundef zeroext %6) #7
  %145 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %146 = trunc nuw i8 %145 to i1
  br i1 %146, label %.critedge254, label %147

147:                                              ; preds = %.loopexit
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %53, ptr noundef nonnull %8, ptr noundef nonnull %13, ptr noundef nonnull %14) #7
  br label %.critedge254

.critedge254:                                     ; preds = %147, %.loopexit
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  %148 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %149 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %150 = icmp eq i16 %spec.select, 0
  br i1 %150, label %154, label %151

151:                                              ; preds = %.critedge254
  %152 = load i8, ptr %52, align 2, !tbaa !29, !range !30, !noundef !31
  %153 = trunc nuw i8 %152 to i1
  br i1 %153, label %154, label %.critedge

154:                                              ; preds = %151, %.critedge254
  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 = %154, %151
  %155 = 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 %.thread265.loopexit

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

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

; 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass