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

; 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_layer_t = type { ptr, %struct.arm_2d_region_t, i32, i8, i8, i16 }
%struct.arm_2d_region_t = type { %union.anon, %union.anon.0 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.0 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.demo_gears_t = type { %struct.arm_2d_op_trans_msk_opa_t, ptr, ptr, float, float, %struct.arm_2d_location_t, ptr, ptr, i8, i8 }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.13, %struct.anon.14, %union.anon.15, %struct.anon.17, %struct.anon.18, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { [40 x i8], i64 }
%struct.anon.13 = type { ptr, ptr }
%struct.anon.14 = type { ptr }
%union.anon.15 = type { %struct.anon.16 }
%struct.anon.16 = type { i32 }
%struct.anon.17 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.1, %union.anon.11, %union.anon.12 }
%union.anon.1 = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.4 }
%union.arm_2d_color_info_t = type { %struct.anon.2 }
%struct.anon.2 = type { i8 }
%union.anon.4 = type { i16 }
%union.anon.11 = type { %struct.arm_2d_region_t }
%union.anon.12 = type { ptr }
%struct.anon.18 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.19, [40 x i8] }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.19 = type { i32 }
%struct.arm_2d_margin_t = type { i8, i8, i8, i8 }
%union.arm_2d_color_rgb565_t = type { i16 }

@s_ptRefreshLayers = external hidden global [1 x %struct.arm_2d_layer_t], align 16
@s_tGears = external hidden global [3 x %struct.demo_gears_t], align 16
@s_tStarOP = external hidden global %struct.arm_2d_op_trans_msk_opa_t, align 8
@c_tileCircleBackgroundMask = external constant %struct.arm_2d_tile_t, align 8
@c_tileWatchPanelRGB565 = external constant %struct.arm_2d_tile_t, align 8
@benchmark_watch_panel_draw.__424s_lTimestamp = external hidden global i64, align 8
@benchmark_watch_panel_draw.s_fAngle = external hidden global float, align 4
@benchmark_watch_panel_draw.s_fScale = external hidden global float, align 4
@benchmark_watch_panel_draw.s_chOpacity = external hidden global i8, align 1
@c_tileStarRGB565 = external constant %struct.arm_2d_tile_t, align 8
@c_tileStarMask2 = external constant %struct.arm_2d_tile_t, align 8

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

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

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

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_watch_panel_draw(ptr noundef %0, i1 noundef zeroext %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %struct.arm_2d_region_t, align 2
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.arm_2d_region_t, align 2
  %11 = alloca ptr, align 8
  %12 = alloca %struct.arm_2d_region_t, align 2
  %13 = alloca ptr, align 8
  %14 = alloca i16, align 2
  %15 = alloca %struct.arm_2d_margin_t, align 1
  %16 = alloca ptr, align 8
  %17 = alloca %struct.arm_2d_margin_t, align 1
  %18 = alloca %struct.arm_2d_tile_t, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.arm_2d_region_t, align 2
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.arm_2d_region_t, align 2
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca %struct.arm_2d_region_t, align 2
  %30 = alloca ptr, align 8
  %31 = alloca %struct.arm_2d_region_t, align 2
  %32 = alloca ptr, align 8
  %33 = alloca i16, align 2
  %34 = alloca %union.arm_2d_color_rgb565_t, align 2
  %35 = alloca i8, align 1
  %36 = alloca i8, align 1
  %37 = alloca i8, align 1
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i64, align 8
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.arm_2d_location_t, align 2
  %46 = alloca ptr, align 8
  %47 = alloca i32, align 4
  %48 = alloca i8, align 1
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  %52 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %53 = zext i1 %1 to i8
  store i8 %53, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 2 %5, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %548, %2
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.arm_2d_region_t, ptr %55, i32 1
  store ptr %56, ptr %6, align 8, !tbaa !5
  %57 = icmp eq ptr %55, null
  br i1 %57, label %58, label %63

58:                                               ; preds = %54
  %59 = getelementptr inbounds %struct.arm_2d_region_t, ptr %5, i32 0, i32 1
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %60, i32 0, i32 1
  %62 = getelementptr inbounds %struct.arm_2d_region_t, ptr %61, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %59, ptr align 4 %62, i64 4, i1 false), !tbaa.struct !11
  br label %64

63:                                               ; preds = %54
  br label %64

64:                                               ; preds = %63, %58
  %65 = phi i32 [ 1, %58 ], [ 0, %63 ]
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %553

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %69, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %545, %68
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %71, i32 1
  store ptr %72, ptr %9, align 8, !tbaa !5
  %73 = icmp eq ptr %71, null
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %547

75:                                               ; preds = %70
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call i32 @arm_2dp_rgb16_fill_colour(ptr noundef null, ptr noundef %76, ptr noundef null, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %10, ptr align 2 %5, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %253, %75
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.arm_2d_region_t, ptr %79, i32 1
  store ptr %80, ptr %11, align 8, !tbaa !5
  %81 = icmp eq ptr %79, null
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %254

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %248, %83
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.arm_2d_region_t, ptr %85, i32 1
  store ptr %86, ptr %13, align 8, !tbaa !5
  %87 = icmp eq ptr %85, null
  br i1 %87, label %88, label %120

88:                                               ; preds = %84
  %89 = getelementptr inbounds %struct.arm_2d_region_t, ptr %12, i32 0, i32 1
  %90 = getelementptr inbounds %struct.arm_2d_size_t, ptr %89, i32 0, i32 0
  store i16 240, ptr %90, align 2, !tbaa !15
  %91 = getelementptr inbounds %struct.arm_2d_region_t, ptr %12, i32 0, i32 1
  %92 = getelementptr inbounds %struct.arm_2d_size_t, ptr %91, i32 0, i32 1
  store i16 240, ptr %92, align 2, !tbaa !15
  %93 = getelementptr inbounds %struct.arm_2d_region_t, ptr %12, i32 0, i32 0
  %94 = getelementptr inbounds %struct.arm_2d_region_t, ptr %10, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %93, ptr align 2 %94, i64 4, i1 false), !tbaa.struct !11
  %95 = getelementptr inbounds %struct.arm_2d_region_t, ptr %10, i32 0, i32 1
  %96 = getelementptr inbounds %struct.arm_2d_size_t, ptr %95, i32 0, i32 0
  %97 = load i16, ptr %96, align 2, !tbaa !15
  %98 = sext i16 %97 to i32
  %99 = sub nsw i32 %98, 240
  %100 = ashr i32 %99, 1
  %101 = getelementptr inbounds %struct.arm_2d_region_t, ptr %12, i32 0, i32 0
  %102 = getelementptr inbounds %struct.arm_2d_location_t, ptr %101, i32 0, i32 0
  %103 = load i16, ptr %102, align 2, !tbaa !15
  %104 = sext i16 %103 to i32
  %105 = add nsw i32 %104, %100
  %106 = trunc i32 %105 to i16
  store i16 %106, ptr %102, align 2, !tbaa !15
  %107 = getelementptr inbounds %struct.arm_2d_region_t, ptr %10, i32 0, i32 1
  %108 = getelementptr inbounds %struct.arm_2d_size_t, ptr %107, i32 0, i32 1
  %109 = load i16, ptr %108, align 2, !tbaa !15
  %110 = sext i16 %109 to i32
  %111 = sub nsw i32 %110, 240
  %112 = ashr i32 %111, 1
  %113 = getelementptr inbounds %struct.arm_2d_region_t, ptr %12, i32 0, i32 0
  %114 = getelementptr inbounds %struct.arm_2d_location_t, ptr %113, i32 0, i32 1
  %115 = load i16, ptr %114, align 2, !tbaa !15
  %116 = sext i16 %115 to i32
  %117 = add nsw i32 %116, %112
  %118 = trunc i32 %117 to i16
  store i16 %118, ptr %114, align 2, !tbaa !15
  store i16 %118, ptr %14, align 2, !tbaa !12
  %119 = load i16, ptr %14, align 2, !tbaa !12
  br label %121

120:                                              ; preds = %84
  br label %121

121:                                              ; preds = %120, %88
  %122 = phi i32 [ 1, %88 ], [ 0, %120 ]
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %125, label %124

124:                                              ; preds = %121
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %253

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store ptr null, ptr %16, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %246, %125
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %127, i32 1
  store ptr %128, ptr %16, align 8, !tbaa !5
  %129 = icmp eq ptr %127, null
  br i1 %129, label %130, label %135

130:                                              ; preds = %126
  %131 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 0
  store i8 0, ptr %131, align 1, !tbaa !16
  %132 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 1
  store i8 0, ptr %132, align 1, !tbaa !18
  %133 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 2
  store i8 0, ptr %133, align 1, !tbaa !19
  %134 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %17, i32 0, i32 3
  store i8 0, ptr %134, align 1, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %15, ptr align 1 %17, i64 4, i1 false), !tbaa.struct !21
  br label %136

135:                                              ; preds = %126
  br label %136

136:                                              ; preds = %135, %130
  %137 = phi i32 [ 1, %130 ], [ 0, %135 ]
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %140, label %139

139:                                              ; preds = %136
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %247

140:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %244, %140
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %142, i32 1
  store ptr %143, ptr %19, align 8, !tbaa !5
  %144 = icmp eq ptr %142, null
  br i1 %144, label %145, label %206

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  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) #6
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %146, ptr %21, align 8, !tbaa !5
  %147 = load ptr, ptr %21, align 8, !tbaa !5
  %148 = icmp eq ptr null, %147
  br i1 %148, label %149, label %155

149:                                              ; preds = %145
  %150 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %150, ptr %21, align 8, !tbaa !5
  %151 = load ptr, ptr %21, align 8, !tbaa !5
  %152 = icmp eq ptr null, %151
  br i1 %152, label %153, label %154

153:                                              ; preds = %149
  store i32 15, ptr %7, align 4
  br label %202

154:                                              ; preds = %149
  br label %155

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

202:                                              ; preds = %155, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %203 = load i32, ptr %7, align 4
  switch i32 %203, label %245 [
    i32 0, label %204
  ]

204:                                              ; preds = %202
  %205 = load ptr, ptr %22, align 8, !tbaa !5
  br label %207

206:                                              ; preds = %141
  br label %207

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

210:                                              ; preds = %207
  store i32 15, ptr %7, align 4
  br label %245

211:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  call void @llvm.memset.p0.i64(ptr align 2 %23, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store ptr null, ptr %24, align 8, !tbaa !5
  br label %212

212:                                              ; preds = %238, %211
  %213 = load ptr, ptr %24, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.arm_2d_region_t, ptr %213, i32 1
  store ptr %214, ptr %24, align 8, !tbaa !5
  %215 = icmp eq ptr %213, null
  br i1 %215, label %216, label %220

216:                                              ; preds = %212
  %217 = getelementptr inbounds %struct.arm_2d_region_t, ptr %23, i32 0, i32 1
  %218 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %18, i32 0, i32 1
  %219 = getelementptr inbounds %struct.arm_2d_region_t, ptr %218, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %217, ptr align 4 %219, i64 4, i1 false), !tbaa.struct !11
  br label %221

220:                                              ; preds = %212
  br label %221

221:                                              ; preds = %220, %216
  %222 = phi i32 [ 1, %216 ], [ 0, %220 ]
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %225, label %224

224:                                              ; preds = %221
  store i32 18, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %243

225:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store ptr %18, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store ptr null, ptr %26, align 8, !tbaa !5
  br label %226

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

230:                                              ; preds = %226
  store i32 21, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %237

231:                                              ; preds = %226
  %232 = load ptr, ptr @s_ptRefreshLayers, align 16, !tbaa !22
  %233 = call i32 @arm_2dp_rgb565_tile_copy_with_des_mask_only(ptr noundef null, ptr noundef %232, ptr noundef %18, ptr noundef @c_tileCircleBackgroundMask, ptr noundef getelementptr inbounds (%struct.arm_2d_layer_t, ptr @s_ptRefreshLayers, i32 0, i32 1))
  %234 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %235

235:                                              ; preds = %231
  %236 = load ptr, ptr %25, align 8, !tbaa !5
  br label %226, !llvm.loop !26

237:                                              ; preds = %230
  br label %238

238:                                              ; preds = %237
  %239 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %240 = zext i1 %239 to i8
  store i8 %240, ptr %27, align 1, !tbaa !9
  %241 = load i8, ptr %27, align 1, !tbaa !9, !range !28, !noundef !29
  %242 = trunc i8 %241 to i1
  br label %212, !llvm.loop !30

243:                                              ; preds = %224
  br label %244

244:                                              ; preds = %243
  br label %141, !llvm.loop !31

245:                                              ; preds = %210, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %246

246:                                              ; preds = %245
  br label %126, !llvm.loop !32

247:                                              ; preds = %139
  br label %248

248:                                              ; preds = %247
  %249 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %250 = zext i1 %249 to i8
  store i8 %250, ptr %28, align 1, !tbaa !9
  %251 = load i8, ptr %28, align 1, !tbaa !9, !range !28, !noundef !29
  %252 = trunc i8 %251 to i1
  br label %84, !llvm.loop !33

253:                                              ; preds = %124
  br label %78, !llvm.loop !34

254:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %29, ptr align 2 %5, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  store ptr null, ptr %30, align 8, !tbaa !5
  br label %255

255:                                              ; preds = %313, %254
  %256 = load ptr, ptr %30, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.arm_2d_region_t, ptr %256, i32 1
  store ptr %257, ptr %30, align 8, !tbaa !5
  %258 = icmp eq ptr %256, null
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 24, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %314

260:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store ptr null, ptr %32, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %308, %260
  %262 = load ptr, ptr %32, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.arm_2d_region_t, ptr %262, i32 1
  store ptr %263, ptr %32, align 8, !tbaa !5
  %264 = icmp eq ptr %262, null
  br i1 %264, label %265, label %297

265:                                              ; preds = %261
  %266 = getelementptr inbounds %struct.arm_2d_region_t, ptr %31, i32 0, i32 1
  %267 = getelementptr inbounds %struct.arm_2d_size_t, ptr %266, i32 0, i32 0
  store i16 221, ptr %267, align 2, !tbaa !15
  %268 = getelementptr inbounds %struct.arm_2d_region_t, ptr %31, i32 0, i32 1
  %269 = getelementptr inbounds %struct.arm_2d_size_t, ptr %268, i32 0, i32 1
  store i16 221, ptr %269, align 2, !tbaa !15
  %270 = getelementptr inbounds %struct.arm_2d_region_t, ptr %31, i32 0, i32 0
  %271 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %270, ptr align 2 %271, i64 4, i1 false), !tbaa.struct !11
  %272 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %273 = getelementptr inbounds %struct.arm_2d_size_t, ptr %272, i32 0, i32 0
  %274 = load i16, ptr %273, align 2, !tbaa !15
  %275 = sext i16 %274 to i32
  %276 = sub nsw i32 %275, 221
  %277 = ashr i32 %276, 1
  %278 = getelementptr inbounds %struct.arm_2d_region_t, ptr %31, i32 0, i32 0
  %279 = getelementptr inbounds %struct.arm_2d_location_t, ptr %278, i32 0, i32 0
  %280 = load i16, ptr %279, align 2, !tbaa !15
  %281 = sext i16 %280 to i32
  %282 = add nsw i32 %281, %277
  %283 = trunc i32 %282 to i16
  store i16 %283, ptr %279, align 2, !tbaa !15
  %284 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %285 = getelementptr inbounds %struct.arm_2d_size_t, ptr %284, i32 0, i32 1
  %286 = load i16, ptr %285, align 2, !tbaa !15
  %287 = sext i16 %286 to i32
  %288 = sub nsw i32 %287, 221
  %289 = ashr i32 %288, 1
  %290 = getelementptr inbounds %struct.arm_2d_region_t, ptr %31, i32 0, i32 0
  %291 = getelementptr inbounds %struct.arm_2d_location_t, ptr %290, i32 0, i32 1
  %292 = load i16, ptr %291, align 2, !tbaa !15
  %293 = sext i16 %292 to i32
  %294 = add nsw i32 %293, %289
  %295 = trunc i32 %294 to i16
  store i16 %295, ptr %291, align 2, !tbaa !15
  store i16 %295, ptr %33, align 2, !tbaa !12
  %296 = load i16, ptr %33, align 2, !tbaa !12
  br label %298

297:                                              ; preds = %261
  br label %298

298:                                              ; preds = %297, %265
  %299 = phi i32 [ 1, %265 ], [ 0, %297 ]
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %302, label %301

301:                                              ; preds = %298
  store i32 26, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %313

302:                                              ; preds = %298
  %303 = load ptr, ptr %3, align 8, !tbaa !5
  store i16 0, ptr %34, align 2, !tbaa !15
  %304 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %34, i32 0, i32 0
  %305 = load i16, ptr %304, align 2
  %306 = call i32 @arm_2dp_rgb565_tile_copy_with_colour_keying_and_opacity(ptr noundef null, ptr noundef @c_tileWatchPanelRGB565, ptr noundef %303, ptr noundef %31, i8 noundef zeroext 64, i16 %305)
  %307 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %308

308:                                              ; preds = %302
  %309 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %310 = zext i1 %309 to i8
  store i8 %310, ptr %35, align 1, !tbaa !9
  %311 = load i8, ptr %35, align 1, !tbaa !9, !range !28, !noundef !29
  %312 = trunc i8 %311 to i1
  br label %261, !llvm.loop !35

313:                                              ; preds = %301
  br label %255, !llvm.loop !36

314:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #6
  store i8 0, ptr %36, align 1, !tbaa !9
  %315 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %316 = trunc i8 %315 to i1
  br i1 %316, label %317, label %325

317:                                              ; preds = %314
  %318 = call i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef 1000)
  %319 = call zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef %318, ptr noundef @benchmark_watch_panel_draw.__424s_lTimestamp)
  %320 = zext i1 %319 to i8
  store i8 %320, ptr %37, align 1, !tbaa !9
  %321 = load i8, ptr %37, align 1, !tbaa !9, !range !28, !noundef !29
  %322 = trunc i8 %321 to i1
  br i1 %322, label %323, label %324

323:                                              ; preds = %317
  store i8 1, ptr %36, align 1, !tbaa !9
  br label %324

324:                                              ; preds = %323, %317
  br label %325

325:                                              ; preds = %324, %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  store ptr @s_tGears, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %326 = load ptr, ptr %38, align 8, !tbaa !5
  store ptr %326, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  store ptr null, ptr %40, align 8, !tbaa !5
  br label %327

327:                                              ; preds = %497, %325
  %328 = load ptr, ptr %40, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.demo_gears_t, ptr %328, i32 1
  store ptr %329, ptr %40, align 8, !tbaa !5
  %330 = icmp eq ptr %328, null
  br i1 %330, label %331, label %333

331:                                              ; preds = %327
  %332 = load ptr, ptr %38, align 8, !tbaa !5
  br label %334

333:                                              ; preds = %327
  br label %334

334:                                              ; preds = %333, %331
  %335 = phi i32 [ 1, %331 ], [ 0, %333 ]
  %336 = icmp ne i32 %335, 0
  br i1 %336, label %338, label %337

337:                                              ; preds = %334
  store i32 29, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %498

338:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  store i64 3, ptr %41, align 8, !tbaa !37
  br label %339

339:                                              ; preds = %490, %338
  %340 = load i64, ptr %41, align 8, !tbaa !37
  %341 = icmp ugt i64 %340, 0
  br i1 %341, label %343, label %342

342:                                              ; preds = %339
  store i32 32, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %496

343:                                              ; preds = %339
  %344 = load ptr, ptr %39, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.demo_gears_t, ptr %344, i32 0, i32 9
  %346 = load i8, ptr %345, align 1, !tbaa !39, !range !28, !noundef !29
  %347 = trunc i8 %346 to i1
  br i1 %347, label %348, label %368

348:                                              ; preds = %343
  %349 = load i8, ptr %36, align 1, !tbaa !9, !range !28, !noundef !29
  %350 = trunc i8 %349 to i1
  br i1 %350, label %351, label %367

351:                                              ; preds = %348
  %352 = load ptr, ptr %39, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.demo_gears_t, ptr %352, i32 0, i32 4
  %354 = load float, ptr %353, align 4, !tbaa !51
  %355 = fmul float %354, 0x400921FB40000000
  %356 = fdiv float %355, 1.800000e+02
  %357 = load ptr, ptr %39, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.demo_gears_t, ptr %357, i32 0, i32 3
  %359 = load float, ptr %358, align 8, !tbaa !52
  %360 = fadd float %359, %356
  store float %360, ptr %358, align 8, !tbaa !52
  %361 = load ptr, ptr %39, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.demo_gears_t, ptr %361, i32 0, i32 3
  %363 = load float, ptr %362, align 8, !tbaa !52
  %364 = call float @fmodf(float noundef %363, float noundef 0x401921FB40000000) #6
  %365 = load ptr, ptr %39, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.demo_gears_t, ptr %365, i32 0, i32 3
  store float %364, ptr %366, align 8, !tbaa !52
  br label %367

367:                                              ; preds = %351, %348
  br label %388

368:                                              ; preds = %343
  %369 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %370 = trunc i8 %369 to i1
  br i1 %370, label %371, label %387

371:                                              ; preds = %368
  %372 = load ptr, ptr %39, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.demo_gears_t, ptr %372, i32 0, i32 4
  %374 = load float, ptr %373, align 4, !tbaa !51
  %375 = fmul float %374, 0x400921FB40000000
  %376 = fdiv float %375, 1.800000e+02
  %377 = load ptr, ptr %39, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.demo_gears_t, ptr %377, i32 0, i32 3
  %379 = load float, ptr %378, align 8, !tbaa !52
  %380 = fadd float %379, %376
  store float %380, ptr %378, align 8, !tbaa !52
  %381 = load ptr, ptr %39, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.demo_gears_t, ptr %381, i32 0, i32 3
  %383 = load float, ptr %382, align 8, !tbaa !52
  %384 = call float @fmodf(float noundef %383, float noundef 0x401921FB40000000) #6
  %385 = load ptr, ptr %39, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.demo_gears_t, ptr %385, i32 0, i32 3
  store float %384, ptr %386, align 8, !tbaa !52
  br label %387

387:                                              ; preds = %371, %368
  br label %388

388:                                              ; preds = %387, %367
  %389 = load ptr, ptr %39, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.demo_gears_t, ptr %389, i32 0, i32 2
  %391 = load ptr, ptr %390, align 8, !tbaa !53
  %392 = icmp ne ptr null, %391
  br i1 %392, label %393, label %458

393:                                              ; preds = %388
  %394 = load ptr, ptr %39, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.demo_gears_t, ptr %394, i32 0, i32 1
  %396 = load ptr, ptr %395, align 8, !tbaa !54
  %397 = icmp ne ptr null, %396
  br i1 %397, label %398, label %429

398:                                              ; preds = %393
  %399 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %400 = trunc i8 %399 to i1
  br i1 %400, label %401, label %420

401:                                              ; preds = %398
  %402 = load ptr, ptr %39, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.demo_gears_t, ptr %402, i32 0, i32 0
  %404 = load ptr, ptr %39, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.demo_gears_t, ptr %404, i32 0, i32 1
  %406 = load ptr, ptr %405, align 8, !tbaa !54
  %407 = load ptr, ptr %39, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.demo_gears_t, ptr %407, i32 0, i32 2
  %409 = load ptr, ptr %408, align 8, !tbaa !53
  %410 = load ptr, ptr %39, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.demo_gears_t, ptr %410, i32 0, i32 5
  %412 = load ptr, ptr %39, align 8, !tbaa !5
  %413 = getelementptr inbounds %struct.demo_gears_t, ptr %412, i32 0, i32 3
  %414 = load float, ptr %413, align 8, !tbaa !52
  %415 = load ptr, ptr %39, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.demo_gears_t, ptr %415, i32 0, i32 8
  %417 = load i8, ptr %416, align 8, !tbaa !55
  %418 = load i32, ptr %411, align 8
  %419 = call i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef %403, ptr noundef %406, ptr noundef %409, i32 %418, float noundef %414, float noundef 1.000000e+00, i8 noundef zeroext %417)
  br label %420

420:                                              ; preds = %401, %398
  %421 = load ptr, ptr %39, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.demo_gears_t, ptr %421, i32 0, i32 0
  %423 = load ptr, ptr %3, align 8, !tbaa !5
  %424 = load ptr, ptr %39, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.demo_gears_t, ptr %424, i32 0, i32 7
  %426 = load ptr, ptr %425, align 8, !tbaa !56
  %427 = call i32 @arm_2dp_tile_transform(ptr noundef %422, ptr noundef %423, ptr noundef %426, ptr noundef null)
  store i32 %427, ptr %42, align 4, !tbaa !57
  %428 = load i32, ptr %42, align 4, !tbaa !57
  br label %457

429:                                              ; preds = %393
  %430 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %431 = trunc i8 %430 to i1
  br i1 %431, label %432, label %448

432:                                              ; preds = %429
  %433 = load ptr, ptr %39, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.demo_gears_t, ptr %433, i32 0, i32 0
  %435 = load ptr, ptr %39, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.demo_gears_t, ptr %435, i32 0, i32 2
  %437 = load ptr, ptr %436, align 8, !tbaa !53
  %438 = load ptr, ptr %39, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.demo_gears_t, ptr %438, i32 0, i32 5
  %440 = load ptr, ptr %39, align 8, !tbaa !5
  %441 = getelementptr inbounds %struct.demo_gears_t, ptr %440, i32 0, i32 3
  %442 = load float, ptr %441, align 8, !tbaa !52
  %443 = load ptr, ptr %39, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct.demo_gears_t, ptr %443, i32 0, i32 8
  %445 = load i8, ptr %444, align 8, !tbaa !55
  %446 = load i32, ptr %439, align 8
  %447 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare(ptr noundef %434, ptr noundef %437, i32 %446, float noundef %442, float noundef 1.000000e+00, i64 noundef 63488, i8 noundef zeroext %445)
  br label %448

448:                                              ; preds = %432, %429
  %449 = load ptr, ptr %39, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.demo_gears_t, ptr %449, i32 0, i32 0
  %451 = load ptr, ptr %3, align 8, !tbaa !5
  %452 = load ptr, ptr %39, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.demo_gears_t, ptr %452, i32 0, i32 7
  %454 = load ptr, ptr %453, align 8, !tbaa !56
  %455 = call i32 @arm_2dp_tile_transform(ptr noundef %450, ptr noundef %451, ptr noundef %454, ptr noundef null)
  store i32 %455, ptr %43, align 4, !tbaa !57
  %456 = load i32, ptr %43, align 4, !tbaa !57
  br label %457

457:                                              ; preds = %448, %420
  br label %489

458:                                              ; preds = %388
  %459 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %460 = trunc i8 %459 to i1
  br i1 %460, label %461, label %477

461:                                              ; preds = %458
  %462 = load ptr, ptr %39, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.demo_gears_t, ptr %462, i32 0, i32 0
  %464 = load ptr, ptr %39, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.demo_gears_t, ptr %464, i32 0, i32 1
  %466 = load ptr, ptr %465, align 8, !tbaa !54
  %467 = load ptr, ptr %39, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.demo_gears_t, ptr %467, i32 0, i32 5
  %469 = load ptr, ptr %39, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.demo_gears_t, ptr %469, i32 0, i32 3
  %471 = load float, ptr %470, align 8, !tbaa !52
  %472 = load ptr, ptr %39, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.demo_gears_t, ptr %472, i32 0, i32 8
  %474 = load i8, ptr %473, align 8, !tbaa !55
  %475 = load i32, ptr %468, align 8
  %476 = call i32 @arm_2dp_rgb565_tile_transform_with_colour_keying_and_opacity_prepare(ptr noundef %463, ptr noundef %466, i32 %475, float noundef %471, float noundef 1.000000e+00, i64 noundef 0, i8 noundef zeroext %474)
  br label %477

477:                                              ; preds = %461, %458
  %478 = load ptr, ptr %39, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.demo_gears_t, ptr %478, i32 0, i32 0
  %480 = load ptr, ptr %3, align 8, !tbaa !5
  %481 = load ptr, ptr %39, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.demo_gears_t, ptr %481, i32 0, i32 7
  %483 = load ptr, ptr %482, align 8, !tbaa !56
  %484 = load ptr, ptr %39, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.demo_gears_t, ptr %484, i32 0, i32 6
  %486 = load ptr, ptr %485, align 8, !tbaa !58
  %487 = call i32 @arm_2dp_tile_transform(ptr noundef %479, ptr noundef %480, ptr noundef %483, ptr noundef %486)
  store i32 %487, ptr %44, align 4, !tbaa !57
  %488 = load i32, ptr %44, align 4, !tbaa !57
  br label %489

489:                                              ; preds = %477, %457
  br label %490

490:                                              ; preds = %489
  %491 = load ptr, ptr %38, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.demo_gears_t, ptr %491, i32 1
  store ptr %492, ptr %38, align 8, !tbaa !5
  %493 = load ptr, ptr %38, align 8, !tbaa !5
  store ptr %493, ptr %39, align 8, !tbaa !5
  %494 = load i64, ptr %41, align 8, !tbaa !37
  %495 = add i64 %494, -1
  store i64 %495, ptr %41, align 8, !tbaa !37
  br label %339, !llvm.loop !59

496:                                              ; preds = %342
  br label %497

497:                                              ; preds = %496
  br label %327, !llvm.loop !60

498:                                              ; preds = %337
  br label %499

499:                                              ; preds = %498
  %500 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %501 = trunc i8 %500 to i1
  br i1 %501, label %502, label %519

502:                                              ; preds = %499
  %503 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !61
  %504 = fadd float %503, 0x3FC6571820000000
  store volatile float %504, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !61
  %505 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !61
  %506 = call float @fmodf(float noundef %505, float noundef 0x401921FB40000000) #6
  store volatile float %506, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !61
  %507 = load float, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !61
  %508 = fadd float %507, 0x3FA99999A0000000
  store float %508, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !61
  %509 = load i8, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !15
  %510 = zext i8 %509 to i32
  %511 = icmp sge i32 %510, 8
  br i1 %511, label %512, label %517

512:                                              ; preds = %502
  %513 = load i8, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !15
  %514 = zext i8 %513 to i32
  %515 = sub nsw i32 %514, 8
  %516 = trunc i32 %515 to i8
  store i8 %516, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !15
  br label %518

517:                                              ; preds = %502
  store float 5.000000e-01, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !61
  store i8 -1, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !15
  br label %518

518:                                              ; preds = %517, %512
  br label %519

519:                                              ; preds = %518, %499
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #6
  %520 = getelementptr inbounds %struct.arm_2d_location_t, ptr %45, i32 0, i32 0
  %521 = load i16, ptr getelementptr inbounds (%struct.arm_2d_region_t, ptr getelementptr inbounds (%struct.arm_2d_tile_t, ptr @c_tileStarRGB565, i32 0, i32 1), i32 0, i32 1), align 4, !tbaa !15
  %522 = sext i16 %521 to i32
  %523 = ashr i32 %522, 1
  %524 = trunc i32 %523 to i16
  store i16 %524, ptr %520, align 2, !tbaa !62
  %525 = getelementptr inbounds %struct.arm_2d_location_t, ptr %45, i32 0, i32 1
  %526 = load i16, ptr getelementptr inbounds (%struct.arm_2d_size_t, ptr getelementptr inbounds (%struct.arm_2d_region_t, ptr getelementptr inbounds (%struct.arm_2d_tile_t, ptr @c_tileStarRGB565, i32 0, i32 1), i32 0, i32 1), i32 0, i32 1), align 2, !tbaa !15
  %527 = sext i16 %526 to i32
  %528 = ashr i32 %527, 1
  %529 = trunc i32 %528 to i16
  store i16 %529, ptr %525, align 2, !tbaa !63
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  store ptr @c_tileStarMask2, ptr %46, align 8, !tbaa !5
  %530 = load i8, ptr %4, align 1, !tbaa !9, !range !28, !noundef !29
  %531 = trunc i8 %530 to i1
  br i1 %531, label %532, label %539

532:                                              ; preds = %519
  %533 = load ptr, ptr %46, align 8, !tbaa !5
  %534 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !61
  %535 = load float, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !61
  %536 = load i8, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !15
  %537 = load i32, ptr %45, align 2
  %538 = call i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef @s_tStarOP, ptr noundef @c_tileStarRGB565, ptr noundef %533, i32 %537, float noundef %534, float noundef %535, i8 noundef zeroext %536)
  br label %539

539:                                              ; preds = %532, %519
  %540 = load ptr, ptr %3, align 8, !tbaa !5
  %541 = call i32 @arm_2dp_tile_transform(ptr noundef @s_tStarOP, ptr noundef %540, ptr noundef null, ptr noundef null)
  store i32 %541, ptr %47, align 4, !tbaa !57
  %542 = load i32, ptr %47, align 4, !tbaa !57
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %543

543:                                              ; preds = %539
  br label %544

544:                                              ; preds = %543
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  br label %545

545:                                              ; preds = %544
  %546 = load ptr, ptr %8, align 8, !tbaa !5
  br label %70, !llvm.loop !64

547:                                              ; preds = %74
  br label %548

548:                                              ; preds = %547
  %549 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %550 = zext i1 %549 to i8
  store i8 %550, ptr %48, align 1, !tbaa !9
  %551 = load i8, ptr %48, align 1, !tbaa !9, !range !28, !noundef !29
  %552 = trunc i8 %551 to i1
  br label %54, !llvm.loop !65

553:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  store ptr @s_tGears, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  %554 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %554, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #6
  store ptr null, ptr %51, align 8, !tbaa !5
  br label %555

555:                                              ; preds = %583, %553
  %556 = load ptr, ptr %51, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.demo_gears_t, ptr %556, i32 1
  store ptr %557, ptr %51, align 8, !tbaa !5
  %558 = icmp eq ptr %556, null
  br i1 %558, label %559, label %561

559:                                              ; preds = %555
  %560 = load ptr, ptr %49, align 8, !tbaa !5
  br label %562

561:                                              ; preds = %555
  br label %562

562:                                              ; preds = %561, %559
  %563 = phi i32 [ 1, %559 ], [ 0, %561 ]
  %564 = icmp ne i32 %563, 0
  br i1 %564, label %566, label %565

565:                                              ; preds = %562
  store i32 37, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  br label %584

566:                                              ; preds = %562
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #6
  store i64 3, ptr %52, align 8, !tbaa !37
  br label %567

567:                                              ; preds = %576, %566
  %568 = load i64, ptr %52, align 8, !tbaa !37
  %569 = icmp ugt i64 %568, 0
  br i1 %569, label %571, label %570

570:                                              ; preds = %567
  store i32 40, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  br label %582

571:                                              ; preds = %567
  %572 = load ptr, ptr %50, align 8, !tbaa !5
  %573 = getelementptr inbounds %struct.demo_gears_t, ptr %572, i32 0, i32 0
  %574 = getelementptr inbounds %struct.arm_2d_op_trans_msk_opa_t, ptr %573, i32 0, i32 0
  %575 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef %574)
  br label %576

576:                                              ; preds = %571
  %577 = load ptr, ptr %49, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.demo_gears_t, ptr %577, i32 1
  store ptr %578, ptr %49, align 8, !tbaa !5
  %579 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %579, ptr %50, align 8, !tbaa !5
  %580 = load i64, ptr %52, align 8, !tbaa !37
  %581 = add i64 %580, -1
  store i64 %581, ptr %52, align 8, !tbaa !37
  br label %567, !llvm.loop !66

582:                                              ; preds = %570
  br label %583

583:                                              ; preds = %582
  br label %555, !llvm.loop !67

584:                                              ; preds = %565
  %585 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef @s_tStarOP)
  ret void
}

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

declare i32 @arm_2dp_rgb16_fill_colour(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

declare ptr @arm_2d_get_default_frame_buffer() #2

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

declare i32 @arm_2dp_rgb565_tile_copy_with_des_mask_only(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef, ptr noundef) #2

declare i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef) #2

; Function Attrs: nounwind
declare float @fmodf(float noundef, float noundef) #5

declare i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef, ptr noundef, ptr noundef, i32, float noundef, float noundef, i8 noundef zeroext) #2

declare i32 @arm_2dp_tile_transform(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare(ptr noundef, ptr noundef, i32, float noundef, float noundef, i64 noundef, i8 noundef zeroext) #2

declare i32 @arm_2dp_rgb565_tile_transform_with_colour_keying_and_opacity_prepare(ptr noundef, ptr noundef, i32, float noundef, float noundef, i64 noundef, i8 noundef zeroext) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{i64 0, i64 2, !12, i64 2, i64 2, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!18 = !{!17, !7, i64 1}
!19 = !{!17, !7, i64 2}
!20 = !{!17, !7, i64 3}
!21 = !{i64 0, i64 1, !15, i64 1, i64 1, !15, i64 2, i64 1, !15, i64 3, i64 1, !15}
!22 = !{!23, !6, i64 0}
!23 = !{!"arm_2d_layer_t", !6, i64 0, !24, i64 8, !25, i64 16, !7, i64 20, !7, i64 21, !13, i64 22}
!24 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!25 = !{!"int", !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}
!33 = distinct !{!33, !27}
!34 = distinct !{!34, !27}
!35 = distinct !{!35, !27}
!36 = distinct !{!36, !27}
!37 = !{!38, !38, i64 0}
!38 = !{!"long", !7, i64 0}
!39 = !{!40, !10, i64 249}
!40 = !{!"", !41, i64 0, !6, i64 200, !6, i64 208, !48, i64 216, !48, i64 220, !50, i64 224, !6, i64 232, !6, i64 240, !7, i64 248, !10, i64 249}
!41 = !{!"arm_2d_op_trans_msk_opa_t", !42, i64 0, !43, i64 48, !44, i64 64, !7, i64 72, !45, i64 80, !43, i64 112, !47, i64 128, !7, i64 192}
!42 = !{!"arm_2d_op_core_t", !7, i64 0, !38, i64 40}
!43 = !{!"", !6, i64 0, !6, i64 8}
!44 = !{!"", !6, i64 0}
!45 = !{!"", !6, i64 0, !46, i64 8}
!46 = !{!"arm_2d_tile_t", !7, i64 0, !7, i64 4, !7, i64 16}
!47 = !{!"__arm_2d_transform_info_t", !48, i64 0, !48, i64 4, !48, i64 8, !49, i64 12, !7, i64 20, !7, i64 24}
!48 = !{!"float", !7, i64 0}
!49 = !{!"arm_2d_point_float_t", !48, i64 0, !48, i64 4}
!50 = !{!"arm_2d_location_t", !13, i64 0, !13, i64 2}
!51 = !{!40, !48, i64 220}
!52 = !{!40, !48, i64 216}
!53 = !{!40, !6, i64 208}
!54 = !{!40, !6, i64 200}
!55 = !{!40, !7, i64 248}
!56 = !{!40, !6, i64 240}
!57 = !{!25, !25, i64 0}
!58 = !{!40, !6, i64 232}
!59 = distinct !{!59, !27}
!60 = distinct !{!60, !27}
!61 = !{!48, !48, i64 0}
!62 = !{!50, !13, i64 0}
!63 = !{!50, !13, i64 2}
!64 = distinct !{!64, !27}
!65 = distinct !{!65, !27}
!66 = distinct !{!66, !27}
!67 = distinct !{!67, !27}


; 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_layer_t = type { ptr, %struct.arm_2d_region_t, i32, i8, i8, i16 }
%struct.arm_2d_region_t = type { %union.anon, %union.anon.0 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.0 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.demo_gears_t = type { %struct.arm_2d_op_trans_msk_opa_t, ptr, ptr, float, float, %struct.arm_2d_location_t, ptr, ptr, i8, i8 }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.13, %struct.anon.14, %union.anon.15, %struct.anon.17, %struct.anon.18, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { [40 x i8], i64 }
%struct.anon.13 = type { ptr, ptr }
%struct.anon.14 = type { ptr }
%union.anon.15 = type { %struct.anon.16 }
%struct.anon.16 = type { i32 }
%struct.anon.17 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.1, %union.anon.11, %union.anon.12 }
%union.anon.1 = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.4 }
%union.arm_2d_color_info_t = type { %struct.anon.2 }
%struct.anon.2 = type { i8 }
%union.anon.4 = type { i16 }
%union.anon.11 = type { %struct.arm_2d_region_t }
%union.anon.12 = type { ptr }
%struct.anon.18 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.19, [40 x i8] }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.19 = type { i32 }

@s_ptRefreshLayers = external hidden global [1 x %struct.arm_2d_layer_t], align 16
@s_tGears = external hidden global [3 x %struct.demo_gears_t], align 16
@s_tStarOP = external hidden global %struct.arm_2d_op_trans_msk_opa_t, align 8
@c_tileCircleBackgroundMask = external constant %struct.arm_2d_tile_t, align 8
@c_tileWatchPanelRGB565 = external constant %struct.arm_2d_tile_t, align 8
@benchmark_watch_panel_draw.__424s_lTimestamp = external hidden global i64, align 8
@benchmark_watch_panel_draw.s_fAngle = external hidden global float, align 4
@benchmark_watch_panel_draw.s_fScale = external hidden local_unnamed_addr global float, align 4
@benchmark_watch_panel_draw.s_chOpacity = external hidden local_unnamed_addr global i8, align 1
@c_tileStarRGB565 = external constant %struct.arm_2d_tile_t, align 8
@c_tileStarMask2 = external constant %struct.arm_2d_tile_t, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_watch_panel_draw(ptr noundef %0, i1 noundef zeroext %1) local_unnamed_addr #2 {
.preheader190:
  %2 = alloca %struct.arm_2d_tile_t, align 8
  %3 = alloca %struct.arm_2d_region_t, align 8
  %4 = alloca %struct.arm_2d_region_t, align 2
  %5 = load i16, ptr getelementptr inbounds (i8, ptr @c_tileStarRGB565, i64 10), align 2
  %6 = ashr i16 %5, 1
  %7 = load i16, ptr getelementptr inbounds (i8, ptr @c_tileStarRGB565, i64 8), align 8
  %8 = ashr i16 %7, 1
  %.sroa.4.0.insert.ext = zext i16 %6 to i32
  %.sroa.4.0.insert.shift = shl nuw i32 %.sroa.4.0.insert.ext, 16
  %.sroa.0.0.insert.ext = zext i16 %8 to i32
  %.sroa.0.0.insert.insert = or disjoint i32 %.sroa.4.0.insert.shift, %.sroa.0.0.insert.ext
  %.sroa.997.4..sroa_idx = getelementptr inbounds i8, ptr %0, i64 10
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %.sroa.060.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 2
  %10 = getelementptr inbounds i8, ptr %4, i64 6
  %11 = getelementptr inbounds i8, ptr %4, i64 4
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 2
  %.sroa.696.4.copyload = load i16, ptr %9, align 4, !tbaa !5
  %.sroa.997.4.copyload = load i16, ptr %.sroa.997.4..sroa_idx, align 2, !tbaa !5
  %12 = sext i16 %.sroa.696.4.copyload to i32
  %13 = add nsw i32 %12, 130832
  %14 = lshr i32 %13, 1
  %15 = trunc i32 %14 to i16
  %16 = sext i16 %.sroa.997.4.copyload to i32
  %17 = add nsw i32 %16, 130832
  %18 = lshr i32 %17, 1
  %19 = trunc i32 %18 to i16
  %20 = add nsw i32 %12, 130851
  %21 = lshr i32 %20, 1
  %22 = trunc i32 %21 to i16
  %23 = add nsw i32 %16, 130851
  %24 = lshr i32 %23, 1
  %25 = trunc i32 %24 to i16
  %26 = tail call i32 @arm_2dp_rgb16_fill_colour(ptr noundef null, ptr noundef %0, ptr noundef null, i64 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 67555025202708480, ptr %3, align 8
  store i16 %15, ptr %3, align 8
  store i16 %19, ptr %.sroa.6.0..sroa_idx, align 2, !tbaa !9
  %27 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull %2, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %28 = load ptr, ptr @s_ptRefreshLayers, align 16, !tbaa !10
  %29 = call i32 @arm_2dp_rgb565_tile_copy_with_des_mask_only(ptr noundef null, ptr noundef %28, ptr noundef nonnull %2, ptr noundef nonnull @c_tileCircleBackgroundMask, ptr noundef nonnull getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 8)) #5
  %30 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %31 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  %32 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i16 221, ptr %11, align 2, !tbaa !9
  store i16 221, ptr %10, align 2, !tbaa !9
  store i16 %22, ptr %4, align 2, !tbaa !9
  store i16 %25, ptr %.sroa.060.sroa.4.0..sroa_idx, align 2, !tbaa !9
  %33 = call i32 @arm_2dp_rgb565_tile_copy_with_colour_keying_and_opacity(ptr noundef null, ptr noundef nonnull @c_tileWatchPanelRGB565, ptr noundef %0, ptr noundef nonnull %4, i8 noundef zeroext 64, i16 0) #5
  %34 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %35 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %1, label %36, label %.preheader186

36:                                               ; preds = %.preheader190
  %37 = call i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef 1000) #5
  %38 = call zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef %37, ptr noundef nonnull @benchmark_watch_panel_draw.__424s_lTimestamp) #5
  br label %.preheader186

.loopexit187:                                     ; preds = %113
  br i1 %1, label %116, label %.critedge163

.preheader186:                                    ; preds = %.preheader190, %36
  %.0133 = phi i1 [ false, %.preheader190 ], [ %38, %36 ]
  br label %39

39:                                               ; preds = %.preheader186, %113
  %.0126217 = phi i64 [ 3, %.preheader186 ], [ %115, %113 ]
  %.1129213 = phi ptr [ @s_tGears, %.preheader186 ], [ %114, %113 ]
  %40 = getelementptr inbounds i8, ptr %.1129213, i64 249
  %41 = load i8, ptr %40, align 1, !tbaa !15, !range !29, !noundef !30
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %43, label %53

43:                                               ; preds = %39
  br i1 %.0133, label %44, label %54

44:                                               ; preds = %43
  %45 = getelementptr inbounds i8, ptr %.1129213, i64 220
  %46 = load float, ptr %45, align 4, !tbaa !31
  %47 = fmul float %46, 0x400921FB40000000
  %48 = fdiv float %47, 1.800000e+02
  %49 = getelementptr inbounds i8, ptr %.1129213, i64 216
  %50 = load float, ptr %49, align 8, !tbaa !32
  %51 = fadd float %50, %48
  %52 = call float @fmodf(float noundef %51, float noundef 0x401921FB40000000) #5
  store float %52, ptr %49, align 8, !tbaa !32
  br label %54

53:                                               ; preds = %39
  br i1 %1, label %.thread171, label %.thread168

54:                                               ; preds = %43, %44
  %55 = getelementptr inbounds i8, ptr %.1129213, i64 208
  %56 = load ptr, ptr %55, align 8, !tbaa !33
  %.not150 = icmp eq ptr %56, null
  br i1 %.not150, label %99, label %69

.thread171:                                       ; preds = %53
  %57 = getelementptr inbounds i8, ptr %.1129213, i64 220
  %58 = load float, ptr %57, align 4, !tbaa !31
  %59 = fmul float %58, 0x400921FB40000000
  %60 = fdiv float %59, 1.800000e+02
  %61 = getelementptr inbounds i8, ptr %.1129213, i64 216
  %62 = load float, ptr %61, align 8, !tbaa !32
  %63 = fadd float %62, %60
  %64 = call float @fmodf(float noundef %63, float noundef 0x401921FB40000000) #5
  store float %64, ptr %61, align 8, !tbaa !32
  %65 = getelementptr inbounds i8, ptr %.1129213, i64 208
  %66 = load ptr, ptr %65, align 8, !tbaa !33
  %.not150172 = icmp eq ptr %66, null
  br i1 %.not150172, label %.thread173, label %.thread177

.thread168:                                       ; preds = %53
  %67 = getelementptr inbounds i8, ptr %.1129213, i64 208
  %68 = load ptr, ptr %67, align 8, !tbaa !33
  %.not150169 = icmp eq ptr %68, null
  br i1 %.not150169, label %.thread170, label %.thread174

69:                                               ; preds = %54
  %70 = getelementptr inbounds i8, ptr %.1129213, i64 200
  %71 = load ptr, ptr %70, align 8, !tbaa !34
  %.not151 = icmp eq ptr %71, null
  br i1 %.not151, label %88, label %76

.thread177:                                       ; preds = %.thread171
  %72 = getelementptr inbounds i8, ptr %.1129213, i64 200
  %73 = load ptr, ptr %72, align 8, !tbaa !34
  %.not151178 = icmp eq ptr %73, null
  br i1 %.not151178, label %.thread180, label %.thread179

.thread174:                                       ; preds = %.thread168
  %74 = getelementptr inbounds i8, ptr %.1129213, i64 200
  %75 = load ptr, ptr %74, align 8, !tbaa !34
  %.not151175 = icmp eq ptr %75, null
  br i1 %.not151175, label %.thread181, label %.thread176

76:                                               ; preds = %69
  br i1 %1, label %..thread179_crit_edge, label %.thread176

..thread179_crit_edge:                            ; preds = %76
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.1129213, i64 216
  %.pre = load float, ptr %.phi.trans.insert, align 8, !tbaa !32
  br label %.thread179

.thread179:                                       ; preds = %..thread179_crit_edge, %.thread177
  %77 = phi float [ %.pre, %..thread179_crit_edge ], [ %64, %.thread177 ]
  %78 = phi ptr [ %56, %..thread179_crit_edge ], [ %66, %.thread177 ]
  %79 = phi ptr [ %71, %..thread179_crit_edge ], [ %73, %.thread177 ]
  %80 = getelementptr inbounds i8, ptr %.1129213, i64 224
  %81 = getelementptr inbounds i8, ptr %.1129213, i64 248
  %82 = load i8, ptr %81, align 8, !tbaa !35
  %83 = load i32, ptr %80, align 8
  %84 = call i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef nonnull %.1129213, ptr noundef nonnull %79, ptr noundef nonnull %78, i32 %83, float noundef %77, float noundef 1.000000e+00, i8 noundef zeroext %82) #5
  br label %.thread176

.thread176:                                       ; preds = %.thread174, %.thread179, %76
  %85 = getelementptr inbounds i8, ptr %.1129213, i64 240
  %86 = load ptr, ptr %85, align 8, !tbaa !36
  %87 = call i32 @arm_2dp_tile_transform(ptr noundef nonnull %.1129213, ptr noundef %0, ptr noundef %86, ptr noundef null) #5
  br label %113

88:                                               ; preds = %69
  br i1 %1, label %..thread180_crit_edge, label %.thread181

..thread180_crit_edge:                            ; preds = %88
  %.phi.trans.insert236 = getelementptr inbounds i8, ptr %.1129213, i64 216
  %.pre237 = load float, ptr %.phi.trans.insert236, align 8, !tbaa !32
  br label %.thread180

.thread180:                                       ; preds = %..thread180_crit_edge, %.thread177
  %89 = phi float [ %.pre237, %..thread180_crit_edge ], [ %64, %.thread177 ]
  %90 = phi ptr [ %56, %..thread180_crit_edge ], [ %66, %.thread177 ]
  %91 = getelementptr inbounds i8, ptr %.1129213, i64 224
  %92 = getelementptr inbounds i8, ptr %.1129213, i64 248
  %93 = load i8, ptr %92, align 8, !tbaa !35
  %94 = load i32, ptr %91, align 8
  %95 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare(ptr noundef nonnull %.1129213, ptr noundef nonnull %90, i32 %94, float noundef %89, float noundef 1.000000e+00, i64 noundef 63488, i8 noundef zeroext %93) #5
  br label %.thread181

.thread181:                                       ; preds = %.thread174, %.thread180, %88
  %96 = getelementptr inbounds i8, ptr %.1129213, i64 240
  %97 = load ptr, ptr %96, align 8, !tbaa !36
  %98 = call i32 @arm_2dp_tile_transform(ptr noundef nonnull %.1129213, ptr noundef %0, ptr noundef %97, ptr noundef null) #5
  br label %113

99:                                               ; preds = %54
  br i1 %1, label %..thread173_crit_edge, label %.thread170

..thread173_crit_edge:                            ; preds = %99
  %.phi.trans.insert238 = getelementptr inbounds i8, ptr %.1129213, i64 216
  %.pre239 = load float, ptr %.phi.trans.insert238, align 8, !tbaa !32
  br label %.thread173

.thread173:                                       ; preds = %..thread173_crit_edge, %.thread171
  %100 = phi float [ %.pre239, %..thread173_crit_edge ], [ %64, %.thread171 ]
  %101 = getelementptr inbounds i8, ptr %.1129213, i64 200
  %102 = load ptr, ptr %101, align 8, !tbaa !34
  %103 = getelementptr inbounds i8, ptr %.1129213, i64 224
  %104 = getelementptr inbounds i8, ptr %.1129213, i64 248
  %105 = load i8, ptr %104, align 8, !tbaa !35
  %106 = load i32, ptr %103, align 8
  %107 = call i32 @arm_2dp_rgb565_tile_transform_with_colour_keying_and_opacity_prepare(ptr noundef nonnull %.1129213, ptr noundef %102, i32 %106, float noundef %100, float noundef 1.000000e+00, i64 noundef 0, i8 noundef zeroext %105) #5
  br label %.thread170

.thread170:                                       ; preds = %.thread168, %.thread173, %99
  %108 = getelementptr inbounds i8, ptr %.1129213, i64 240
  %109 = load ptr, ptr %108, align 8, !tbaa !36
  %110 = getelementptr inbounds i8, ptr %.1129213, i64 232
  %111 = load ptr, ptr %110, align 8, !tbaa !37
  %112 = call i32 @arm_2dp_tile_transform(ptr noundef nonnull %.1129213, ptr noundef %0, ptr noundef %109, ptr noundef %111) #5
  br label %113

113:                                              ; preds = %.thread170, %.thread181, %.thread176
  %114 = getelementptr inbounds i8, ptr %.1129213, i64 256
  %115 = add nsw i64 %.0126217, -1
  %.not149 = icmp eq i64 %115, 0
  br i1 %.not149, label %.loopexit187, label %39, !llvm.loop !38

116:                                              ; preds = %.loopexit187
  %117 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !40
  %118 = fadd float %117, 0x3FC6571820000000
  store volatile float %118, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !40
  %119 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !40
  %120 = call float @fmodf(float noundef %119, float noundef 0x401921FB40000000) #5
  store volatile float %120, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !40
  %121 = load float, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !40
  %122 = fadd float %121, 0x3FA99999A0000000
  store float %122, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !40
  %123 = load i8, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !9
  %124 = icmp ugt i8 %123, 7
  br i1 %124, label %125, label %127

125:                                              ; preds = %116
  %126 = add i8 %123, -8
  br label %128

127:                                              ; preds = %116
  store float 5.000000e-01, ptr @benchmark_watch_panel_draw.s_fScale, align 4, !tbaa !40
  br label %128

128:                                              ; preds = %127, %125
  %129 = phi float [ 5.000000e-01, %127 ], [ %122, %125 ]
  %storemerge = phi i8 [ -1, %127 ], [ %126, %125 ]
  store i8 %storemerge, ptr @benchmark_watch_panel_draw.s_chOpacity, align 1, !tbaa !9
  %130 = load volatile float, ptr @benchmark_watch_panel_draw.s_fAngle, align 4, !tbaa !40
  %131 = call i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef nonnull @s_tStarOP, ptr noundef nonnull @c_tileStarRGB565, ptr noundef nonnull @c_tileStarMask2, i32 %.sroa.0.0.insert.insert, float noundef %130, float noundef %129, i8 noundef zeroext %storemerge) #5
  br label %.critedge163

.critedge163:                                     ; preds = %.loopexit187, %128
  %132 = call i32 @arm_2dp_tile_transform(ptr noundef nonnull @s_tStarOP, ptr noundef %0, ptr noundef null, ptr noundef null) #5
  %133 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %134 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef nonnull @s_tGears) #5
  %135 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef nonnull getelementptr inbounds (i8, ptr @s_tGears, i64 256)) #5
  %136 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef nonnull getelementptr inbounds (i8, ptr @s_tGears, i64 512)) #5
  %137 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef nonnull @s_tStarOP) #5
  ret void
}

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

declare i32 @arm_2dp_rgb16_fill_colour(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare i32 @arm_2dp_rgb565_tile_copy_with_des_mask_only(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @arm_2dp_rgb565_tile_copy_with_colour_keying_and_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i16) local_unnamed_addr #1

declare zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef, ptr noundef) local_unnamed_addr #1

declare i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @fmodf(float noundef, float noundef) local_unnamed_addr #4

declare i32 @arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare(ptr noundef, ptr noundef, ptr noundef, i32, float noundef, float noundef, i8 noundef zeroext) local_unnamed_addr #1

declare i32 @arm_2dp_tile_transform(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare(ptr noundef, ptr noundef, i32, float noundef, float noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #1

declare i32 @arm_2dp_rgb565_tile_transform_with_colour_keying_and_opacity_prepare(ptr noundef, ptr noundef, i32, float noundef, float noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #1

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

!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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"arm_2d_layer_t", !12, i64 0, !13, i64 8, !14, i64 16, !7, i64 20, !7, i64 21, !6, i64 22}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !28, i64 249}
!16 = !{!"", !17, i64 0, !12, i64 200, !12, i64 208, !25, i64 216, !25, i64 220, !27, i64 224, !12, i64 232, !12, i64 240, !7, i64 248, !28, i64 249}
!17 = !{!"arm_2d_op_trans_msk_opa_t", !18, i64 0, !20, i64 48, !21, i64 64, !7, i64 72, !22, i64 80, !20, i64 112, !24, i64 128, !7, i64 192}
!18 = !{!"arm_2d_op_core_t", !7, i64 0, !19, i64 40}
!19 = !{!"long", !7, i64 0}
!20 = !{!"", !12, i64 0, !12, i64 8}
!21 = !{!"", !12, i64 0}
!22 = !{!"", !12, i64 0, !23, i64 8}
!23 = !{!"arm_2d_tile_t", !7, i64 0, !7, i64 4, !7, i64 16}
!24 = !{!"__arm_2d_transform_info_t", !25, i64 0, !25, i64 4, !25, i64 8, !26, i64 12, !7, i64 20, !7, i64 24}
!25 = !{!"float", !7, i64 0}
!26 = !{!"arm_2d_point_float_t", !25, i64 0, !25, i64 4}
!27 = !{!"arm_2d_location_t", !6, i64 0, !6, i64 2}
!28 = !{!"_Bool", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!16, !25, i64 220}
!32 = !{!16, !25, i64 216}
!33 = !{!16, !12, i64 208}
!34 = !{!16, !12, i64 200}
!35 = !{!16, !7, i64 248}
!36 = !{!16, !12, i64 240}
!37 = !{!16, !12, i64 232}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!25, !25, i64 0}


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