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

; 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.6, %union.anon.17, %union.anon.18 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i8, %union.arm_2d_color_info_t, %union.anon.10 }
%union.arm_2d_color_info_t = type { %struct.anon.8 }
%struct.anon.8 = type { i8 }
%union.anon.10 = type { i16 }
%union.anon.17 = type { %struct.arm_2d_region_t }
%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 }
%union.anon.18 = type { ptr }
%struct.cloudy_glass_t = type { %struct.anon }
%struct.anon = type { %struct.cloudy_glass_cfg_t, [1 x i64], %struct.arm_2d_helper_dirty_region_item_t, %struct.arm_2d_filter_iir_blur_descriptor_t, %struct.dynamic_nebula_t }
%struct.cloudy_glass_cfg_t = type { ptr, %struct.arm_2d_size_t, i16, float, ptr, i16, i16, i8 }
%struct.arm_2d_helper_dirty_region_item_t = type { [48 x i8], %struct.arm_2d_region_t }
%struct.arm_2d_filter_iir_blur_descriptor_t = type { [72 x i8], %struct.arm_2d_scratch_mem_t }
%struct.arm_2d_scratch_mem_t = type { %union.anon.1, i64 }
%union.anon.1 = type { %union.anon.2 }
%union.anon.2 = type { %struct.anon.3 }
%struct.anon.3 = type { i32 }
%struct.dynamic_nebula_t = type { [56 x i8], ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@__PRETTY_FUNCTION__.cloudy_glass_show = external hidden unnamed_addr constant [89 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @cloudy_glass_show(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i16, align 2
  %9 = alloca %struct.arm_2d_margin_t, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %struct.arm_2d_margin_t, align 1
  %12 = alloca i32, align 4
  %13 = alloca %struct.arm_2d_tile_t, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.arm_2d_region_t, align 2
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.arm_2d_region_t, align 2
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %struct.arm_2d_region_t, align 2
  %23 = alloca ptr, align 8
  %24 = alloca %struct.arm_2d_region_t, align 2
  %25 = alloca ptr, align 8
  %26 = alloca %struct.arm_2d_size_t, align 2
  %27 = alloca i16, align 2
  %28 = alloca %struct.arm_2d_region_t, align 2
  %29 = alloca ptr, align 8
  %30 = alloca %struct.arm_2d_region_t, align 2
  %31 = alloca ptr, align 8
  %32 = alloca i16, align 2
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = ptrtoint ptr %36 to i64
  %38 = icmp eq i64 -1, %37
  br i1 %38, label %39, label %41

39:                                               ; preds = %3
  %40 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %40, ptr %5, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %39, %3
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = icmp ne ptr null, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  br label %46

45:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 227, ptr noundef @__PRETTY_FUNCTION__.cloudy_glass_show) #6
  unreachable

46:                                               ; preds = %44
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = icmp ne ptr null, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  br label %51

50:                                               ; preds = %46
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 228, ptr noundef @__PRETTY_FUNCTION__.cloudy_glass_show) #6
  unreachable

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call i32 @arm_2d_target_tile_is_new_frame(ptr noundef %52)
  %54 = icmp ne i32 %53, 0
  %55 = zext i1 %54 to i8
  store i8 %55, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #7
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.cloudy_glass_t, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.anon, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds %struct.cloudy_glass_cfg_t, ptr %58, i32 0, i32 2
  %60 = load i16, ptr %59, align 4, !tbaa !11
  %61 = sext i16 %60 to i32
  %62 = mul nsw i32 %61, 2
  %63 = trunc i32 %62 to i16
  store i16 %63, ptr %8, align 2, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %353, %51
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %65, i32 1
  store ptr %66, ptr %10, align 8, !tbaa !5
  %67 = icmp eq ptr %65, null
  br i1 %67, label %68, label %73

68:                                               ; preds = %64
  %69 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 0
  store i8 0, ptr %69, align 1, !tbaa !25
  %70 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 1
  store i8 0, ptr %70, align 1, !tbaa !27
  %71 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 2
  store i8 0, ptr %71, align 1, !tbaa !28
  %72 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %11, i32 0, i32 3
  store i8 0, ptr %72, align 1, !tbaa !29
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %9, ptr align 1 %11, i64 4, i1 false), !tbaa.struct !30
  br label %74

73:                                               ; preds = %64
  br label %74

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

77:                                               ; preds = %74
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %354

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %79

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

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.memset.p0.i64(ptr align 2 %15, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %84, ptr %16, align 8, !tbaa !5
  %85 = load ptr, ptr %16, align 8, !tbaa !5
  %86 = icmp eq ptr null, %85
  br i1 %86, label %87, label %93

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

91:                                               ; preds = %87
  store i32 4, ptr %12, align 4
  br label %150

92:                                               ; preds = %87
  br label %93

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

96:                                               ; preds = %93
  %97 = getelementptr inbounds %struct.arm_2d_region_t, ptr %15, i32 0, i32 1
  %98 = load ptr, ptr %16, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.arm_2d_region_t, ptr %99, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %97, ptr align 4 %100, i64 4, i1 false), !tbaa.struct !32
  br label %103

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

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

150:                                              ; preds = %103, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  %151 = load i32, ptr %12, align 4
  switch i32 %151, label %352 [
    i32 0, label %152
  ]

152:                                              ; preds = %150
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  br label %155

154:                                              ; preds = %79
  br label %155

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

158:                                              ; preds = %155
  store i32 4, ptr %12, align 4
  br label %352

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 2 %18, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %160

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

164:                                              ; preds = %160
  %165 = getelementptr inbounds %struct.arm_2d_region_t, ptr %18, i32 0, i32 1
  %166 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %13, i32 0, i32 1
  %167 = getelementptr inbounds %struct.arm_2d_region_t, ptr %166, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %165, ptr align 4 %167, i64 4, i1 false), !tbaa.struct !32
  br label %169

168:                                              ; preds = %160
  br label %169

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

172:                                              ; preds = %169
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %350

173:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr %13, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %174

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

178:                                              ; preds = %174
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %344

179:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %22, ptr align 2 %18, i64 8, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr null, ptr %23, align 8, !tbaa !5
  br label %180

180:                                              ; preds = %340, %179
  %181 = load ptr, ptr %23, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.arm_2d_region_t, ptr %181, i32 1
  store ptr %182, ptr %23, align 8, !tbaa !5
  %183 = icmp eq ptr %181, null
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %341

185:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store ptr null, ptr %25, align 8, !tbaa !5
  br label %186

186:                                              ; preds = %335, %185
  %187 = load ptr, ptr %25, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.arm_2d_region_t, ptr %187, i32 1
  store ptr %188, ptr %25, align 8, !tbaa !5
  %189 = icmp eq ptr %187, null
  br i1 %189, label %190, label %236

190:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.cloudy_glass_t, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds %struct.anon, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds %struct.cloudy_glass_cfg_t, ptr %193, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %26, ptr align 8 %194, i64 4, i1 false), !tbaa.struct !32
  %195 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %196 = load i16, ptr %195, align 2, !tbaa !34
  %197 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %198 = getelementptr inbounds %struct.arm_2d_size_t, ptr %197, i32 0, i32 0
  store i16 %196, ptr %198, align 2, !tbaa !31
  %199 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 1
  %200 = load i16, ptr %199, align 2, !tbaa !35
  %201 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 1
  %202 = getelementptr inbounds %struct.arm_2d_size_t, ptr %201, i32 0, i32 1
  store i16 %200, ptr %202, align 2, !tbaa !31
  %203 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 0
  %204 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %203, ptr align 2 %204, i64 4, i1 false), !tbaa.struct !32
  %205 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %206 = getelementptr inbounds %struct.arm_2d_size_t, ptr %205, i32 0, i32 0
  %207 = load i16, ptr %206, align 2, !tbaa !31
  %208 = sext i16 %207 to i32
  %209 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 0
  %210 = load i16, ptr %209, align 2, !tbaa !34
  %211 = sext i16 %210 to i32
  %212 = sub nsw i32 %208, %211
  %213 = ashr i32 %212, 1
  %214 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 0
  %215 = getelementptr inbounds %struct.arm_2d_location_t, ptr %214, i32 0, i32 0
  %216 = load i16, ptr %215, align 2, !tbaa !31
  %217 = sext i16 %216 to i32
  %218 = add nsw i32 %217, %213
  %219 = trunc i32 %218 to i16
  store i16 %219, ptr %215, align 2, !tbaa !31
  %220 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %221 = getelementptr inbounds %struct.arm_2d_size_t, ptr %220, i32 0, i32 1
  %222 = load i16, ptr %221, align 2, !tbaa !31
  %223 = sext i16 %222 to i32
  %224 = getelementptr inbounds %struct.arm_2d_size_t, ptr %26, i32 0, i32 1
  %225 = load i16, ptr %224, align 2, !tbaa !35
  %226 = sext i16 %225 to i32
  %227 = sub nsw i32 %223, %226
  %228 = ashr i32 %227, 1
  %229 = getelementptr inbounds %struct.arm_2d_region_t, ptr %24, i32 0, i32 0
  %230 = getelementptr inbounds %struct.arm_2d_location_t, ptr %229, i32 0, i32 1
  %231 = load i16, ptr %230, align 2, !tbaa !31
  %232 = sext i16 %231 to i32
  %233 = add nsw i32 %232, %228
  %234 = trunc i32 %233 to i16
  store i16 %234, ptr %230, align 2, !tbaa !31
  store i16 %234, ptr %27, align 2, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  %235 = load i16, ptr %27, align 2, !tbaa !24
  br label %237

236:                                              ; preds = %186
  br label %237

237:                                              ; preds = %236, %190
  %238 = phi i32 [ 1, %190 ], [ 0, %236 ]
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %241, label %240

240:                                              ; preds = %237
  store i32 15, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %340

241:                                              ; preds = %237
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.cloudy_glass_t, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds %struct.anon, ptr %243, i32 0, i32 4
  %245 = load i8, ptr %7, align 1, !tbaa !9, !range !36, !noundef !37
  %246 = trunc i8 %245 to i1
  call void @dynamic_nebula_show(ptr noundef %244, ptr noundef %13, ptr noundef %24, i16 noundef zeroext -1, i8 noundef zeroext -1, i1 noundef zeroext %246)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %28, ptr align 2 %24, i64 8, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store ptr null, ptr %29, align 8, !tbaa !5
  br label %247

247:                                              ; preds = %329, %241
  %248 = load ptr, ptr %29, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.arm_2d_region_t, ptr %248, i32 1
  store ptr %249, ptr %29, align 8, !tbaa !5
  %250 = icmp eq ptr %248, null
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 18, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %330

252:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store ptr null, ptr %31, align 8, !tbaa !5
  br label %253

253:                                              ; preds = %324, %252
  %254 = load ptr, ptr %31, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.arm_2d_region_t, ptr %254, i32 1
  store ptr %255, ptr %31, align 8, !tbaa !5
  %256 = icmp eq ptr %254, null
  br i1 %256, label %257, label %295

257:                                              ; preds = %253
  %258 = load i16, ptr %8, align 2, !tbaa !24
  %259 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 1
  %260 = getelementptr inbounds %struct.arm_2d_size_t, ptr %259, i32 0, i32 0
  store i16 %258, ptr %260, align 2, !tbaa !31
  %261 = load i16, ptr %8, align 2, !tbaa !24
  %262 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 1
  %263 = getelementptr inbounds %struct.arm_2d_size_t, ptr %262, i32 0, i32 1
  store i16 %261, ptr %263, align 2, !tbaa !31
  %264 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 0
  %265 = getelementptr inbounds %struct.arm_2d_region_t, ptr %28, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %264, ptr align 2 %265, i64 4, i1 false), !tbaa.struct !32
  %266 = getelementptr inbounds %struct.arm_2d_region_t, ptr %28, i32 0, i32 1
  %267 = getelementptr inbounds %struct.arm_2d_size_t, ptr %266, i32 0, i32 0
  %268 = load i16, ptr %267, align 2, !tbaa !31
  %269 = sext i16 %268 to i32
  %270 = load i16, ptr %8, align 2, !tbaa !24
  %271 = sext i16 %270 to i32
  %272 = sub nsw i32 %269, %271
  %273 = ashr i32 %272, 1
  %274 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 0
  %275 = getelementptr inbounds %struct.arm_2d_location_t, ptr %274, i32 0, i32 0
  %276 = load i16, ptr %275, align 2, !tbaa !31
  %277 = sext i16 %276 to i32
  %278 = add nsw i32 %277, %273
  %279 = trunc i32 %278 to i16
  store i16 %279, ptr %275, align 2, !tbaa !31
  %280 = getelementptr inbounds %struct.arm_2d_region_t, ptr %28, i32 0, i32 1
  %281 = getelementptr inbounds %struct.arm_2d_size_t, ptr %280, i32 0, i32 1
  %282 = load i16, ptr %281, align 2, !tbaa !31
  %283 = sext i16 %282 to i32
  %284 = load i16, ptr %8, align 2, !tbaa !24
  %285 = sext i16 %284 to i32
  %286 = sub nsw i32 %283, %285
  %287 = ashr i32 %286, 1
  %288 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 0
  %289 = getelementptr inbounds %struct.arm_2d_location_t, ptr %288, i32 0, i32 1
  %290 = load i16, ptr %289, align 2, !tbaa !31
  %291 = sext i16 %290 to i32
  %292 = add nsw i32 %291, %287
  %293 = trunc i32 %292 to i16
  store i16 %293, ptr %289, align 2, !tbaa !31
  store i16 %293, ptr %32, align 2, !tbaa !24
  %294 = load i16, ptr %32, align 2, !tbaa !24
  br label %296

295:                                              ; preds = %253
  br label %296

296:                                              ; preds = %295, %257
  %297 = phi i32 [ 1, %257 ], [ 0, %295 ]
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %300, label %299

299:                                              ; preds = %296
  store i32 20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %329

300:                                              ; preds = %296
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.cloudy_glass_t, ptr %301, i32 0, i32 0
  %303 = getelementptr inbounds %struct.anon, ptr %302, i32 0, i32 0
  %304 = getelementptr inbounds %struct.cloudy_glass_cfg_t, ptr %303, i32 0, i32 7
  %305 = load i8, ptr %304, align 4, !tbaa !38, !range !36, !noundef !37
  %306 = trunc i8 %305 to i1
  br i1 %306, label %307, label %312

307:                                              ; preds = %300
  %308 = load ptr, ptr %4, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.cloudy_glass_t, ptr %308, i32 0, i32 0
  %310 = getelementptr inbounds %struct.anon, ptr %309, i32 0, i32 3
  %311 = call i32 @arm_2dp_rgb565_filter_iir_blur(ptr noundef %310, ptr noundef %13, ptr noundef %30, i8 noundef zeroext -17)
  br label %312

312:                                              ; preds = %307, %300
  %313 = load ptr, ptr %4, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.cloudy_glass_t, ptr %313, i32 0, i32 0
  %315 = getelementptr inbounds %struct.anon, ptr %314, i32 0, i32 0
  %316 = getelementptr inbounds %struct.cloudy_glass_cfg_t, ptr %315, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8, !tbaa !39
  %318 = icmp ne ptr null, %317
  br i1 %318, label %319, label %323

319:                                              ; preds = %312
  %320 = load ptr, ptr %4, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.cloudy_glass_t, ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds %struct.anon, ptr %321, i32 0, i32 2
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %322, ptr noundef %13, ptr noundef %18, ptr noundef %30)
  br label %323

323:                                              ; preds = %319, %312
  br label %324

324:                                              ; preds = %323
  %325 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %326 = zext i1 %325 to i8
  store i8 %326, ptr %33, align 1, !tbaa !9
  %327 = load i8, ptr %33, align 1, !tbaa !9, !range !36, !noundef !37
  %328 = trunc i8 %327 to i1
  br label %253, !llvm.loop !40

329:                                              ; preds = %299
  br label %247, !llvm.loop !42

330:                                              ; preds = %251
  %331 = load ptr, ptr %4, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.cloudy_glass_t, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.anon, ptr %332, i32 0, i32 3
  %334 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef %333)
  br label %335

335:                                              ; preds = %330
  %336 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %337 = zext i1 %336 to i8
  store i8 %337, ptr %34, align 1, !tbaa !9
  %338 = load i8, ptr %34, align 1, !tbaa !9, !range !36, !noundef !37
  %339 = trunc i8 %338 to i1
  br label %186, !llvm.loop !43

340:                                              ; preds = %240
  br label %180, !llvm.loop !44

341:                                              ; preds = %184
  br label %342

342:                                              ; preds = %341
  %343 = load ptr, ptr %20, align 8, !tbaa !5
  br label %174, !llvm.loop !45

344:                                              ; preds = %178
  br label %345

345:                                              ; preds = %344
  %346 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %347 = zext i1 %346 to i8
  store i8 %347, ptr %35, align 1, !tbaa !9
  %348 = load i8, ptr %35, align 1, !tbaa !9, !range !36, !noundef !37
  %349 = trunc i8 %348 to i1
  br label %160, !llvm.loop !46

350:                                              ; preds = %172
  br label %351

351:                                              ; preds = %350
  br label %79, !llvm.loop !47

352:                                              ; preds = %158, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  br label %353

353:                                              ; preds = %352
  br label %64, !llvm.loop !48

354:                                              ; preds = %77
  %355 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  ret void
}

declare ptr @arm_2d_get_default_frame_buffer() #5

declare i32 @arm_2d_target_tile_is_new_frame(ptr noundef) #5

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

declare void @dynamic_nebula_show(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, i1 noundef zeroext) #5

declare i32 @arm_2dp_rgb565_filter_iir_blur(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) #5

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

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !16, i64 12}
!12 = !{!"cloudy_glass_t", !13, i64 0}
!13 = !{!"", !14, i64 0, !7, i64 40, !18, i64 48, !20, i64 104, !23, i64 192}
!14 = !{!"cloudy_glass_cfg_t", !6, i64 0, !15, i64 8, !16, i64 12, !17, i64 16, !6, i64 24, !16, i64 32, !16, i64 34, !10, i64 36}
!15 = !{!"arm_2d_size_t", !16, i64 0, !16, i64 2}
!16 = !{!"short", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"arm_2d_helper_dirty_region_item_t", !7, i64 0, !19, i64 48}
!19 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!20 = !{!"arm_2d_filter_iir_blur_descriptor_t", !7, i64 0, !21, i64 72}
!21 = !{!"arm_2d_scratch_mem_t", !7, i64 0, !22, i64 8}
!22 = !{!"long", !7, i64 0}
!23 = !{!"dynamic_nebula_t", !7, i64 0, !6, i64 56}
!24 = !{!16, !16, i64 0}
!25 = !{!26, !7, i64 0}
!26 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!27 = !{!26, !7, i64 1}
!28 = !{!26, !7, i64 2}
!29 = !{!26, !7, i64 3}
!30 = !{i64 0, i64 1, !31, i64 1, i64 1, !31, i64 2, i64 1, !31, i64 3, i64 1, !31}
!31 = !{!7, !7, i64 0}
!32 = !{i64 0, i64 2, !24, i64 2, i64 2, !24}
!33 = !{i64 0, i64 4, !31, i64 4, i64 4, !31}
!34 = !{!15, !16, i64 0}
!35 = !{!15, !16, i64 2}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!12, !10, i64 36}
!39 = !{!12, !6, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = distinct !{!43, !41}
!44 = distinct !{!44, !41}
!45 = distinct !{!45, !41}
!46 = distinct !{!46, !41}
!47 = distinct !{!47, !41}
!48 = distinct !{!48, !41}


; 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.6, %union.anon.17, %union.anon.18 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i8, %union.arm_2d_color_info_t, %union.anon.10 }
%union.arm_2d_color_info_t = type { %struct.anon.8 }
%struct.anon.8 = type { i8 }
%union.anon.10 = type { i16 }
%union.anon.17 = type { %struct.arm_2d_region_t }
%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 }
%union.anon.18 = type { ptr }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@__PRETTY_FUNCTION__.cloudy_glass_show = external hidden unnamed_addr constant [89 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @cloudy_glass_show(ptr noundef nonnull %0, ptr noundef %1, ptr noundef readonly %2) local_unnamed_addr #3 {
  %4 = alloca %struct.arm_2d_tile_t, align 8
  %5 = alloca %struct.arm_2d_region_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 2
  %9 = icmp eq ptr %1, inttoptr (i64 -1 to ptr)
  br i1 %9, label %10, label %12

10:                                               ; preds = %3
  %11 = tail call ptr @arm_2d_get_default_frame_buffer() #5
  br label %12

12:                                               ; preds = %3, %10
  %.0 = phi ptr [ %11, %10 ], [ %1, %3 ]
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %13, label %14

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 228, ptr noundef nonnull @__PRETTY_FUNCTION__.cloudy_glass_show) #6
  unreachable

14:                                               ; preds = %12
  %15 = tail call i32 @arm_2d_target_tile_is_new_frame(ptr noundef nonnull %.0) #5
  %16 = icmp ne i32 %15, 0
  %17 = getelementptr inbounds i8, ptr %0, i64 12
  %18 = load i16, ptr %17, align 4, !tbaa !5
  %19 = shl i16 %18, 1
  %20 = icmp eq ptr %2, null
  %21 = getelementptr inbounds i8, ptr %6, i64 4
  %22 = getelementptr inbounds i8, ptr %4, i64 8
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %.sroa.58.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 10
  %24 = getelementptr inbounds i8, ptr %7, i64 4
  %25 = getelementptr inbounds i8, ptr %7, i64 6
  %26 = getelementptr inbounds i8, ptr %7, i64 2
  %27 = getelementptr inbounds i8, ptr %0, i64 192
  %28 = getelementptr inbounds i8, ptr %8, i64 4
  %29 = getelementptr inbounds i8, ptr %8, i64 6
  %30 = sext i16 %19 to i32
  %31 = getelementptr inbounds i8, ptr %8, i64 2
  %32 = getelementptr inbounds i8, ptr %0, i64 36
  %33 = getelementptr inbounds i8, ptr %0, i64 104
  %34 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8
  br i1 %20, label %35, label %39

35:                                               ; preds = %14
  %36 = getelementptr inbounds i8, ptr %.0, i64 8
  %37 = getelementptr inbounds i8, ptr %5, i64 4
  %38 = load i32, ptr %36, align 4
  store i32 %38, ptr %37, align 4
  br label %41

39:                                               ; preds = %14
  %40 = load i64, ptr %2, align 2
  store i64 %40, ptr %5, align 8
  br label %41

41:                                               ; preds = %35, %39
  %42 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %.0, ptr noundef nonnull %5, ptr noundef nonnull %4, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 0, ptr %6, align 8
  %43 = load i32, ptr %22, align 8
  store i32 %43, ptr %21, align 4
  %sext = shl i32 %43, 16
  %44 = ashr exact i32 %sext, 16
  %45 = ashr i32 %43, 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %.sroa.06.0.copyload = load i16, ptr %23, align 8, !tbaa !22
  %.sroa.58.0.copyload = load i16, ptr %.sroa.58.0..sroa_idx, align 2, !tbaa !22
  store i16 %.sroa.06.0.copyload, ptr %24, align 4, !tbaa !23
  store i16 %.sroa.58.0.copyload, ptr %25, align 2, !tbaa !23
  %46 = sext i16 %.sroa.06.0.copyload to i32
  %47 = sub nsw i32 %44, %46
  %48 = lshr i32 %47, 1
  %49 = trunc i32 %48 to i16
  store i16 %49, ptr %7, align 4, !tbaa !23
  %50 = sext i16 %.sroa.58.0.copyload to i32
  %51 = sub nsw i32 %45, %50
  %52 = lshr i32 %51, 1
  %53 = trunc i32 %52 to i16
  store i16 %53, ptr %26, align 2, !tbaa !23
  call void @dynamic_nebula_show(ptr noundef nonnull %27, ptr noundef nonnull %4, ptr noundef nonnull %7, i16 noundef zeroext -1, i8 noundef zeroext -1, i1 noundef zeroext %16) #5
  %54 = load i32, ptr %7, align 4, !tbaa !23
  %.sroa.4.0.copyload = load i16, ptr %24, align 4
  %.sroa.5.0.copyload = load i16, ptr %25, align 2, !tbaa !23
  %55 = sext i16 %.sroa.4.0.copyload to i32
  %56 = sub nsw i32 %55, %30
  %57 = lshr i32 %56, 1
  %58 = trunc i32 %57 to i16
  %59 = sext i16 %.sroa.5.0.copyload to i32
  %60 = sub nsw i32 %59, %30
  %61 = lshr i32 %60, 1
  %62 = trunc i32 %61 to i16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i16 %19, ptr %28, align 2, !tbaa !23
  store i16 %19, ptr %29, align 2, !tbaa !23
  %63 = trunc i32 %54 to i16
  %64 = add i16 %63, %58
  store i16 %64, ptr %8, align 2, !tbaa !23
  %65 = lshr i32 %54, 16
  %66 = trunc nuw i32 %65 to i16
  %67 = add i16 %66, %62
  store i16 %67, ptr %31, align 2, !tbaa !23
  %68 = load i8, ptr %32, align 4, !tbaa !24, !range !25, !noundef !26
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %70, label %72

70:                                               ; preds = %41
  %71 = call i32 @arm_2dp_rgb565_filter_iir_blur(ptr noundef nonnull %33, ptr noundef nonnull %4, ptr noundef nonnull %8, i8 noundef zeroext -17) #5
  br label %72

72:                                               ; preds = %70, %41
  %73 = load ptr, ptr %0, align 8, !tbaa !27
  %.not75 = icmp eq ptr %73, null
  br i1 %.not75, label %.critedge79, label %74

74:                                               ; preds = %72
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %34, ptr noundef nonnull %4, ptr noundef nonnull %6, ptr noundef nonnull %8) #5
  br label %.critedge79

.critedge79:                                      ; preds = %72, %74
  %75 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %76 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef nonnull %33) #5
  %77 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %78 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %79 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  ret void
}

declare ptr @arm_2d_get_default_frame_buffer() local_unnamed_addr #4

declare i32 @arm_2d_target_tile_is_new_frame(ptr noundef) local_unnamed_addr #4

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

declare void @dynamic_nebula_show(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #4

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 12}
!6 = !{!"cloudy_glass_t", !7, i64 0}
!7 = !{!"", !8, i64 0, !10, i64 40, !16, i64 48, !18, i64 104, !21, i64 192}
!8 = !{!"cloudy_glass_cfg_t", !9, i64 0, !12, i64 8, !13, i64 12, !14, i64 16, !9, i64 24, !13, i64 32, !13, i64 34, !15, i64 36}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"arm_2d_size_t", !13, i64 0, !13, i64 2}
!13 = !{!"short", !10, i64 0}
!14 = !{!"float", !10, i64 0}
!15 = !{!"_Bool", !10, i64 0}
!16 = !{!"arm_2d_helper_dirty_region_item_t", !10, i64 0, !17, i64 48}
!17 = !{!"arm_2d_region_t", !10, i64 0, !10, i64 4}
!18 = !{!"arm_2d_filter_iir_blur_descriptor_t", !10, i64 0, !19, i64 72}
!19 = !{!"arm_2d_scratch_mem_t", !10, i64 0, !20, i64 8}
!20 = !{!"long", !10, i64 0}
!21 = !{!"dynamic_nebula_t", !10, i64 0, !9, i64 56}
!22 = !{!13, !13, i64 0}
!23 = !{!10, !10, i64 0}
!24 = !{!6, !15, i64 36}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!6, !9, i64 0}


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