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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.arm_2d_margin_t = type { i8, i8, i8, i8 }
%struct.arm_2d_tile_t = type { %union.anon, %union.anon.9, %union.anon.12 }
%union.anon = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.2 }
%union.arm_2d_color_info_t = type { %struct.anon.0 }
%struct.anon.0 = type { i8 }
%union.anon.2 = type { i16 }
%union.anon.9 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.11 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.12 = type { ptr }
%union.arm_2d_color_rgb565_t = type { i16 }
%union.arm_2d_alpha_samples_2pts_t = type { %struct.anon.14 }
%struct.anon.14 = type { i8, i8 }

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare ptr @arm_2d_get_default_frame_buffer() #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @draw_glass_bar(ptr noundef nonnull %0, ptr noundef %1, i8 noundef zeroext %2, i1 noundef zeroext %3) #4 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca %struct.arm_2d_margin_t, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %struct.arm_2d_margin_t, align 1
  %14 = alloca i32, align 4
  %15 = alloca %struct.arm_2d_tile_t, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.arm_2d_region_t, align 2
  %18 = alloca ptr, 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 ptr, align 8
  %24 = alloca i16, align 2
  %25 = alloca %struct.arm_2d_region_t, align 2
  %26 = alloca ptr, align 8
  %27 = alloca %struct.arm_2d_region_t, align 2
  %28 = alloca ptr, align 8
  %29 = alloca i16, align 2
  %30 = alloca %union.arm_2d_color_rgb565_t, align 2
  %31 = alloca %union.arm_2d_alpha_samples_2pts_t, align 1
  %32 = alloca i8, align 1
  %33 = alloca %struct.arm_2d_region_t, align 2
  %34 = alloca ptr, align 8
  %35 = alloca %struct.arm_2d_region_t, align 2
  %36 = alloca ptr, align 8
  %37 = alloca i16, align 2
  %38 = alloca %union.arm_2d_color_rgb565_t, align 2
  %39 = alloca %union.arm_2d_alpha_samples_2pts_t, align 1
  %40 = alloca i8, align 1
  %41 = alloca %struct.arm_2d_region_t, align 2
  %42 = alloca ptr, align 8
  %43 = alloca %struct.arm_2d_region_t, align 2
  %44 = alloca ptr, align 8
  %45 = alloca i16, align 2
  %46 = alloca %union.arm_2d_color_rgb565_t, align 2
  %47 = alloca %union.arm_2d_alpha_samples_2pts_t, align 1
  %48 = alloca i8, align 1
  %49 = alloca %struct.arm_2d_region_t, align 2
  %50 = alloca ptr, align 8
  %51 = alloca %struct.arm_2d_region_t, align 2
  %52 = alloca ptr, align 8
  %53 = alloca i16, align 2
  %54 = alloca %union.arm_2d_color_rgb565_t, align 2
  %55 = alloca %union.arm_2d_alpha_samples_2pts_t, align 1
  %56 = alloca i8, align 1
  %57 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i8 %2, ptr %7, align 1, !tbaa !9
  %58 = zext i1 %3 to i8
  store i8 %58, ptr %8, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  %59 = load i8, ptr %7, align 1, !tbaa !9
  %60 = call zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext %59, i8 noundef zeroext -128)
  store i8 %60, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  %61 = load i8, ptr %7, align 1, !tbaa !9
  %62 = call zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext %61, i8 noundef zeroext -1)
  store i8 %62, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %373, %4
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %64, i32 1
  store ptr %65, ptr %12, align 8, !tbaa !5
  %66 = icmp eq ptr %64, null
  br i1 %66, label %67, label %72

67:                                               ; preds = %63
  %68 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 0
  store i8 0, ptr %68, align 1, !tbaa !12
  %69 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 1
  store i8 0, ptr %69, align 1, !tbaa !14
  %70 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 2
  store i8 0, ptr %70, align 1, !tbaa !15
  %71 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 3
  store i8 0, ptr %71, align 1, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 %13, i64 4, i1 false), !tbaa.struct !17
  br label %73

72:                                               ; preds = %63
  br label %73

73:                                               ; preds = %72, %67
  %74 = phi i32 [ 1, %67 ], [ 0, %72 ]
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %374

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store ptr null, ptr %16, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %371, %77
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %79, i32 1
  store ptr %80, ptr %16, align 8, !tbaa !5
  %81 = icmp eq ptr %79, null
  br i1 %81, label %82, label %153

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.memset.p0.i64(ptr align 2 %17, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %83, ptr %18, align 8, !tbaa !5
  %84 = load ptr, ptr %18, align 8, !tbaa !5
  %85 = icmp eq ptr null, %84
  br i1 %85, label %86, label %92

86:                                               ; preds = %82
  %87 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %87, ptr %18, align 8, !tbaa !5
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = icmp eq ptr null, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  store i32 4, ptr %14, align 4
  br label %149

91:                                               ; preds = %86
  br label %92

92:                                               ; preds = %91, %82
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = icmp eq ptr null, %93
  br i1 %94, label %95, label %100

95:                                               ; preds = %92
  %96 = getelementptr inbounds %struct.arm_2d_region_t, ptr %17, i32 0, i32 1
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %97, i32 0, i32 1
  %99 = getelementptr inbounds %struct.arm_2d_region_t, ptr %98, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %96, ptr align 4 %99, i64 4, i1 false), !tbaa.struct !18
  br label %102

100:                                              ; preds = %92
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %17, ptr align 2 %101, i64 8, i1 false), !tbaa.struct !21
  br label %102

102:                                              ; preds = %100, %95
  %103 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 0
  %104 = load i8, ptr %103, align 1, !tbaa !12
  %105 = zext i8 %104 to i32
  %106 = getelementptr inbounds %struct.arm_2d_region_t, ptr %17, i32 0, i32 0
  %107 = getelementptr inbounds %struct.arm_2d_location_t, ptr %106, i32 0, i32 0
  %108 = load i16, ptr %107, align 2, !tbaa !9
  %109 = sext i16 %108 to i32
  %110 = add nsw i32 %109, %105
  %111 = trunc i32 %110 to i16
  store i16 %111, ptr %107, align 2, !tbaa !9
  %112 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 2
  %113 = load i8, ptr %112, align 1, !tbaa !15
  %114 = zext i8 %113 to i32
  %115 = getelementptr inbounds %struct.arm_2d_region_t, ptr %17, i32 0, i32 0
  %116 = getelementptr inbounds %struct.arm_2d_location_t, ptr %115, i32 0, i32 1
  %117 = load i16, ptr %116, align 2, !tbaa !9
  %118 = sext i16 %117 to i32
  %119 = add nsw i32 %118, %114
  %120 = trunc i32 %119 to i16
  store i16 %120, ptr %116, align 2, !tbaa !9
  %121 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 0
  %122 = load i8, ptr %121, align 1, !tbaa !12
  %123 = zext i8 %122 to i32
  %124 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 1
  %125 = load i8, ptr %124, align 1, !tbaa !14
  %126 = zext i8 %125 to i32
  %127 = add nsw i32 %123, %126
  %128 = getelementptr inbounds %struct.arm_2d_region_t, ptr %17, i32 0, i32 1
  %129 = getelementptr inbounds %struct.arm_2d_size_t, ptr %128, i32 0, i32 0
  %130 = load i16, ptr %129, align 2, !tbaa !9
  %131 = sext i16 %130 to i32
  %132 = sub nsw i32 %131, %127
  %133 = trunc i32 %132 to i16
  store i16 %133, ptr %129, align 2, !tbaa !9
  %134 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 2
  %135 = load i8, ptr %134, align 1, !tbaa !15
  %136 = zext i8 %135 to i32
  %137 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 3
  %138 = load i8, ptr %137, align 1, !tbaa !16
  %139 = zext i8 %138 to i32
  %140 = add nsw i32 %136, %139
  %141 = getelementptr inbounds %struct.arm_2d_region_t, ptr %17, i32 0, i32 1
  %142 = getelementptr inbounds %struct.arm_2d_size_t, ptr %141, i32 0, i32 1
  %143 = load i16, ptr %142, align 2, !tbaa !9
  %144 = sext i16 %143 to i32
  %145 = sub nsw i32 %144, %140
  %146 = trunc i32 %145 to i16
  store i16 %146, ptr %142, align 2, !tbaa !9
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  %148 = call ptr @arm_2d_tile_generate_child(ptr noundef %147, ptr noundef %17, ptr noundef %15, i1 noundef zeroext false)
  store ptr %148, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %14, align 4
  br label %149

149:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %150 = load i32, ptr %14, align 4
  switch i32 %150, label %372 [
    i32 0, label %151
  ]

151:                                              ; preds = %149
  %152 = load ptr, ptr %19, align 8, !tbaa !5
  br label %154

153:                                              ; preds = %78
  br label %154

154:                                              ; preds = %153, %151
  %155 = phi i32 [ 1, %151 ], [ 0, %153 ]
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 4, ptr %14, align 4
  br label %372

158:                                              ; preds = %154
  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
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %365, %158
  %160 = load ptr, ptr %21, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.arm_2d_region_t, ptr %160, i32 1
  store ptr %161, ptr %21, align 8, !tbaa !5
  %162 = icmp eq ptr %160, null
  br i1 %162, label %163, label %167

163:                                              ; preds = %159
  %164 = getelementptr inbounds %struct.arm_2d_region_t, ptr %20, i32 0, i32 1
  %165 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %15, i32 0, i32 1
  %166 = getelementptr inbounds %struct.arm_2d_region_t, ptr %165, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %164, ptr align 4 %166, i64 4, i1 false), !tbaa.struct !18
  br label %168

167:                                              ; preds = %159
  br label %168

168:                                              ; preds = %167, %163
  %169 = phi i32 [ 1, %163 ], [ 0, %167 ]
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  store i32 7, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %370

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store ptr %15, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store ptr null, ptr %23, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %362, %172
  %174 = load ptr, ptr %23, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %174, i32 1
  store ptr %175, ptr %23, align 8, !tbaa !5
  %176 = icmp eq ptr %174, null
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 10, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %364

178:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #6
  %179 = getelementptr inbounds %struct.arm_2d_region_t, ptr %20, i32 0, i32 1
  %180 = getelementptr inbounds %struct.arm_2d_size_t, ptr %179, i32 0, i32 1
  %181 = load i16, ptr %180, align 2, !tbaa !9
  %182 = sext i16 %181 to i32
  %183 = ashr i32 %182, 1
  %184 = trunc i32 %183 to i16
  store i16 %184, ptr %24, align 2, !tbaa !19
  %185 = load i8, ptr %8, align 1, !tbaa !10, !range !22, !noundef !23
  %186 = trunc i8 %185 to i1
  br i1 %186, label %187, label %274

187:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %25, ptr align 2 %20, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store ptr null, ptr %26, align 8, !tbaa !5
  br label %188

188:                                              ; preds = %223, %187
  %189 = load ptr, ptr %26, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.arm_2d_region_t, ptr %189, i32 1
  store ptr %190, ptr %26, align 8, !tbaa !5
  %191 = icmp eq ptr %189, null
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 13, ptr %14, 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 %224

193:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %27, ptr align 2 %25, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store ptr null, ptr %28, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %218, %193
  %195 = load ptr, ptr %28, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.arm_2d_region_t, ptr %195, i32 1
  store ptr %196, ptr %28, align 8, !tbaa !5
  %197 = icmp eq ptr %195, null
  br i1 %197, label %198, label %203

198:                                              ; preds = %194
  %199 = load i16, ptr %24, align 2, !tbaa !19
  %200 = getelementptr inbounds %struct.arm_2d_region_t, ptr %27, i32 0, i32 1
  %201 = getelementptr inbounds %struct.arm_2d_size_t, ptr %200, i32 0, i32 1
  store i16 %199, ptr %201, align 2, !tbaa !9
  store i16 %199, ptr %29, align 2, !tbaa !19
  %202 = load i16, ptr %29, align 2, !tbaa !19
  br label %204

203:                                              ; preds = %194
  br label %204

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

207:                                              ; preds = %204
  store i32 15, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %223

208:                                              ; preds = %204
  store i16 -1, ptr %30, align 2, !tbaa !9
  %209 = getelementptr inbounds %struct.anon.14, ptr %31, i32 0, i32 0
  %210 = load i8, ptr %10, align 1, !tbaa !9
  store i8 %210, ptr %209, align 1, !tbaa !24
  %211 = getelementptr inbounds %struct.anon.14, ptr %31, i32 0, i32 1
  %212 = load i8, ptr %9, align 1, !tbaa !9
  store i8 %212, ptr %211, align 1, !tbaa !26
  %213 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %30, i32 0, i32 0
  %214 = load i16, ptr %213, align 2
  %215 = getelementptr inbounds %union.arm_2d_alpha_samples_2pts_t, ptr %31, i32 0, i32 0
  %216 = load i16, ptr %215, align 1
  %217 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef %15, ptr noundef %27, i16 %214, i16 %216)
  br label %218

218:                                              ; preds = %208
  %219 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %220 = zext i1 %219 to i8
  store i8 %220, ptr %32, align 1, !tbaa !10
  %221 = load i8, ptr %32, align 1, !tbaa !10, !range !22, !noundef !23
  %222 = trunc i8 %221 to i1
  br label %194, !llvm.loop !27

223:                                              ; preds = %207
  br label %188, !llvm.loop !29

224:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %33, ptr align 2 %20, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store ptr null, ptr %34, align 8, !tbaa !5
  br label %225

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

229:                                              ; preds = %225
  store i32 18, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %273

230:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %35, ptr align 2 %33, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  store ptr null, ptr %36, align 8, !tbaa !5
  br label %231

231:                                              ; preds = %267, %230
  %232 = load ptr, ptr %36, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.arm_2d_region_t, ptr %232, i32 1
  store ptr %233, ptr %36, align 8, !tbaa !5
  %234 = icmp eq ptr %232, null
  br i1 %234, label %235, label %253

235:                                              ; preds = %231
  %236 = load i16, ptr %24, align 2, !tbaa !19
  %237 = getelementptr inbounds %struct.arm_2d_region_t, ptr %35, i32 0, i32 1
  %238 = getelementptr inbounds %struct.arm_2d_size_t, ptr %237, i32 0, i32 1
  store i16 %236, ptr %238, align 2, !tbaa !9
  %239 = getelementptr inbounds %struct.arm_2d_region_t, ptr %33, i32 0, i32 1
  %240 = getelementptr inbounds %struct.arm_2d_size_t, ptr %239, i32 0, i32 1
  %241 = load i16, ptr %240, align 2, !tbaa !9
  %242 = sext i16 %241 to i32
  %243 = load i16, ptr %24, align 2, !tbaa !19
  %244 = sext i16 %243 to i32
  %245 = sub nsw i32 %242, %244
  %246 = getelementptr inbounds %struct.arm_2d_region_t, ptr %35, i32 0, i32 0
  %247 = getelementptr inbounds %struct.arm_2d_location_t, ptr %246, i32 0, i32 1
  %248 = load i16, ptr %247, align 2, !tbaa !9
  %249 = sext i16 %248 to i32
  %250 = add nsw i32 %249, %245
  %251 = trunc i32 %250 to i16
  store i16 %251, ptr %247, align 2, !tbaa !9
  store i16 %251, ptr %37, align 2, !tbaa !19
  %252 = load i16, ptr %37, align 2, !tbaa !19
  br label %254

253:                                              ; preds = %231
  br label %254

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

257:                                              ; preds = %254
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %272

258:                                              ; preds = %254
  store i16 0, ptr %38, align 2, !tbaa !9
  %259 = getelementptr inbounds %struct.anon.14, ptr %39, i32 0, i32 0
  store i8 0, ptr %259, align 1, !tbaa !24
  %260 = getelementptr inbounds %struct.anon.14, ptr %39, i32 0, i32 1
  %261 = load i8, ptr %9, align 1, !tbaa !9
  store i8 %261, ptr %260, align 1, !tbaa !26
  %262 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %38, i32 0, i32 0
  %263 = load i16, ptr %262, align 2
  %264 = getelementptr inbounds %union.arm_2d_alpha_samples_2pts_t, ptr %39, i32 0, i32 0
  %265 = load i16, ptr %264, align 1
  %266 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef %15, ptr noundef %35, i16 %263, i16 %265)
  br label %267

267:                                              ; preds = %258
  %268 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %269 = zext i1 %268 to i8
  store i8 %269, ptr %40, align 1, !tbaa !10
  %270 = load i8, ptr %40, align 1, !tbaa !10, !range !22, !noundef !23
  %271 = trunc i8 %270 to i1
  br label %231, !llvm.loop !30

272:                                              ; preds = %257
  br label %225, !llvm.loop !31

273:                                              ; preds = %229
  br label %361

274:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %41, ptr align 2 %20, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  store ptr null, ptr %42, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %309, %274
  %276 = load ptr, ptr %42, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.arm_2d_region_t, ptr %276, i32 1
  store ptr %277, ptr %42, align 8, !tbaa !5
  %278 = icmp eq ptr %276, null
  br i1 %278, label %280, label %279

279:                                              ; preds = %275
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %310

280:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %43, ptr align 2 %41, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  store ptr null, ptr %44, align 8, !tbaa !5
  br label %281

281:                                              ; preds = %304, %280
  %282 = load ptr, ptr %44, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.arm_2d_region_t, ptr %282, i32 1
  store ptr %283, ptr %44, align 8, !tbaa !5
  %284 = icmp eq ptr %282, null
  br i1 %284, label %285, label %290

285:                                              ; preds = %281
  %286 = load i16, ptr %24, align 2, !tbaa !19
  %287 = getelementptr inbounds %struct.arm_2d_region_t, ptr %43, i32 0, i32 1
  %288 = getelementptr inbounds %struct.arm_2d_size_t, ptr %287, i32 0, i32 1
  store i16 %286, ptr %288, align 2, !tbaa !9
  store i16 %286, ptr %45, align 2, !tbaa !19
  %289 = load i16, ptr %45, align 2, !tbaa !19
  br label %291

290:                                              ; preds = %281
  br label %291

291:                                              ; preds = %290, %285
  %292 = phi i32 [ 1, %285 ], [ 0, %290 ]
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %295, label %294

294:                                              ; preds = %291
  store i32 25, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  br label %309

295:                                              ; preds = %291
  store i16 0, ptr %46, align 2, !tbaa !9
  %296 = getelementptr inbounds %struct.anon.14, ptr %47, i32 0, i32 0
  store i8 0, ptr %296, align 1, !tbaa !24
  %297 = getelementptr inbounds %struct.anon.14, ptr %47, i32 0, i32 1
  %298 = load i8, ptr %9, align 1, !tbaa !9
  store i8 %298, ptr %297, align 1, !tbaa !26
  %299 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %46, i32 0, i32 0
  %300 = load i16, ptr %299, align 2
  %301 = getelementptr inbounds %union.arm_2d_alpha_samples_2pts_t, ptr %47, i32 0, i32 0
  %302 = load i16, ptr %301, align 1
  %303 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef %15, ptr noundef %43, i16 %300, i16 %302)
  br label %304

304:                                              ; preds = %295
  %305 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %306 = zext i1 %305 to i8
  store i8 %306, ptr %48, align 1, !tbaa !10
  %307 = load i8, ptr %48, align 1, !tbaa !10, !range !22, !noundef !23
  %308 = trunc i8 %307 to i1
  br label %281, !llvm.loop !32

309:                                              ; preds = %294
  br label %275, !llvm.loop !33

310:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %49, ptr align 2 %20, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  store ptr null, ptr %50, align 8, !tbaa !5
  br label %311

311:                                              ; preds = %359, %310
  %312 = load ptr, ptr %50, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.arm_2d_region_t, ptr %312, i32 1
  store ptr %313, ptr %50, align 8, !tbaa !5
  %314 = icmp eq ptr %312, null
  br i1 %314, label %316, label %315

315:                                              ; preds = %311
  store i32 28, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  br label %360

316:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %51, ptr align 2 %49, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #6
  store ptr null, ptr %52, align 8, !tbaa !5
  br label %317

317:                                              ; preds = %354, %316
  %318 = load ptr, ptr %52, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.arm_2d_region_t, ptr %318, i32 1
  store ptr %319, ptr %52, align 8, !tbaa !5
  %320 = icmp eq ptr %318, null
  br i1 %320, label %321, label %339

321:                                              ; preds = %317
  %322 = load i16, ptr %24, align 2, !tbaa !19
  %323 = getelementptr inbounds %struct.arm_2d_region_t, ptr %51, i32 0, i32 1
  %324 = getelementptr inbounds %struct.arm_2d_size_t, ptr %323, i32 0, i32 1
  store i16 %322, ptr %324, align 2, !tbaa !9
  %325 = getelementptr inbounds %struct.arm_2d_region_t, ptr %49, i32 0, i32 1
  %326 = getelementptr inbounds %struct.arm_2d_size_t, ptr %325, i32 0, i32 1
  %327 = load i16, ptr %326, align 2, !tbaa !9
  %328 = sext i16 %327 to i32
  %329 = load i16, ptr %24, align 2, !tbaa !19
  %330 = sext i16 %329 to i32
  %331 = sub nsw i32 %328, %330
  %332 = getelementptr inbounds %struct.arm_2d_region_t, ptr %51, i32 0, i32 0
  %333 = getelementptr inbounds %struct.arm_2d_location_t, ptr %332, i32 0, i32 1
  %334 = load i16, ptr %333, align 2, !tbaa !9
  %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 !9
  store i16 %337, ptr %53, align 2, !tbaa !19
  %338 = load i16, ptr %53, align 2, !tbaa !19
  br label %340

339:                                              ; preds = %317
  br label %340

340:                                              ; preds = %339, %321
  %341 = phi i32 [ 1, %321 ], [ 0, %339 ]
  %342 = icmp ne i32 %341, 0
  br i1 %342, label %344, label %343

343:                                              ; preds = %340
  store i32 30, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  br label %359

344:                                              ; preds = %340
  store i16 -1, ptr %54, align 2, !tbaa !9
  %345 = getelementptr inbounds %struct.anon.14, ptr %55, i32 0, i32 0
  %346 = load i8, ptr %10, align 1, !tbaa !9
  store i8 %346, ptr %345, align 1, !tbaa !24
  %347 = getelementptr inbounds %struct.anon.14, ptr %55, i32 0, i32 1
  %348 = load i8, ptr %9, align 1, !tbaa !9
  store i8 %348, ptr %347, align 1, !tbaa !26
  %349 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %54, i32 0, i32 0
  %350 = load i16, ptr %349, align 2
  %351 = getelementptr inbounds %union.arm_2d_alpha_samples_2pts_t, ptr %55, i32 0, i32 0
  %352 = load i16, ptr %351, align 1
  %353 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef %15, ptr noundef %51, i16 %350, i16 %352)
  br label %354

354:                                              ; preds = %344
  %355 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %356 = zext i1 %355 to i8
  store i8 %356, ptr %56, align 1, !tbaa !10
  %357 = load i8, ptr %56, align 1, !tbaa !10, !range !22, !noundef !23
  %358 = trunc i8 %357 to i1
  br label %317, !llvm.loop !34

359:                                              ; preds = %343
  br label %311, !llvm.loop !35

360:                                              ; preds = %315
  br label %361

361:                                              ; preds = %360, %273
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #6
  br label %362

362:                                              ; preds = %361
  %363 = load ptr, ptr %22, align 8, !tbaa !5
  br label %173, !llvm.loop !36

364:                                              ; preds = %177
  br label %365

365:                                              ; preds = %364
  %366 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %367 = zext i1 %366 to i8
  store i8 %367, ptr %57, align 1, !tbaa !10
  %368 = load i8, ptr %57, align 1, !tbaa !10, !range !22, !noundef !23
  %369 = trunc i8 %368 to i1
  br label %159, !llvm.loop !37

370:                                              ; preds = %171
  br label %371

371:                                              ; preds = %370
  br label %78, !llvm.loop !38

372:                                              ; preds = %157, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %373

373:                                              ; preds = %372
  br label %63, !llvm.loop !39

374:                                              ; preds = %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext, i8 noundef zeroext) #5

declare i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef, ptr noundef, ptr noundef, i16, i16) #3

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

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!14 = !{!13, !7, i64 1}
!15 = !{!13, !7, i64 2}
!16 = !{!13, !7, i64 3}
!17 = !{i64 0, i64 1, !9, i64 1, i64 1, !9, i64 2, i64 1, !9, i64 3, i64 1, !9}
!18 = !{i64 0, i64 2, !19, i64 2, i64 2, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!25, !7, i64 0}
!25 = !{!"", !7, i64 0, !7, i64 1}
!26 = !{!25, !7, i64 1}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}
!36 = distinct !{!36, !28}
!37 = distinct !{!37, !28}
!38 = distinct !{!38, !28}
!39 = distinct !{!39, !28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.arm_2d_tile_t = type { %union.anon, %union.anon.9, %union.anon.12 }
%union.anon = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.2 }
%union.arm_2d_color_info_t = type { %struct.anon.0 }
%struct.anon.0 = type { i8 }
%union.anon.2 = type { i16 }
%union.anon.9 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.11 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.12 = type { ptr }

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare ptr @arm_2d_tile_generate_child(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) 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) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @draw_glass_bar(ptr noundef nonnull %0, ptr noundef readonly %1, i8 noundef zeroext %2, i1 noundef zeroext %3) local_unnamed_addr #3 {
  %5 = alloca %struct.arm_2d_tile_t, align 8
  %6 = alloca %struct.arm_2d_region_t, align 8
  %7 = alloca %struct.arm_2d_region_t, align 4
  %8 = alloca %struct.arm_2d_region_t, align 4
  %9 = alloca %struct.arm_2d_region_t, align 4
  %10 = alloca %struct.arm_2d_region_t, align 4
  %11 = tail call zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext %2, i8 noundef zeroext -128)
  %12 = tail call zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext %2, i8 noundef zeroext -1)
  %13 = icmp eq ptr %1, null
  %14 = getelementptr inbounds i8, ptr %6, i64 4
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.8.4..sroa_idx = getelementptr inbounds i8, ptr %5, i64 10
  %.sroa.047.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 4
  %.sroa.448.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 6
  %.sroa.210.0.insert.ext = zext i8 %11 to i16
  %.sroa.210.0.insert.shift = shl nuw i16 %.sroa.210.0.insert.ext, 8
  %.sroa.05.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 4
  %.sroa.4.0..sroa_idx6 = getelementptr inbounds i8, ptr %10, i64 6
  %17 = getelementptr inbounds i8, ptr %10, i64 2
  %.sroa.0.0.insert.ext = zext i8 %12 to i16
  %.sroa.0.0.insert.insert = or disjoint i16 %.sroa.210.0.insert.shift, %.sroa.0.0.insert.ext
  %.sroa.049.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 4
  %.sroa.450.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 6
  %.sroa.022.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 4
  %.sroa.423.0..sroa_idx24 = getelementptr inbounds i8, ptr %8, i64 6
  %18 = getelementptr inbounds i8, ptr %8, i64 2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 0, ptr %6, align 8
  br i1 %3, label %.split138.us.us, label %.split138

.split138.us.us:                                  ; preds = %4
  br i1 %13, label %21, label %19

19:                                               ; preds = %.split138.us.us
  %20 = load i64, ptr %1, align 2
  store i64 %20, ptr %6, align 8
  br label %.split137.us.us.us

21:                                               ; preds = %.split138.us.us
  %22 = load i32, ptr %15, align 4
  store i32 %22, ptr %14, align 4
  br label %.split137.us.us.us

.split137.us.us.us:                               ; preds = %21, %19
  %23 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %5, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %24 = load i16, ptr %16, align 8, !tbaa !5
  %.sroa.8.4.copyload.us.us.us = load i16, ptr %.sroa.8.4..sroa_idx, align 2, !tbaa !5
  %25 = ashr i16 %.sroa.8.4.copyload.us.us.us, 1
  %26 = sub i16 %.sroa.8.4.copyload.us.us.us, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  store i16 %24, ptr %.sroa.049.sroa.4.0..sroa_idx, align 4
  store i16 %25, ptr %.sroa.450.0..sroa_idx, align 2, !tbaa !9
  %27 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %7, i16 -1, i16 %.sroa.0.0.insert.insert) #5
  %28 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  store i16 %24, ptr %.sroa.022.sroa.4.0..sroa_idx, align 4
  store i16 %25, ptr %.sroa.423.0..sroa_idx24, align 2, !tbaa !9
  store i16 %26, ptr %18, align 2, !tbaa !9
  %29 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %8, i16 0, i16 %.sroa.210.0.insert.shift) #5
  %30 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %31 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %32

32:                                               ; preds = %.split137.us.us.us, %.split137
  ret void

.split138:                                        ; preds = %4
  br i1 %13, label %33, label %35

33:                                               ; preds = %.split138
  %34 = load i32, ptr %15, align 4
  store i32 %34, ptr %14, align 4
  br label %.split137

35:                                               ; preds = %.split138
  %36 = load i64, ptr %1, align 2
  store i64 %36, ptr %6, align 8
  br label %.split137

.split137:                                        ; preds = %33, %35
  %37 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %5, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %38 = load i16, ptr %16, align 8, !tbaa !5
  %.sroa.8.4.copyload = load i16, ptr %.sroa.8.4..sroa_idx, align 2, !tbaa !5
  %39 = ashr i16 %.sroa.8.4.copyload, 1
  %40 = sub i16 %.sroa.8.4.copyload, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  store i16 %38, ptr %.sroa.047.sroa.4.0..sroa_idx, align 4
  store i16 %39, ptr %.sroa.448.0..sroa_idx, align 2, !tbaa !9
  %41 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %9, i16 0, i16 %.sroa.210.0.insert.shift) #5
  %42 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  store i16 %38, ptr %.sroa.05.sroa.4.0..sroa_idx, align 4
  store i16 %39, ptr %.sroa.4.0..sroa_idx6, align 2, !tbaa !9
  store i16 %40, ptr %17, align 2, !tbaa !9
  %43 = call i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %10, i16 -1, i16 %.sroa.0.0.insert.insert) #5
  %44 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %45 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %32
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i8 @arm_2d_helper_alpha_mix(i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #4

declare i32 @arm_2dp_rgb565_fill_colour_with_vertical_alpha_gradient(ptr noundef, ptr noundef, ptr noundef, i16, i16) local_unnamed_addr #2

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

!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}


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