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

; 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, %union.arm_2d_alpha_samples_4pts_t }
%struct.arm_2d_region_t = type { %union.anon.9, %union.anon.10 }
%union.anon.9 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.10 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.arm_2d_alpha_samples_4pts_t = type { %struct.anon.14 }
%struct.anon.14 = type { i8, i8, i8, i8 }
%struct.arm_2d_tile_t = type { %union.anon.4, %union.anon.11, %union.anon.13 }
%union.anon.4 = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon }
%union.arm_2d_color_info_t = type { %struct.anon.0 }
%struct.anon.0 = type { i8 }
%union.anon = type { i16 }
%union.anon.11 = type { %struct.arm_2d_region_t }
%union.anon.13 = type { ptr }

@s_bmpFadeMask = external hidden global [160 x i8], section ".bss.noinit", align 16
@s_ptRefreshLayers = external hidden global [5 x %struct.arm_2d_layer_t], align 16

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_generic_init() #0 {
  %1 = alloca float, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca %struct.arm_2d_region_t, align 2
  call void @arm_extra_controls_init()
  store i32 1, ptr getelementptr inbounds (%struct.arm_2d_layer_t, ptr getelementptr inbounds ([5 x %struct.arm_2d_layer_t], ptr @s_ptRefreshLayers, i64 0, i64 1), i32 0, i32 2), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (%struct.arm_2d_layer_t, ptr getelementptr inbounds ([5 x %struct.arm_2d_layer_t], ptr @s_ptRefreshLayers, i64 0, i64 3), i32 0, i32 2), align 16, !tbaa !5
  br label %8

8:                                                ; preds = %0
  call void @llvm.memset.p0.i64(ptr align 16 @s_bmpFadeMask, i8 0, i64 160, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store float 1.593750e+00, ptr %1, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !15
  br label %9

9:                                                ; preds = %23, %8
  %10 = load i32, ptr %2, align 4, !tbaa !15
  %11 = icmp slt i32 %10, 160
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %26

13:                                               ; preds = %9
  %14 = load i32, ptr %2, align 4, !tbaa !15
  %15 = sitofp i32 %14 to float
  %16 = load float, ptr %1, align 4, !tbaa !13
  %17 = fneg float %15
  %18 = call float @llvm.fmuladd.f32(float %17, float %16, float 2.550000e+02)
  %19 = fptoui float %18 to i8
  %20 = load i32, ptr %2, align 4, !tbaa !15
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [160 x i8], ptr @s_bmpFadeMask, i64 0, i64 %21
  store i8 %19, ptr %22, align 1, !tbaa !16
  br label %23

23:                                               ; preds = %13
  %24 = load i32, ptr %2, align 4, !tbaa !15
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !15
  br label %9, !llvm.loop !17

26:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr @s_ptRefreshLayers, ptr %3, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store ptr null, ptr %4, align 8, !tbaa !19
  br label %28

28:                                               ; preds = %78, %27
  %29 = load ptr, ptr %4, align 8, !tbaa !19
  %30 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %29, i32 1
  store ptr %30, ptr %4, align 8, !tbaa !19
  %31 = icmp eq ptr %29, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %79

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 5, ptr %6, align 8, !tbaa !20
  br label %34

34:                                               ; preds = %73, %33
  %35 = load i64, ptr %6, align 8, !tbaa !20
  %36 = icmp ugt i64 %35, 0
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %39 = load ptr, ptr %3, align 8, !tbaa !19
  %40 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %39, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %7, ptr align 8 %40, i64 8, i1 false), !tbaa.struct !22
  %41 = getelementptr inbounds %struct.arm_2d_region_t, ptr %7, i32 0, i32 1
  %42 = getelementptr inbounds %struct.arm_2d_size_t, ptr %41, i32 0, i32 1
  %43 = load i16, ptr %42, align 2, !tbaa !16
  %44 = icmp ne i16 %43, 0
  br i1 %44, label %55, label %45

45:                                               ; preds = %38
  %46 = load ptr, ptr %3, align 8, !tbaa !19
  %47 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds %struct.arm_2d_region_t, ptr %49, i32 0, i32 1
  %51 = getelementptr inbounds %struct.arm_2d_size_t, ptr %50, i32 0, i32 1
  %52 = load i16, ptr %51, align 2, !tbaa !16
  %53 = getelementptr inbounds %struct.arm_2d_region_t, ptr %7, i32 0, i32 1
  %54 = getelementptr inbounds %struct.arm_2d_size_t, ptr %53, i32 0, i32 1
  store i16 %52, ptr %54, align 2, !tbaa !16
  br label %55

55:                                               ; preds = %45, %38
  %56 = getelementptr inbounds %struct.arm_2d_region_t, ptr %7, i32 0, i32 1
  %57 = getelementptr inbounds %struct.arm_2d_size_t, ptr %56, i32 0, i32 0
  %58 = load i16, ptr %57, align 2, !tbaa !16
  %59 = icmp ne i16 %58, 0
  br i1 %59, label %70, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr %3, align 8, !tbaa !19
  %62 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.arm_2d_region_t, ptr %64, i32 0, i32 1
  %66 = getelementptr inbounds %struct.arm_2d_size_t, ptr %65, i32 0, i32 0
  %67 = load i16, ptr %66, align 4, !tbaa !16
  %68 = getelementptr inbounds %struct.arm_2d_region_t, ptr %7, i32 0, i32 1
  %69 = getelementptr inbounds %struct.arm_2d_size_t, ptr %68, i32 0, i32 0
  store i16 %67, ptr %69, align 2, !tbaa !16
  br label %70

70:                                               ; preds = %60, %55
  %71 = load ptr, ptr %3, align 8, !tbaa !19
  %72 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %71, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 2 %7, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %73

73:                                               ; preds = %70
  %74 = load ptr, ptr %3, align 8, !tbaa !19
  %75 = getelementptr inbounds %struct.arm_2d_layer_t, ptr %74, i32 1
  store ptr %75, ptr %3, align 8, !tbaa !19
  %76 = load i64, ptr %6, align 8, !tbaa !20
  %77 = add i64 %76, -1
  store i64 %77, ptr %6, align 8, !tbaa !20
  br label %34, !llvm.loop !24

78:                                               ; preds = %37
  br label %28, !llvm.loop !25

79:                                               ; preds = %32
  ret void
}

declare void @arm_extra_controls_init() #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, 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 speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !11, i64 16}
!6 = !{!"arm_2d_layer_t", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 20, !8, i64 21, !8, i64 21, !8, i64 21, !12, i64 22, !8, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"arm_2d_region_t", !8, i64 0, !8, i64 4}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !8, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !8, i64 0}
!22 = !{i64 0, i64 4, !16, i64 4, i64 4, !16}
!23 = !{!6, !7, i64 0}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}


; 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, %union.arm_2d_alpha_samples_4pts_t }
%struct.arm_2d_region_t = type { %union.anon.9, %union.anon.10 }
%union.anon.9 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.10 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.arm_2d_alpha_samples_4pts_t = type { %struct.anon.14 }
%struct.anon.14 = type { i8, i8, i8, i8 }

@s_bmpFadeMask = external hidden local_unnamed_addr global [160 x i8], section ".bss.noinit", align 16
@s_ptRefreshLayers = external hidden local_unnamed_addr global [5 x %struct.arm_2d_layer_t], align 16

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_generic_init() local_unnamed_addr #0 {
vector.ph:
  tail call void @arm_extra_controls_init() #3
  store i32 1, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 48), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 112), align 16, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(160) @s_bmpFadeMask, i8 0, i64 160, i1 false)
  store <16 x i8> <i8 -1, i8 -3, i8 -5, i8 -6, i8 -8, i8 -9, i8 -11, i8 -13, i8 -14, i8 -16, i8 -17, i8 -19, i8 -21, i8 -22, i8 -24, i8 -25>, ptr @s_bmpFadeMask, align 16, !tbaa !13
  store <16 x i8> <i8 -27, i8 -29, i8 -30, i8 -32, i8 -33, i8 -35, i8 -37, i8 -38, i8 -40, i8 -41, i8 -43, i8 -45, i8 -46, i8 -48, i8 -49, i8 -51>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 16), align 16, !tbaa !13
  store <16 x i8> <i8 -52, i8 -54, i8 -56, i8 -57, i8 -59, i8 -60, i8 -62, i8 -64, i8 -65, i8 -67, i8 -68, i8 -70, i8 -72, i8 -73, i8 -75, i8 -76>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 32), align 16, !tbaa !13
  store <16 x i8> <i8 -78, i8 -80, i8 -81, i8 -83, i8 -84, i8 -86, i8 -88, i8 -89, i8 -91, i8 -92, i8 -94, i8 -96, i8 -97, i8 -99, i8 -100, i8 -102>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 48), align 16, !tbaa !13
  store <16 x i8> <i8 -103, i8 -105, i8 -107, i8 -108, i8 -110, i8 -111, i8 -113, i8 -115, i8 -116, i8 -118, i8 -119, i8 -121, i8 -123, i8 -124, i8 -126, i8 -127>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 64), align 16, !tbaa !13
  store <16 x i8> <i8 127, i8 125, i8 124, i8 122, i8 121, i8 119, i8 117, i8 116, i8 114, i8 113, i8 111, i8 109, i8 108, i8 106, i8 105, i8 103>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 80), align 16, !tbaa !13
  store <16 x i8> <i8 102, i8 100, i8 98, i8 97, i8 95, i8 94, i8 92, i8 90, i8 89, i8 87, i8 86, i8 84, i8 82, i8 81, i8 79, i8 78>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 96), align 16, !tbaa !13
  store <16 x i8> <i8 76, i8 74, i8 73, i8 71, i8 70, i8 68, i8 66, i8 65, i8 63, i8 62, i8 60, i8 58, i8 57, i8 55, i8 54, i8 52>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 112), align 16, !tbaa !13
  store <16 x i8> <i8 51, i8 49, i8 47, i8 46, i8 44, i8 43, i8 41, i8 39, i8 38, i8 36, i8 35, i8 33, i8 31, i8 30, i8 28, i8 27>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 128), align 16, !tbaa !13
  store <16 x i8> <i8 25, i8 23, i8 22, i8 20, i8 19, i8 17, i8 15, i8 14, i8 12, i8 11, i8 9, i8 7, i8 6, i8 4, i8 3, i8 1>, ptr getelementptr inbounds (i8, ptr @s_bmpFadeMask, i64 144), align 16, !tbaa !13
  %.sroa.4.0.copyload = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 12), align 4
  %.sroa.6.0.copyload = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 14), align 2, !tbaa !13
  %.not19 = icmp eq i16 %.sroa.6.0.copyload, 0
  br i1 %.not19, label %0, label %4

0:                                                ; preds = %vector.ph
  %1 = load ptr, ptr @s_ptRefreshLayers, align 16, !tbaa !14
  %2 = getelementptr inbounds i8, ptr %1, i64 10
  %3 = load i16, ptr %2, align 2, !tbaa !13
  br label %4

4:                                                ; preds = %0, %vector.ph
  %.sroa.6.0 = phi i16 [ %.sroa.6.0.copyload, %vector.ph ], [ %3, %0 ]
  %.not20 = icmp eq i16 %.sroa.4.0.copyload, 0
  br i1 %.not20, label %5, label %9

5:                                                ; preds = %4
  %6 = load ptr, ptr @s_ptRefreshLayers, align 16, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = load i16, ptr %7, align 4, !tbaa !13
  br label %9

9:                                                ; preds = %5, %4
  %.sroa.4.0 = phi i16 [ %.sroa.4.0.copyload, %4 ], [ %8, %5 ]
  store i16 %.sroa.4.0, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 12), align 4
  store i16 %.sroa.6.0, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 14), align 2, !tbaa !13
  %.sroa.4.0.copyload.1 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 44), align 4
  %.sroa.6.0.copyload.1 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 46), align 2, !tbaa !13
  %.not19.1 = icmp eq i16 %.sroa.6.0.copyload.1, 0
  br i1 %.not19.1, label %10, label %14

10:                                               ; preds = %9
  %11 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 32), align 16, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %11, i64 10
  %13 = load i16, ptr %12, align 2, !tbaa !13
  br label %14

14:                                               ; preds = %10, %9
  %.sroa.6.0.1 = phi i16 [ %.sroa.6.0.copyload.1, %9 ], [ %13, %10 ]
  %.not20.1 = icmp eq i16 %.sroa.4.0.copyload.1, 0
  br i1 %.not20.1, label %15, label %19

15:                                               ; preds = %14
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 32), align 16, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i16, ptr %17, align 4, !tbaa !13
  br label %19

19:                                               ; preds = %15, %14
  %.sroa.4.0.1 = phi i16 [ %.sroa.4.0.copyload.1, %14 ], [ %18, %15 ]
  store i16 %.sroa.4.0.1, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 44), align 4
  store i16 %.sroa.6.0.1, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 46), align 2, !tbaa !13
  %.sroa.4.0.copyload.2 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 76), align 4
  %.sroa.6.0.copyload.2 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 78), align 2, !tbaa !13
  %.not19.2 = icmp eq i16 %.sroa.6.0.copyload.2, 0
  br i1 %.not19.2, label %20, label %24

20:                                               ; preds = %19
  %21 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 64), align 16, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %21, i64 10
  %23 = load i16, ptr %22, align 2, !tbaa !13
  br label %24

24:                                               ; preds = %20, %19
  %.sroa.6.0.2 = phi i16 [ %.sroa.6.0.copyload.2, %19 ], [ %23, %20 ]
  %.not20.2 = icmp eq i16 %.sroa.4.0.copyload.2, 0
  br i1 %.not20.2, label %25, label %29

25:                                               ; preds = %24
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 64), align 16, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load i16, ptr %27, align 4, !tbaa !13
  br label %29

29:                                               ; preds = %25, %24
  %.sroa.4.0.2 = phi i16 [ %.sroa.4.0.copyload.2, %24 ], [ %28, %25 ]
  store i16 %.sroa.4.0.2, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 76), align 4
  store i16 %.sroa.6.0.2, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 78), align 2, !tbaa !13
  %.sroa.4.0.copyload.3 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 108), align 4
  %.sroa.6.0.copyload.3 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 110), align 2, !tbaa !13
  %.not19.3 = icmp eq i16 %.sroa.6.0.copyload.3, 0
  br i1 %.not19.3, label %30, label %34

30:                                               ; preds = %29
  %31 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 96), align 16, !tbaa !14
  %32 = getelementptr inbounds i8, ptr %31, i64 10
  %33 = load i16, ptr %32, align 2, !tbaa !13
  br label %34

34:                                               ; preds = %30, %29
  %.sroa.6.0.3 = phi i16 [ %.sroa.6.0.copyload.3, %29 ], [ %33, %30 ]
  %.not20.3 = icmp eq i16 %.sroa.4.0.copyload.3, 0
  br i1 %.not20.3, label %35, label %39

35:                                               ; preds = %34
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 96), align 16, !tbaa !14
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load i16, ptr %37, align 4, !tbaa !13
  br label %39

39:                                               ; preds = %35, %34
  %.sroa.4.0.3 = phi i16 [ %.sroa.4.0.copyload.3, %34 ], [ %38, %35 ]
  store i16 %.sroa.4.0.3, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 108), align 4
  store i16 %.sroa.6.0.3, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 110), align 2, !tbaa !13
  %.sroa.4.0.copyload.4 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 140), align 4
  %.sroa.6.0.copyload.4 = load i16, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 142), align 2, !tbaa !13
  %.not19.4 = icmp eq i16 %.sroa.6.0.copyload.4, 0
  br i1 %.not19.4, label %40, label %44

40:                                               ; preds = %39
  %41 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 128), align 16, !tbaa !14
  %42 = getelementptr inbounds i8, ptr %41, i64 10
  %43 = load i16, ptr %42, align 2, !tbaa !13
  br label %44

44:                                               ; preds = %40, %39
  %.sroa.6.0.4 = phi i16 [ %.sroa.6.0.copyload.4, %39 ], [ %43, %40 ]
  %.not20.4 = icmp eq i16 %.sroa.4.0.copyload.4, 0
  br i1 %.not20.4, label %45, label %.loopexit

45:                                               ; preds = %44
  %46 = load ptr, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 128), align 16, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load i16, ptr %47, align 4, !tbaa !13
  br label %.loopexit

.loopexit:                                        ; preds = %45, %44
  %.sroa.4.0.4 = phi i16 [ %.sroa.4.0.copyload.4, %44 ], [ %48, %45 ]
  store i16 %.sroa.4.0.4, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 140), align 4
  store i16 %.sroa.6.0.4, ptr getelementptr inbounds (i8, ptr @s_ptRefreshLayers, i64 142), align 2, !tbaa !13
  ret void
}

declare void @arm_extra_controls_init() local_unnamed_addr #1

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

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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, !11, i64 16}
!6 = !{!"arm_2d_layer_t", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 20, !8, i64 21, !8, i64 21, !8, i64 21, !12, i64 22, !8, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"arm_2d_region_t", !8, i64 0, !8, i64 4}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!6, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass