; LLVM IR from ARM-software/Arm-2D :: Helper/Source/arm_2d_helper_font.ll_ (arm_2d_lcd_text_default_a2_font_draw_char)

; 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.anon.13 = type { %struct.arm_2d_region_t, %struct.arm_2d_region_t, %struct.arm_2d_location_t, %struct.anon.14, ptr, i32, i32, i8, i8, %struct.anon.15, %struct.anon.16, %struct.anon.17, %struct.arm_2d_scratch_mem_t, %struct.arm_2d_region_t, ptr }
%struct.arm_2d_location_t = type { i16, i16 }
%struct.anon.14 = type { i16, i16 }
%struct.anon.15 = type { i8, i8 }
%struct.anon.16 = type { %struct.arm_2d_size_t, %struct.arm_2d_size_t, %struct.arm_2d_region_t }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.anon.17 = type { %union.anon.18, i16, i16, [65 x i8] }
%union.anon.18 = type { i16 }
%struct.arm_2d_scratch_mem_t = type { %union.anon.19, i64 }
%union.anon.19 = type { %union.anon.20 }
%union.anon.20 = type { %struct.anon.21 }
%struct.anon.21 = type { i32 }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%union.anon.11 = type { %struct.arm_2d_size_t }
%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 }
%union.anon.12 = type { ptr }
%struct.__arm_2d_tile_param_t = type { ptr, i32, i16, %union.arm_2d_color_info_t, i8, %struct.arm_2d_region_t, %struct.arm_2d_region_t, ptr }
%union.arm_2d_color_rgb565_t = type { i16 }
%struct.arm_2d_font_t = type { %struct.arm_2d_tile_t, %struct.arm_2d_size_t, i32, ptr, ptr }

@s_tLCDTextControl = external hidden global %struct.anon.13, 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: 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

; Function Attrs: nounwind uwtable
declare dso_local i32 @__arm_2d_lcd_text_default_a8_font_draw_char(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, i32 noundef) #3

declare ptr @__arm_2d_tile_region_caculator(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef, i1 noundef zeroext) #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @__arm_2d_lcd_text_default_a2_font_draw_char(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i16 noundef zeroext %4, i8 noundef zeroext %5, i32 noundef %6) #3 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i16, align 2
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca %struct.arm_2d_tile_t, align 8
  %17 = alloca %struct.__arm_2d_tile_param_t, align 8
  %18 = alloca i8, align 1
  %19 = alloca %struct.arm_2d_region_t, align 2
  %20 = alloca %struct.arm_2d_tile_t, align 8
  %21 = alloca %union.arm_2d_color_rgb565_t, align 2
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i16 %4, ptr %13, align 2, !tbaa !9
  store i8 %5, ptr %14, align 1, !tbaa !11
  store i32 %6, ptr %15, align 4, !tbaa !12
  %22 = load ptr, ptr %11, align 8, !tbaa !5
  %23 = load i32, ptr %15, align 4, !tbaa !12
  %24 = load i32, ptr %15, align 4, !tbaa !12
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %93

26:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %27 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %16, i32 0, i32 0
  %28 = load i8, ptr %27, align 8
  %29 = and i8 %28, -2
  %30 = or i8 %29, 1
  store i8 %30, ptr %27, align 8
  %31 = load i8, ptr %27, align 8
  %32 = and i8 %31, -3
  %33 = or i8 %32, 2
  store i8 %33, ptr %27, align 8
  %34 = load i8, ptr %27, align 8
  %35 = and i8 %34, -5
  %36 = or i8 %35, 0
  store i8 %36, ptr %27, align 8
  %37 = load i8, ptr %27, align 8
  %38 = and i8 %37, -9
  %39 = or i8 %38, 0
  store i8 %39, ptr %27, align 8
  %40 = load i8, ptr %27, align 8
  %41 = and i8 %40, -17
  %42 = or i8 %41, 0
  store i8 %42, ptr %27, align 8
  %43 = load i8, ptr %27, align 8
  %44 = and i8 %43, 31
  %45 = or i8 %44, 0
  store i8 %45, ptr %27, align 8
  %46 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 1
  store i8 6, ptr %46, align 1, !tbaa !11
  %47 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 2 %47, i8 0, i64 2, i1 false)
  %48 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %16, i32 0, i32 1
  %49 = getelementptr inbounds %struct.arm_2d_region_t, ptr %48, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 4 %49, i8 0, i64 4, i1 false)
  %50 = getelementptr inbounds %struct.arm_2d_region_t, ptr %48, i32 0, i32 1
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.arm_2d_font_t, ptr %51, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 8 %52, i64 4, i1 false), !tbaa.struct !14
  %53 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %16, i32 0, i32 2
  %54 = load i64, ptr getelementptr inbounds (%struct.arm_2d_scratch_mem_t, ptr getelementptr inbounds (%struct.anon.13, ptr @s_tLCDTextControl, i32 0, i32 12), i32 0, i32 1), align 8, !tbaa !15
  store i64 %54, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %16, i32 0, i32 2
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = inttoptr i64 %56 to ptr
  %58 = load i32, ptr getelementptr inbounds (%struct.anon.13, ptr @s_tLCDTextControl, i32 0, i32 12), align 8
  %59 = and i32 %58, 16777215
  %60 = zext i32 %59 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %57, i8 0, i64 %60, i1 false)
  br label %61

61:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = call ptr @__arm_2d_tile_region_caculator(ptr noundef %62, ptr noundef %17, ptr noundef %18, i1 noundef zeroext true, i32 noundef 0, i1 noundef zeroext false)
  %64 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %16, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.arm_2d_font_t, ptr %66, i32 0, i32 1
  %68 = getelementptr inbounds %struct.arm_2d_size_t, ptr %67, i32 0, i32 0
  %69 = load i16, ptr %68, align 8, !tbaa !26
  %70 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %17, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !29
  %72 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %17, i32 0, i32 2
  %73 = load i16, ptr %72, align 4, !tbaa !31
  %74 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %17, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !32
  %76 = getelementptr inbounds %struct.__arm_2d_tile_param_t, ptr %17, i32 0, i32 5
  %77 = getelementptr inbounds %struct.arm_2d_region_t, ptr %76, i32 0, i32 1
  call void @__arm_2d_impl_gray8_colour_filling_a2_mask(ptr noundef %65, i16 noundef signext %69, ptr noundef %71, i16 noundef signext %73, i32 noundef %75, ptr noundef %77, i8 noundef zeroext -1)
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #5
  br label %78

78:                                               ; preds = %61
  br label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %80 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 2 %80, i8 0, i64 4, i1 false)
  %81 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 1
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %82, i32 0, i32 1
  %84 = getelementptr inbounds %struct.arm_2d_region_t, ptr %83, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %81, ptr align 4 %84, i64 4, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %85 = call ptr @arm_2d_tile_generate_child(ptr noundef %16, ptr noundef %19, ptr noundef %20, i1 noundef zeroext false)
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load i16, ptr %13, align 2, !tbaa !9
  %90 = load i8, ptr %14, align 1, !tbaa !11
  %91 = load i32, ptr %15, align 4, !tbaa !12
  %92 = call i32 @__arm_2d_lcd_text_default_a8_font_draw_char(ptr noundef %86, ptr noundef %87, ptr noundef %88, ptr noundef %20, i16 noundef zeroext %89, i8 noundef zeroext %90, i32 noundef %91)
  store i32 %92, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %102

93:                                               ; preds = %7
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = load i16, ptr %13, align 2, !tbaa !9
  store i16 %97, ptr %21, align 2, !tbaa !11
  %98 = load i8, ptr %14, align 1, !tbaa !11
  %99 = getelementptr inbounds %union.arm_2d_color_rgb565_t, ptr %21, i32 0, i32 0
  %100 = load i16, ptr %99, align 2
  %101 = call i32 @arm_2dp_rgb565_fill_colour_with_a2_mask_and_opacity(ptr noundef null, ptr noundef %94, ptr noundef %95, ptr noundef %96, i16 %100, i8 noundef zeroext %98)
  store i32 %101, ptr %8, align 4
  br label %102

102:                                              ; preds = %93, %79
  %103 = load i32, ptr %8, align 4
  ret i32 %103
}

declare void @__arm_2d_impl_gray8_colour_filling_a2_mask(ptr noundef, i16 noundef signext, ptr noundef, i16 noundef signext, i32 noundef, ptr noundef, i8 noundef zeroext) #4

declare i32 @arm_2dp_rgb565_fill_colour_with_a2_mask_and_opacity(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16, i8 noundef zeroext) #4

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 = { 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 }

!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 = !{!"short", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 2, !9, i64 2, i64 2, !9}
!15 = !{!16, !25, i64 144}
!16 = !{!"", !17, i64 0, !17, i64 8, !18, i64 16, !19, i64 20, !6, i64 24, !13, i64 32, !13, i64 36, !7, i64 40, !7, i64 41, !20, i64 42, !21, i64 44, !23, i64 60, !24, i64 136, !17, i64 152, !6, i64 160}
!17 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!18 = !{!"arm_2d_location_t", !10, i64 0, !10, i64 2}
!19 = !{!"", !10, i64 0, !10, i64 2}
!20 = !{!"", !7, i64 0, !7, i64 1}
!21 = !{!"", !22, i64 0, !22, i64 4, !17, i64 8}
!22 = !{!"arm_2d_size_t", !10, i64 0, !10, i64 2}
!23 = !{!"", !7, i64 0, !10, i64 2, !10, i64 4, !7, i64 6}
!24 = !{!"arm_2d_scratch_mem_t", !7, i64 0, !25, i64 8}
!25 = !{!"long", !7, i64 0}
!26 = !{!27, !10, i64 24}
!27 = !{!"arm_2d_font_t", !28, i64 0, !22, i64 24, !13, i64 28, !6, i64 32, !6, i64 40}
!28 = !{!"arm_2d_tile_t", !7, i64 0, !7, i64 4, !7, i64 16}
!29 = !{!30, !6, i64 0}
!30 = !{!"__arm_2d_tile_param_t", !6, i64 0, !13, i64 8, !10, i64 12, !7, i64 14, !7, i64 15, !7, i64 15, !7, i64 15, !17, i64 16, !17, i64 24, !6, i64 32}
!31 = !{!30, !10, i64 12}
!32 = !{!30, !13, i64 8}


; 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.anon.13 = type { %struct.arm_2d_region_t, %struct.arm_2d_region_t, %struct.arm_2d_location_t, %struct.anon.14, ptr, i32, i32, i8, i8, %struct.anon.15, %struct.anon.16, %struct.anon.17, %struct.arm_2d_scratch_mem_t, %struct.arm_2d_region_t, ptr }
%struct.arm_2d_location_t = type { i16, i16 }
%struct.anon.14 = type { i16, i16 }
%struct.anon.15 = type { i8, i8 }
%struct.anon.16 = type { %struct.arm_2d_size_t, %struct.arm_2d_size_t, %struct.arm_2d_region_t }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.anon.17 = type { %union.anon.18, i16, i16, [65 x i8] }
%union.anon.18 = type { i16 }
%struct.arm_2d_scratch_mem_t = type { %union.anon.19, i64 }
%union.anon.19 = type { %union.anon.20 }
%union.anon.20 = type { %struct.anon.21 }
%struct.anon.21 = type { i32 }
%struct.arm_2d_region_t = type { %union.anon.10, %union.anon.11 }
%union.anon.10 = type { %struct.arm_2d_location_t }
%union.anon.11 = type { %struct.arm_2d_size_t }
%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 }
%union.anon.12 = type { ptr }
%struct.__arm_2d_tile_param_t = type { ptr, i32, i16, %union.arm_2d_color_info_t, i8, %struct.arm_2d_region_t, %struct.arm_2d_region_t, ptr }

@s_tLCDTextControl = external hidden local_unnamed_addr global %struct.anon.13, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @__arm_2d_lcd_text_default_a8_font_draw_char(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i8 noundef zeroext, i32 noundef) local_unnamed_addr #2

declare ptr @__arm_2d_tile_region_caculator(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @__arm_2d_lcd_text_default_a2_font_draw_char(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i16 noundef zeroext %4, i8 noundef zeroext %5, i32 noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.arm_2d_tile_t, align 8
  %9 = alloca %struct.__arm_2d_tile_param_t, align 8
  %10 = alloca i8, align 1
  %11 = alloca %struct.arm_2d_region_t, align 4
  %12 = alloca %struct.arm_2d_tile_t, align 8
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %39, label %13

13:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  store i8 3, ptr %8, align 8
  %14 = getelementptr inbounds i8, ptr %8, i64 1
  store i8 6, ptr %14, align 1, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %8, i64 2
  store i16 0, ptr %15, align 2
  %16 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 0, ptr %16, align 4
  %17 = getelementptr inbounds i8, ptr %8, i64 8
  %18 = getelementptr inbounds i8, ptr %2, i64 24
  %19 = load i32, ptr %18, align 8
  store i32 %19, ptr %17, align 8
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  %21 = load i64, ptr getelementptr inbounds (i8, ptr @s_tLCDTextControl, i64 144), align 8, !tbaa !8
  store i64 %21, ptr %20, align 8, !tbaa !5
  %22 = inttoptr i64 %21 to ptr
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @s_tLCDTextControl, i64 136), align 8
  %24 = and i32 %23, 16777215
  %25 = zext nneg i32 %24 to i64
  tail call void @llvm.memset.p0.i64(ptr align 1 %22, i8 0, i64 %25, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  %26 = call ptr @__arm_2d_tile_region_caculator(ptr noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, i1 noundef zeroext true, i32 noundef 0, i1 noundef zeroext false) #4
  %27 = load i16, ptr %18, align 8, !tbaa !22
  %28 = load ptr, ptr %9, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %9, i64 12
  %30 = load i16, ptr %29, align 4, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %9, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !28
  %33 = getelementptr inbounds i8, ptr %9, i64 20
  call void @__arm_2d_impl_gray8_colour_filling_a2_mask(ptr noundef %22, i16 noundef signext %27, ptr noundef %28, i16 noundef signext %30, i32 noundef %32, ptr noundef nonnull %33, i8 noundef zeroext -1) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  store i32 0, ptr %11, align 4
  %34 = getelementptr inbounds i8, ptr %11, i64 4
  %35 = getelementptr inbounds i8, ptr %3, i64 8
  %36 = load i32, ptr %35, align 4
  store i32 %36, ptr %34, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  %37 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %12, i1 noundef zeroext false) #4
  %38 = call i32 @__arm_2d_lcd_text_default_a8_font_draw_char(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %12, i16 noundef zeroext %4, i8 noundef zeroext %5, i32 noundef %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %41

39:                                               ; preds = %7
  %40 = tail call i32 @arm_2dp_rgb565_fill_colour_with_a2_mask_and_opacity(ptr noundef null, ptr noundef %0, ptr noundef %1, ptr noundef %3, i16 %4, i8 noundef zeroext %5) #4
  br label %41

41:                                               ; preds = %39, %13
  %.0 = phi i32 [ %38, %13 ], [ %40, %39 ]
  ret i32 %.0
}

declare void @__arm_2d_impl_gray8_colour_filling_a2_mask(ptr noundef, i16 noundef signext, ptr noundef, i16 noundef signext, i32 noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

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

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

!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, !21, i64 144}
!9 = !{!"", !10, i64 0, !10, i64 8, !11, i64 16, !13, i64 20, !14, i64 24, !15, i64 32, !15, i64 36, !6, i64 40, !6, i64 41, !16, i64 42, !17, i64 44, !19, i64 60, !20, i64 136, !10, i64 152, !14, i64 160}
!10 = !{!"arm_2d_region_t", !6, i64 0, !6, i64 4}
!11 = !{!"arm_2d_location_t", !12, i64 0, !12, i64 2}
!12 = !{!"short", !6, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 2}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!"int", !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 1}
!17 = !{!"", !18, i64 0, !18, i64 4, !10, i64 8}
!18 = !{!"arm_2d_size_t", !12, i64 0, !12, i64 2}
!19 = !{!"", !6, i64 0, !12, i64 2, !12, i64 4, !6, i64 6}
!20 = !{!"arm_2d_scratch_mem_t", !6, i64 0, !21, i64 8}
!21 = !{!"long", !6, i64 0}
!22 = !{!23, !12, i64 24}
!23 = !{!"arm_2d_font_t", !24, i64 0, !18, i64 24, !15, i64 28, !14, i64 32, !14, i64 40}
!24 = !{!"arm_2d_tile_t", !6, i64 0, !6, i64 4, !6, i64 16}
!25 = !{!26, !14, i64 0}
!26 = !{!"__arm_2d_tile_param_t", !14, i64 0, !15, i64 8, !12, i64 12, !6, i64 14, !6, i64 15, !6, i64 15, !6, i64 15, !10, i64 16, !10, i64 24, !14, i64 32}
!27 = !{!26, !12, i64 12}
!28 = !{!26, !15, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass