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

; 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_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 }

@c_tileWhiteDotRGB565 = external constant %struct.arm_2d_tile_t, align 8
@s_tDotsLocation = external hidden global [8 x %struct.arm_2d_location_t], section ".bss.noinit", align 16
@s_tAlphaTable = external hidden global [8 x i8], section ".bss.noinit", align 1
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.busy_wheel2_show = external hidden unnamed_addr constant [52 x i8], align 1
@busy_wheel2_show.s_chOffset = external hidden global i8, align 1
@s_lLastTime2 = external hidden global i64, align 8
@c_tileWhiteDotMask = external constant %struct.arm_2d_tile_t, align 8

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

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

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

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

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

declare i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef) #3

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @busy_wheel2_show(ptr noundef %0, i1 noundef zeroext %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %struct.arm_2d_location_t, align 2
  %6 = alloca %struct.arm_2d_region_t, align 2
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca %union.arm_2d_color_rgb565_t, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = zext i1 %1 to i8
  store i8 %11, ptr %4, align 1, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = icmp ne ptr null, %12
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  br label %16

15:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 137, ptr noundef @__PRETTY_FUNCTION__.busy_wheel2_show) #5
  unreachable

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %17 = getelementptr inbounds %struct.arm_2d_location_t, ptr %5, i32 0, i32 0
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %18, i32 0, i32 1
  %20 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 1
  %21 = getelementptr inbounds %struct.arm_2d_size_t, ptr %20, i32 0, i32 0
  %22 = load i16, ptr %21, align 4, !tbaa !11
  %23 = sext i16 %22 to i32
  %24 = sdiv i32 %23, 2
  %25 = sub nsw i32 %24, 10
  %26 = trunc i32 %25 to i16
  store i16 %26, ptr %17, align 2, !tbaa !12
  %27 = getelementptr inbounds %struct.arm_2d_location_t, ptr %5, i32 0, i32 1
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds %struct.arm_2d_region_t, ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %struct.arm_2d_size_t, ptr %30, i32 0, i32 1
  %32 = load i16, ptr %31, align 2, !tbaa !11
  %33 = sext i16 %32 to i32
  %34 = sdiv i32 %33, 2
  %35 = sub nsw i32 %34, 10
  %36 = trunc i32 %35 to i16
  store i16 %36, ptr %27, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %6, ptr align 4 getelementptr inbounds (%struct.arm_2d_tile_t, ptr @c_tileWhiteDotRGB565, i32 0, i32 1), i64 8, i1 false), !tbaa.struct !16
  %37 = load i8, ptr %4, align 1, !tbaa !9, !range !17, !noundef !18
  %38 = trunc i8 %37 to i1
  br i1 %38, label %39, label %53

39:                                               ; preds = %16
  %40 = call i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef 60)
  %41 = call zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef %40, ptr noundef @s_lLastTime2)
  %42 = zext i1 %41 to i8
  store i8 %42, ptr %7, align 1, !tbaa !9
  %43 = load i8, ptr %7, align 1, !tbaa !9, !range !17, !noundef !18
  %44 = trunc i8 %43 to i1
  br i1 %44, label %45, label %52

45:                                               ; preds = %39
  %46 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !11
  %47 = add i8 %46, 1
  store i8 %47, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !11
  %48 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !11
  %49 = zext i8 %48 to i32
  %50 = and i32 %49, 7
  %51 = trunc i32 %50 to i8
  store i8 %51, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !11
  br label %52

52:                                               ; preds = %45, %39
  br label %53

53:                                               ; preds = %52, %16
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !11
  br label %54

54:                                               ; preds = %105, %53
  %55 = load i8, ptr %8, align 1, !tbaa !11
  %56 = zext i8 %55 to i32
  %57 = icmp slt i32 %56, 8
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %108

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  %60 = load i8, ptr %8, align 1, !tbaa !11
  store i8 %60, ptr %9, align 1, !tbaa !11
  %61 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !11
  %62 = zext i8 %61 to i32
  %63 = load i8, ptr %9, align 1, !tbaa !11
  %64 = zext i8 %63 to i32
  %65 = add nsw i32 %64, %62
  %66 = trunc i32 %65 to i8
  store i8 %66, ptr %9, align 1, !tbaa !11
  %67 = load i8, ptr %9, align 1, !tbaa !11
  %68 = zext i8 %67 to i32
  %69 = and i32 %68, 7
  %70 = trunc i32 %69 to i8
  store i8 %70, ptr %9, align 1, !tbaa !11
  %71 = getelementptr inbounds %struct.arm_2d_region_t, ptr %6, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %71, ptr align 2 %5, i64 4, i1 false), !tbaa.struct !19
  %72 = load i8, ptr %9, align 1, !tbaa !11
  %73 = zext i8 %72 to i64
  %74 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.arm_2d_location_t, ptr %74, i32 0, i32 0
  %76 = load i16, ptr %75, align 4, !tbaa !12
  %77 = sext i16 %76 to i32
  %78 = getelementptr inbounds %struct.arm_2d_region_t, ptr %6, i32 0, i32 0
  %79 = getelementptr inbounds %struct.arm_2d_location_t, ptr %78, i32 0, i32 0
  %80 = load i16, ptr %79, align 2, !tbaa !11
  %81 = sext i16 %80 to i32
  %82 = add nsw i32 %81, %77
  %83 = trunc i32 %82 to i16
  store i16 %83, ptr %79, align 2, !tbaa !11
  %84 = load i8, ptr %9, align 1, !tbaa !11
  %85 = zext i8 %84 to i64
  %86 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.arm_2d_location_t, ptr %86, i32 0, i32 1
  %88 = load i16, ptr %87, align 2, !tbaa !15
  %89 = sext i16 %88 to i32
  %90 = getelementptr inbounds %struct.arm_2d_region_t, ptr %6, i32 0, i32 0
  %91 = getelementptr inbounds %struct.arm_2d_location_t, ptr %90, i32 0, i32 1
  %92 = load i16, ptr %91, align 2, !tbaa !11
  %93 = sext i16 %92 to i32
  %94 = add nsw i32 %93, %89
  %95 = trunc i32 %94 to i16
  store i16 %95, ptr %91, align 2, !tbaa !11
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  store i16 -1, ptr %10, align 2, !tbaa !11
  %97 = load i8, ptr %8, align 1, !tbaa !11
  %98 = zext i8 %97 to i64
  %99 = getelementptr inbounds [8 x i8], ptr @s_tAlphaTable, i64 0, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %10, i32 0, i32 0
  %102 = load i16, ptr %101, align 2
  %103 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef %96, ptr noundef %6, ptr noundef @c_tileWhiteDotMask, i16 %102, i8 noundef zeroext %100)
  %104 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %105

105:                                              ; preds = %59
  %106 = load i8, ptr %8, align 1, !tbaa !11
  %107 = add i8 %106, 1
  store i8 %107, ptr %8, align 1, !tbaa !11
  br label %54, !llvm.loop !21

108:                                              ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

declare i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"arm_2d_location_t", !14, i64 0, !14, i64 2}
!14 = !{!"short", !7, i64 0}
!15 = !{!13, !14, i64 2}
!16 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{i64 0, i64 2, !20, i64 2, i64 2, !20}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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

@c_tileWhiteDotRGB565 = external local_unnamed_addr constant %struct.arm_2d_tile_t, align 8
@s_tDotsLocation = external hidden local_unnamed_addr global [8 x %struct.arm_2d_location_t], section ".bss.noinit", align 16
@s_tAlphaTable = external hidden local_unnamed_addr global [8 x i8], section ".bss.noinit", align 1
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.busy_wheel2_show = external hidden unnamed_addr constant [52 x i8], align 1
@busy_wheel2_show.s_chOffset = external hidden local_unnamed_addr global i8, align 1
@s_lLastTime2 = external hidden global i64, align 8
@c_tileWhiteDotMask = external constant %struct.arm_2d_tile_t, align 8

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

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

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

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

declare i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @busy_wheel2_show(ptr noundef %0, i1 noundef zeroext %1) local_unnamed_addr #3 {
  %3 = alloca %struct.arm_2d_region_t, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 137, ptr noundef nonnull @__PRETTY_FUNCTION__.busy_wheel2_show) #4
  unreachable

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load <2 x i16>, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %8 = load i64, ptr getelementptr inbounds (i8, ptr @c_tileWhiteDotRGB565, i64 4), align 4
  store i64 %8, ptr %3, align 8
  br i1 %1, label %9, label %._crit_edge

._crit_edge:                                      ; preds = %5
  %.pre = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  br label %15

9:                                                ; preds = %5
  %10 = tail call i64 @arm_2d_helper_convert_ms_to_ticks(i32 noundef 60) #5
  %11 = tail call zeroext i1 @__arm_2d_helper_is_time_out(i64 noundef %10, ptr noundef nonnull @s_lLastTime2) #5
  %.pre19 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  br i1 %11, label %12, label %15

12:                                               ; preds = %9
  %13 = add i8 %.pre19, 1
  %14 = and i8 %13, 7
  store i8 %14, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  br label %15

15:                                               ; preds = %._crit_edge, %9, %12
  %16 = phi i8 [ %.pre, %._crit_edge ], [ %.pre19, %9 ], [ %14, %12 ]
  %17 = sdiv <2 x i16> %7, <i16 2, i16 2>
  %18 = and i8 %16, 7
  %19 = zext nneg i8 %18 to i64
  %20 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %19
  %21 = load i8, ptr @s_tAlphaTable, align 1, !tbaa !5
  %22 = add nsw <2 x i16> %17, <i16 -10, i16 -10>
  %23 = load <2 x i16>, ptr %20, align 4, !tbaa !8
  %24 = add <2 x i16> %23, %22
  store <2 x i16> %24, ptr %3, align 8, !tbaa !5
  %25 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %21) #5
  %26 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %27 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %28 = add i8 %27, 1
  %29 = and i8 %28, 7
  %30 = zext nneg i8 %29 to i64
  %31 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %30
  %32 = load <2 x i16>, ptr %31, align 4, !tbaa !8
  %33 = add <2 x i16> %32, %22
  store <2 x i16> %33, ptr %3, align 8, !tbaa !5
  %34 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 1), align 1, !tbaa !5
  %35 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %34) #5
  %36 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %37 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %38 = add i8 %37, 2
  %39 = and i8 %38, 7
  %40 = zext nneg i8 %39 to i64
  %41 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %40
  %42 = load <2 x i16>, ptr %41, align 4, !tbaa !8
  %43 = add <2 x i16> %42, %22
  store <2 x i16> %43, ptr %3, align 8, !tbaa !5
  %44 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 2), align 1, !tbaa !5
  %45 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %44) #5
  %46 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %47 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %48 = add i8 %47, 3
  %49 = and i8 %48, 7
  %50 = zext nneg i8 %49 to i64
  %51 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %50
  %52 = load <2 x i16>, ptr %51, align 4, !tbaa !8
  %53 = add <2 x i16> %52, %22
  store <2 x i16> %53, ptr %3, align 8, !tbaa !5
  %54 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 3), align 1, !tbaa !5
  %55 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %54) #5
  %56 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %57 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %58 = and i8 %57, 7
  %59 = xor i8 %58, 4
  %60 = zext nneg i8 %59 to i64
  %61 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %60
  %62 = load <2 x i16>, ptr %61, align 4, !tbaa !8
  %63 = add <2 x i16> %62, %22
  store <2 x i16> %63, ptr %3, align 8, !tbaa !5
  %64 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 4), align 1, !tbaa !5
  %65 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %64) #5
  %66 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %67 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %68 = add i8 %67, 5
  %69 = and i8 %68, 7
  %70 = zext nneg i8 %69 to i64
  %71 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %70
  %72 = load <2 x i16>, ptr %71, align 4, !tbaa !8
  %73 = add <2 x i16> %72, %22
  store <2 x i16> %73, ptr %3, align 8, !tbaa !5
  %74 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 5), align 1, !tbaa !5
  %75 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %74) #5
  %76 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %77 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %78 = add i8 %77, 6
  %79 = and i8 %78, 7
  %80 = zext nneg i8 %79 to i64
  %81 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %80
  %82 = load <2 x i16>, ptr %81, align 4, !tbaa !8
  %83 = add <2 x i16> %82, %22
  store <2 x i16> %83, ptr %3, align 8, !tbaa !5
  %84 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 6), align 1, !tbaa !5
  %85 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %84) #5
  %86 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  %87 = load i8, ptr @busy_wheel2_show.s_chOffset, align 1, !tbaa !5
  %88 = add i8 %87, 7
  %89 = and i8 %88, 7
  %90 = zext nneg i8 %89 to i64
  %91 = getelementptr inbounds [8 x %struct.arm_2d_location_t], ptr @s_tDotsLocation, i64 0, i64 %90
  %92 = load <2 x i16>, ptr %91, align 4, !tbaa !8
  %93 = add <2 x i16> %92, %22
  store <2 x i16> %93, ptr %3, align 8, !tbaa !5
  %94 = load i8, ptr getelementptr inbounds (i8, ptr @s_tAlphaTable, i64 7), align 1, !tbaa !5
  %95 = call i32 @arm_2dp_rgb565_fill_colour_with_mask_and_opacity(ptr noundef null, ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull @c_tileWhiteDotMask, i16 -1, i8 noundef zeroext %94) #5
  %96 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { noreturn nounwind }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"short", !6, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass