; LLVM IR from ARM-software/Arm-2D :: examples/common/controls//simple_list.ll_ (simple_list_init)

; 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_a1_font_t = type { %union.anon.32, i32 }
%union.anon.32 = type { %struct.arm_2d_font_t }
%struct.arm_2d_font_t = type { %struct.arm_2d_tile_t, %struct.arm_2d_size_t, i32, ptr, ptr }
%struct.arm_2d_tile_t = type { %union.anon.1, %union.anon.11, %union.anon.12 }
%union.anon.1 = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.4 }
%union.arm_2d_color_info_t = type { %struct.anon.2 }
%struct.anon.2 = type { i8 }
%union.anon.4 = type { i16 }
%union.anon.11 = 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 }
%union.anon.12 = type { ptr }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.__arm_2d_list_core_cfg_t = type { %struct.arm_2d_size_t, ptr, %union.anon.15, ptr, ptr, ptr, i32, ptr, i16, i16, i16, i16, ptr }
%union.anon.15 = type { ptr }
%struct.__simple_list_cfg_t = type { i16, i8, i8, i8, %union.anon.24, %union.anon.25, %union.COLOUR_TYPE_T, %struct.arm_2d_size_t, %struct.arm_2d_size_t, i8, i8, i16, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr }
%union.anon.24 = type { %union.COLOUR_TYPE_T }
%union.anon.25 = type { %union.COLOUR_TYPE_T }
%union.COLOUR_TYPE_T = type { i32 }
%struct.__simple_list_t = type { %union.anon.13, %struct.anon.23, %struct.anon.26 }
%union.anon.13 = type { %struct.__arm_2d_list_core_t }
%struct.__arm_2d_list_core_t = type { %struct.anon.14, %struct.anon.16, %struct.anon.20 }
%struct.anon.14 = type { %struct.__arm_2d_list_core_cfg_t }
%struct.anon.16 = type { %struct.anon.17, [112 x i8] }
%struct.anon.17 = type { %struct.arm_2d_tile_t, %struct.arm_2d_tile_t, %struct.__arm_2d_list_work_area_t, i8, %union.anon.18 }
%struct.__arm_2d_list_work_area_t = type { ptr, %struct.arm_2d_region_t, %struct.arm_2d_list_item_param_t, i32 }
%struct.arm_2d_list_item_param_t = type { i8, i8, i16 }
%union.anon.18 = type { %struct.anon.19 }
%struct.anon.19 = type { i16 }
%struct.anon.20 = type { i8, i8, i16, i32, %union.anon.21 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { i16, i16, i16, i16 }
%struct.anon.23 = type { %struct.__simple_list_cfg_t }
%struct.anon.26 = type { %struct.arm_2d_list_item_t, i16, i8, i8, %struct.arm_2d_region_t, i64, [2 x %struct.arm_2d_helper_dirty_region_item_t] }
%struct.arm_2d_list_item_t = type { %struct.anon.27, i16, %union.anon.28, ptr, ptr, %struct.anon.30, %struct.arm_2d_margin_t, %struct.arm_2d_size_t, i64 }
%struct.anon.27 = type { ptr }
%union.anon.28 = type { i16 }
%struct.anon.30 = type { i8, i8 }
%struct.arm_2d_margin_t = type { i8, i8, i8, i8 }
%struct.arm_2d_helper_dirty_region_item_t = type { [48 x i8], %struct.arm_2d_region_t }
%struct.arm_2d_i_list_region_calculator_t = type { ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.__simple_list_init = external hidden unnamed_addr constant [111 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@ARM_2D_FONT_6x8 = external constant %struct.arm_2d_a1_font_t, align 8

; Function Attrs: nounwind uwtable
declare dso_local i32 @__arm_2d_simple_list_draw_background(ptr noundef, ptr noundef, i1 noundef zeroext) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @__simple_list_init(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca %struct.arm_2d_size_t, align 2
  %9 = alloca i16, align 2
  %10 = alloca %struct.__arm_2d_list_core_cfg_t, align 8
  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
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp ne ptr null, %11
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %15

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 585, ptr noundef @__PRETTY_FUNCTION__.__simple_list_init) #6
  unreachable

15:                                               ; preds = %13
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = icmp ne ptr null, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  br label %20

19:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 586, ptr noundef @__PRETTY_FUNCTION__.__simple_list_init) #6
  unreachable

20:                                               ; preds = %18
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %21, i32 0, i32 0
  %23 = load i16, ptr %22, align 8, !tbaa !9
  %24 = zext i16 %23 to i32
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %20
  br label %28

27:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 587, ptr noundef @__PRETTY_FUNCTION__.__simple_list_init) #6
  unreachable

28:                                               ; preds = %26
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.__simple_list_t, ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %struct.anon.23, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %32, i64 96, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %33, i32 0, i32 9
  %35 = load i8, ptr %34, align 4, !tbaa !18
  %36 = sext i8 %35 to i32
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %37, i32 0, i32 10
  %39 = load i8, ptr %38, align 1, !tbaa !19
  %40 = sext i8 %39 to i32
  %41 = add nsw i32 %36, %40
  %42 = trunc i32 %41 to i16
  store i16 %42, ptr %7, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %43, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %8, ptr align 4 %44, i64 4, i1 false), !tbaa.struct !20
  %45 = getelementptr inbounds %struct.arm_2d_size_t, ptr %8, i32 0, i32 1
  %46 = load i16, ptr %45, align 2, !tbaa !21
  %47 = sext i16 %46 to i32
  %48 = icmp eq i32 0, %47
  br i1 %48, label %49, label %90

49:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #7
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %50, i32 0, i32 16
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = getelementptr inbounds %struct.arm_2d_font_t, ptr %52, i32 0, i32 1
  %54 = getelementptr inbounds %struct.arm_2d_size_t, ptr %53, i32 0, i32 1
  %55 = load i16, ptr %54, align 2, !tbaa !23
  store i16 %55, ptr %9, align 2, !tbaa !15
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %56, i32 0, i32 16
  %58 = load ptr, ptr %57, align 8, !tbaa !22
  %59 = icmp ne ptr null, %58
  br i1 %59, label %60, label %79

60:                                               ; preds = %49
  %61 = load i16, ptr %9, align 2, !tbaa !15
  %62 = sext i16 %61 to i32
  %63 = load i16, ptr %9, align 2, !tbaa !15
  %64 = sext i16 %63 to i32
  %65 = ashr i32 %64, 2
  %66 = add nsw i32 %62, %65
  %67 = load i16, ptr %7, align 2, !tbaa !15
  %68 = sext i16 %67 to i32
  %69 = add nsw i32 %68, %66
  %70 = trunc i32 %69 to i16
  store i16 %70, ptr %7, align 2, !tbaa !15
  %71 = load i16, ptr %9, align 2, !tbaa !15
  %72 = sext i16 %71 to i32
  %73 = load i16, ptr %9, align 2, !tbaa !15
  %74 = sext i16 %73 to i32
  %75 = ashr i32 %74, 2
  %76 = add nsw i32 %72, %75
  %77 = trunc i32 %76 to i16
  %78 = getelementptr inbounds %struct.arm_2d_size_t, ptr %8, i32 0, i32 1
  store i16 %77, ptr %78, align 2, !tbaa !21
  br label %85

79:                                               ; preds = %49
  %80 = load i16, ptr %7, align 2, !tbaa !15
  %81 = sext i16 %80 to i32
  %82 = add nsw i32 %81, 10
  %83 = trunc i32 %82 to i16
  store i16 %83, ptr %7, align 2, !tbaa !15
  %84 = getelementptr inbounds %struct.arm_2d_size_t, ptr %8, i32 0, i32 1
  store i16 10, ptr %84, align 2, !tbaa !21
  br label %85

85:                                               ; preds = %79, %60
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.__simple_list_t, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds %struct.anon.23, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %88, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 2 %8, i64 4, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #7
  br label %98

90:                                               ; preds = %28
  %91 = getelementptr inbounds %struct.arm_2d_size_t, ptr %8, i32 0, i32 1
  %92 = load i16, ptr %91, align 2, !tbaa !21
  %93 = sext i16 %92 to i32
  %94 = load i16, ptr %7, align 2, !tbaa !15
  %95 = sext i16 %94 to i32
  %96 = add nsw i32 %95, %93
  %97 = trunc i32 %96 to i16
  store i16 %97, ptr %7, align 2, !tbaa !15
  br label %98

98:                                               ; preds = %90, %85
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.__simple_list_t, ptr %99, i32 0, i32 1
  %101 = getelementptr inbounds %struct.anon.23, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %101, i32 0, i32 0
  %103 = load i16, ptr %102, align 8, !tbaa !26
  %104 = icmp ne i16 %103, 0
  br i1 %104, label %110, label %105

105:                                              ; preds = %98
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.__simple_list_t, ptr %106, i32 0, i32 1
  %108 = getelementptr inbounds %struct.anon.23, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %108, i32 0, i32 0
  store i16 1, ptr %109, align 8, !tbaa !26
  br label %110

110:                                              ; preds = %105, %98
  br label %111

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #7
  %112 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 0
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %113, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %112, ptr align 8 %114, i64 4, i1 false), !tbaa.struct !20
  %115 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 1
  store ptr @__arm_2d_simple_list_iterator, ptr %115, align 8, !tbaa !36
  %116 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 2
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %117, ptr %116, align 8, !tbaa !16
  %118 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 3
  store ptr null, ptr %118, align 8, !tbaa !38
  %119 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 4
  store ptr @__arm_2d_simple_list_draw_background, ptr %119, align 8, !tbaa !39
  %120 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 5
  store ptr null, ptr %120, align 8, !tbaa !40
  %121 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 6
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.__simple_list_t, ptr %122, i32 0, i32 1
  %124 = getelementptr inbounds %struct.anon.23, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %124, i32 0, i32 0
  %126 = load i16, ptr %125, align 8, !tbaa !26
  %127 = zext i16 %126 to i32
  %128 = load i16, ptr %7, align 2, !tbaa !15
  %129 = sext i16 %128 to i32
  %130 = mul nsw i32 %127, %129
  store i32 %130, ptr %121, align 8, !tbaa !41
  %131 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 7
  store ptr null, ptr %131, align 8, !tbaa !42
  %132 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 8
  store i16 0, ptr %132, align 8, !tbaa !43
  %133 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 9
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.__simple_list_t, ptr %134, i32 0, i32 1
  %136 = getelementptr inbounds %struct.anon.23, ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %136, i32 0, i32 0
  %138 = load i16, ptr %137, align 8, !tbaa !26
  store i16 %138, ptr %133, align 2, !tbaa !44
  %139 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 10
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %140, i32 0, i32 11
  %142 = load i16, ptr %141, align 2, !tbaa !45
  store i16 %142, ptr %139, align 4, !tbaa !46
  %143 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 11
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %144, i32 0, i32 1
  %146 = load i8, ptr %145, align 2
  %147 = lshr i8 %146, 2
  %148 = and i8 %147, 1
  %149 = zext i8 %148 to i16
  %150 = load i16, ptr %143, align 2
  %151 = and i16 %149, 1
  %152 = and i16 %150, -2
  %153 = or i16 %152, %151
  store i16 %153, ptr %143, align 2
  %154 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 11
  %155 = load i16, ptr %154, align 2
  %156 = and i16 %155, -3
  %157 = or i16 %156, 0
  store i16 %157, ptr %154, align 2
  %158 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 11
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %159, i32 0, i32 1
  %161 = load i8, ptr %160, align 2
  %162 = lshr i8 %161, 3
  %163 = and i8 %162, 1
  %164 = zext i8 %163 to i16
  %165 = load i16, ptr %158, align 2
  %166 = and i16 %164, 1
  %167 = shl i16 %166, 2
  %168 = and i16 %165, -5
  %169 = or i16 %168, %167
  store i16 %169, ptr %158, align 2
  %170 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 12
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %171, i32 0, i32 18
  %173 = load ptr, ptr %172, align 8, !tbaa !47
  store ptr %173, ptr %170, align 8, !tbaa !48
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %174, i32 0, i32 14
  %176 = load ptr, ptr %175, align 8, !tbaa !49
  %177 = icmp ne ptr null, %176
  br i1 %177, label %178, label %183

178:                                              ; preds = %111
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %179, i32 0, i32 14
  %181 = load ptr, ptr %180, align 8, !tbaa !49
  %182 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 4
  store ptr %181, ptr %182, align 8, !tbaa !39
  br label %183

183:                                              ; preds = %178, %111
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %184, i32 0, i32 15
  %186 = load ptr, ptr %185, align 8, !tbaa !50
  %187 = icmp ne ptr null, %186
  br i1 %187, label %188, label %193

188:                                              ; preds = %183
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %189, i32 0, i32 15
  %191 = load ptr, ptr %190, align 8, !tbaa !50
  %192 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 5
  store ptr %191, ptr %192, align 8, !tbaa !40
  br label %213

193:                                              ; preds = %183
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.__simple_list_t, ptr %194, i32 0, i32 1
  %196 = getelementptr inbounds %struct.anon.23, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %196, i32 0, i32 1
  %198 = load i8, ptr %197, align 2
  %199 = lshr i8 %198, 5
  %200 = and i8 %199, 1
  %201 = icmp ne i8 %200, 0
  br i1 %201, label %202, label %212

202:                                              ; preds = %193
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.arm_2d_i_list_region_calculator_t, ptr %203, i32 0, i32 2
  %205 = load i32, ptr %204, align 8, !tbaa !51
  %206 = icmp eq i32 %205, 1
  br i1 %206, label %207, label %209

207:                                              ; preds = %202
  %208 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 5
  store ptr @__arm_2d_simple_list_draw_cover_horizontal, ptr %208, align 8, !tbaa !40
  br label %211

209:                                              ; preds = %202
  %210 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 5
  store ptr @__arm_2d_simple_list_draw_cover_vertical, ptr %210, align 8, !tbaa !40
  br label %211

211:                                              ; preds = %209, %207
  br label %212

212:                                              ; preds = %211, %193
  br label %213

213:                                              ; preds = %212, %188
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %214, i32 0, i32 13
  %216 = load ptr, ptr %215, align 8, !tbaa !53
  %217 = icmp ne ptr null, %216
  br i1 %217, label %218, label %223

218:                                              ; preds = %213
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %219, i32 0, i32 13
  %221 = load ptr, ptr %220, align 8, !tbaa !53
  %222 = getelementptr inbounds %struct.__arm_2d_list_core_cfg_t, ptr %10, i32 0, i32 3
  store ptr %221, ptr %222, align 8, !tbaa !38
  br label %223

223:                                              ; preds = %218, %213
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.__simple_list_t, ptr %224, i32 0, i32 0
  %226 = call i32 @__arm_2d_list_core_init(ptr noundef %225, ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #7
  br label %227

227:                                              ; preds = %223
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.__simple_list_t, ptr %229, i32 0, i32 1
  %231 = getelementptr inbounds %struct.anon.23, ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %231, i32 0, i32 16
  %233 = load ptr, ptr %232, align 8, !tbaa !54
  %234 = icmp eq ptr null, %233
  br i1 %234, label %235, label %240

235:                                              ; preds = %228
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.__simple_list_t, ptr %236, i32 0, i32 1
  %238 = getelementptr inbounds %struct.anon.23, ptr %237, i32 0, i32 0
  %239 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %238, i32 0, i32 16
  store ptr @ARM_2D_FONT_6x8, ptr %239, align 8, !tbaa !54
  br label %240

240:                                              ; preds = %235, %228
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.__simple_list_t, ptr %241, i32 0, i32 1
  %243 = getelementptr inbounds %struct.anon.23, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %243, i32 0, i32 3
  %245 = load i8, ptr %244, align 4, !tbaa !55
  %246 = zext i8 %245 to i32
  %247 = icmp eq i32 0, %246
  br i1 %247, label %248, label %253

248:                                              ; preds = %240
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.__simple_list_t, ptr %249, i32 0, i32 1
  %251 = getelementptr inbounds %struct.anon.23, ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %251, i32 0, i32 3
  store i8 -1, ptr %252, align 4, !tbaa !55
  br label %253

253:                                              ; preds = %248, %240
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.__simple_list_t, ptr %254, i32 0, i32 2
  %256 = getelementptr inbounds %struct.anon.26, ptr %255, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 8 %256, i8 0, i64 56, i1 false)
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.__simple_list_t, ptr %257, i32 0, i32 2
  %259 = getelementptr inbounds %struct.anon.26, ptr %258, i32 0, i32 0
  %260 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %259, i32 0, i32 2
  %261 = load i16, ptr %260, align 2
  %262 = and i16 %261, -2
  %263 = or i16 %262, 1
  store i16 %263, ptr %260, align 2
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.__simple_list_t, ptr %264, i32 0, i32 2
  %266 = getelementptr inbounds %struct.anon.26, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %266, i32 0, i32 2
  %268 = load i16, ptr %267, align 2
  %269 = and i16 %268, -3
  %270 = or i16 %269, 2
  store i16 %270, ptr %267, align 2
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.__simple_list_t, ptr %271, i32 0, i32 2
  %273 = getelementptr inbounds %struct.anon.26, ptr %272, i32 0, i32 0
  %274 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %273, i32 0, i32 2
  %275 = load i16, ptr %274, align 2
  %276 = and i16 %275, -241
  %277 = or i16 %276, 0
  store i16 %277, ptr %274, align 2
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %278, i32 0, i32 9
  %280 = load i8, ptr %279, align 4, !tbaa !18
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.__simple_list_t, ptr %281, i32 0, i32 2
  %283 = getelementptr inbounds %struct.anon.26, ptr %282, i32 0, i32 0
  %284 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %283, i32 0, i32 5
  %285 = getelementptr inbounds %struct.anon.30, ptr %284, i32 0, i32 0
  store i8 %280, ptr %285, align 8, !tbaa !56
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %286, i32 0, i32 10
  %288 = load i8, ptr %287, align 1, !tbaa !19
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.__simple_list_t, ptr %289, i32 0, i32 2
  %291 = getelementptr inbounds %struct.anon.26, ptr %290, i32 0, i32 0
  %292 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %291, i32 0, i32 5
  %293 = getelementptr inbounds %struct.anon.30, ptr %292, i32 0, i32 1
  store i8 %288, ptr %293, align 1, !tbaa !57
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.__simple_list_t, ptr %294, i32 0, i32 2
  %296 = getelementptr inbounds %struct.anon.26, ptr %295, i32 0, i32 0
  %297 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %296, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %297, ptr align 2 %8, i64 4, i1 false), !tbaa.struct !20
  %298 = load ptr, ptr %5, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %298, i32 0, i32 12
  %300 = load ptr, ptr %299, align 8, !tbaa !58
  %301 = icmp ne ptr null, %300
  br i1 %301, label %302, label %310

302:                                              ; preds = %253
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %303, i32 0, i32 12
  %305 = load ptr, ptr %304, align 8, !tbaa !58
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.__simple_list_t, ptr %306, i32 0, i32 2
  %308 = getelementptr inbounds %struct.anon.26, ptr %307, i32 0, i32 0
  %309 = getelementptr inbounds %struct.arm_2d_list_item_t, ptr %308, i32 0, i32 4
  store ptr %305, ptr %309, align 8, !tbaa !59
  br label %310

310:                                              ; preds = %302, %253
  %311 = load ptr, ptr %4, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.__simple_list_t, ptr %311, i32 0, i32 1
  %313 = getelementptr inbounds %struct.anon.23, ptr %312, i32 0, i32 0
  %314 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %313, i32 0, i32 1
  %315 = load i8, ptr %314, align 2
  %316 = lshr i8 %315, 1
  %317 = and i8 %316, 1
  %318 = zext i8 %317 to i32
  %319 = icmp ne i32 %318, 0
  br i1 %319, label %320, label %327

320:                                              ; preds = %310
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.__simple_list_t, ptr %321, i32 0, i32 1
  %323 = getelementptr inbounds %struct.anon.23, ptr %322, i32 0, i32 0
  %324 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %323, i32 0, i32 19
  %325 = load ptr, ptr %324, align 8, !tbaa !60
  %326 = icmp ne ptr null, %325
  br i1 %326, label %335, label %327

327:                                              ; preds = %320, %310
  %328 = load ptr, ptr %4, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.__simple_list_t, ptr %328, i32 0, i32 1
  %330 = getelementptr inbounds %struct.anon.23, ptr %329, i32 0, i32 0
  %331 = getelementptr inbounds %struct.__simple_list_cfg_t, ptr %330, i32 0, i32 1
  %332 = load i8, ptr %331, align 2
  %333 = and i8 %332, -3
  %334 = or i8 %333, 0
  store i8 %334, ptr %331, align 2
  br label %335

335:                                              ; preds = %327, %320
  %336 = load ptr, ptr %4, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.__simple_list_t, ptr %336, i32 0, i32 2
  %338 = getelementptr inbounds %struct.anon.26, ptr %337, i32 0, i32 2
  %339 = load i8, ptr %338, align 2
  %340 = and i8 %339, -2
  %341 = or i8 %340, 1
  store i8 %341, ptr %338, align 2
  %342 = load ptr, ptr %4, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.__simple_list_t, ptr %342, i32 0, i32 2
  %344 = getelementptr inbounds %struct.anon.26, ptr %343, i32 0, i32 2
  %345 = load i8, ptr %344, align 2
  %346 = and i8 %345, -5
  %347 = or i8 %346, 4
  store i8 %347, ptr %344, align 2
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #7
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare hidden ptr @__arm_2d_simple_list_iterator(ptr noundef, i32 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__arm_2d_simple_list_draw_cover_horizontal(ptr noundef, ptr noundef, i1 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__arm_2d_simple_list_draw_cover_vertical(ptr noundef, ptr noundef, i1 noundef zeroext) #0

declare i32 @__arm_2d_list_core_init(ptr noundef, ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !11, i64 0}
!10 = !{!"__simple_list_cfg_t", !11, i64 0, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !12, i64 20, !12, i64 24, !7, i64 28, !7, i64 29, !11, i64 30, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !6, i64 80, !6, i64 88}
!11 = !{!"short", !7, i64 0}
!12 = !{!"arm_2d_size_t", !11, i64 0, !11, i64 2}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 2, !15, i64 2, i64 1, !16, i64 3, i64 1, !16, i64 4, i64 1, !16, i64 8, i64 4, !16, i64 12, i64 4, !16, i64 16, i64 4, !16, i64 20, i64 2, !15, i64 22, i64 2, !15, i64 24, i64 2, !15, i64 26, i64 2, !15, i64 28, i64 1, !16, i64 29, i64 1, !16, i64 30, i64 2, !15, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 8, !5, i64 72, i64 4, !17, i64 80, i64 8, !5, i64 88, i64 8, !5}
!15 = !{!11, !11, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!10, !7, i64 28}
!19 = !{!10, !7, i64 29}
!20 = !{i64 0, i64 2, !15, i64 2, i64 2, !15}
!21 = !{!12, !11, i64 2}
!22 = !{!10, !6, i64 64}
!23 = !{!24, !11, i64 26}
!24 = !{!"arm_2d_font_t", !25, i64 0, !12, i64 24, !13, i64 28, !6, i64 32, !6, i64 40}
!25 = !{!"arm_2d_tile_t", !7, i64 0, !7, i64 4, !7, i64 16}
!26 = !{!27, !11, i64 288}
!27 = !{!"__simple_list_t", !7, i64 0, !28, i64 288, !29, i64 384}
!28 = !{!"", !10, i64 0}
!29 = !{!"", !30, i64 0, !11, i64 56, !7, i64 58, !7, i64 58, !7, i64 58, !7, i64 58, !7, i64 58, !7, i64 59, !35, i64 60, !34, i64 72, !7, i64 80}
!30 = !{!"arm_2d_list_item_t", !31, i64 0, !11, i64 8, !7, i64 10, !6, i64 16, !6, i64 24, !32, i64 32, !33, i64 34, !12, i64 38, !34, i64 48}
!31 = !{!"", !6, i64 0}
!32 = !{!"", !7, i64 0, !7, i64 1}
!33 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!34 = !{!"long", !7, i64 0}
!35 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!36 = !{!37, !6, i64 8}
!37 = !{!"__arm_2d_list_core_cfg_t", !12, i64 0, !6, i64 8, !7, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !6, i64 56, !11, i64 64, !11, i64 66, !11, i64 68, !11, i64 70, !11, i64 70, !11, i64 70, !6, i64 72}
!38 = !{!37, !6, i64 24}
!39 = !{!37, !6, i64 32}
!40 = !{!37, !6, i64 40}
!41 = !{!37, !13, i64 48}
!42 = !{!37, !6, i64 56}
!43 = !{!37, !11, i64 64}
!44 = !{!37, !11, i64 66}
!45 = !{!10, !11, i64 30}
!46 = !{!37, !11, i64 68}
!47 = !{!10, !6, i64 80}
!48 = !{!37, !6, i64 72}
!49 = !{!10, !6, i64 48}
!50 = !{!10, !6, i64 56}
!51 = !{!52, !13, i64 16}
!52 = !{!"arm_2d_i_list_region_calculator_t", !6, i64 0, !6, i64 8, !13, i64 16}
!53 = !{!10, !6, i64 40}
!54 = !{!27, !6, i64 352}
!55 = !{!27, !7, i64 292}
!56 = !{!27, !7, i64 416}
!57 = !{!27, !7, i64 417}
!58 = !{!10, !6, i64 32}
!59 = !{!27, !6, i64 408}
!60 = !{!27, !6, i64 376}


; 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_a1_font_t = type { %union.anon.32, i32 }
%union.anon.32 = type { %struct.arm_2d_font_t }
%struct.arm_2d_font_t = type { %struct.arm_2d_tile_t, %struct.arm_2d_size_t, i32, ptr, ptr }
%struct.arm_2d_tile_t = type { %union.anon.1, %union.anon.11, %union.anon.12 }
%union.anon.1 = type { %struct.anon }
%struct.anon = type { i8, %union.arm_2d_color_info_t, %union.anon.4 }
%union.arm_2d_color_info_t = type { %struct.anon.2 }
%struct.anon.2 = type { i8 }
%union.anon.4 = type { i16 }
%union.anon.11 = 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 }
%union.anon.12 = type { ptr }
%struct.arm_2d_size_t = type { i16, i16 }
%struct.__arm_2d_list_core_cfg_t = type { %struct.arm_2d_size_t, ptr, %union.anon.15, ptr, ptr, ptr, i32, ptr, i16, i16, i16, i16, ptr }
%union.anon.15 = type { ptr }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.__simple_list_init = external hidden unnamed_addr constant [111 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@ARM_2D_FONT_6x8 = external constant %struct.arm_2d_a1_font_t, align 8

; Function Attrs: nounwind uwtable
declare dso_local i32 @__arm_2d_simple_list_draw_background(ptr noundef, ptr noundef, i1 noundef zeroext) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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

; Function Attrs: mustprogress 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) #3

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @__simple_list_init(ptr noundef nonnull %0, ptr nocapture noundef nonnull readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.__arm_2d_list_core_cfg_t, align 8
  %5 = load i16, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i16 %5, 0
  br i1 %.not, label %6, label %7

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 587, ptr noundef nonnull @__PRETTY_FUNCTION__.__simple_list_init) #6
  unreachable

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 288
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(96) %8, ptr noundef nonnull align 8 dereferenceable(96) %1, i64 96, i1 false), !tbaa.struct !13
  %9 = getelementptr inbounds i8, ptr %1, i64 28
  %10 = load i8, ptr %9, align 4, !tbaa !18
  %11 = sext i8 %10 to i16
  %12 = getelementptr inbounds i8, ptr %1, i64 29
  %13 = load i8, ptr %12, align 1, !tbaa !19
  %14 = sext i8 %13 to i16
  %15 = add nsw i16 %14, %11
  %16 = getelementptr inbounds i8, ptr %1, i64 20
  %.sroa.0.0.copyload = load i16, ptr %16, align 4, !tbaa !14
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 22
  %.sroa.5.0.copyload = load i16, ptr %.sroa.5.0..sroa_idx, align 2, !tbaa !14
  %17 = icmp eq i16 %.sroa.5.0.copyload, 0
  br i1 %17, label %18, label %28

18:                                               ; preds = %7
  %19 = getelementptr inbounds i8, ptr %1, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %.not70 = icmp eq ptr %20, null
  br i1 %.not70, label %26, label %21

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %20, i64 26
  %23 = load i16, ptr %22, align 2, !tbaa !21
  %24 = ashr i16 %23, 2
  %25 = add i16 %24, %23
  br label %26

26:                                               ; preds = %18, %21
  %.sroa.5.0 = phi i16 [ %25, %21 ], [ 10, %18 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 308
  store i16 %.sroa.0.0.copyload, ptr %27, align 4, !tbaa !14
  %.sroa.5.0..sroa_idx6 = getelementptr inbounds i8, ptr %0, i64 310
  store i16 %.sroa.5.0, ptr %.sroa.5.0..sroa_idx6, align 2, !tbaa !14
  br label %28

28:                                               ; preds = %7, %26
  %.sroa.5.1 = phi i16 [ %.sroa.5.0, %26 ], [ %.sroa.5.0.copyload, %7 ]
  %.1 = add i16 %15, %.sroa.5.1
  %29 = load i16, ptr %8, align 8, !tbaa !24
  %.not71 = icmp eq i16 %29, 0
  br i1 %.not71, label %30, label %31

30:                                               ; preds = %28
  store i16 1, ptr %8, align 8, !tbaa !24
  br label %31

31:                                               ; preds = %28, %30
  %32 = phi i16 [ %29, %28 ], [ 1, %30 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #7
  %33 = getelementptr inbounds i8, ptr %1, i64 24
  %34 = load i32, ptr %33, align 8
  store i32 %34, ptr %4, align 8
  %35 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr @__arm_2d_simple_list_iterator, ptr %35, align 8, !tbaa !34
  %36 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %2, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %4, i64 24
  store ptr null, ptr %37, align 8, !tbaa !36
  %38 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr @__arm_2d_simple_list_draw_background, ptr %38, align 8, !tbaa !37
  %39 = getelementptr inbounds i8, ptr %4, i64 40
  store ptr null, ptr %39, align 8, !tbaa !38
  %40 = getelementptr inbounds i8, ptr %4, i64 48
  %41 = zext i16 %32 to i32
  %42 = sext i16 %.1 to i32
  %43 = mul nsw i32 %41, %42
  store i32 %43, ptr %40, align 8, !tbaa !39
  %44 = getelementptr inbounds i8, ptr %4, i64 56
  store ptr null, ptr %44, align 8, !tbaa !40
  %45 = getelementptr inbounds i8, ptr %4, i64 64
  store i16 0, ptr %45, align 8, !tbaa !41
  %46 = getelementptr inbounds i8, ptr %4, i64 66
  store i16 %32, ptr %46, align 2, !tbaa !42
  %47 = getelementptr inbounds i8, ptr %4, i64 68
  %48 = getelementptr inbounds i8, ptr %1, i64 30
  %49 = load i16, ptr %48, align 2, !tbaa !43
  store i16 %49, ptr %47, align 4, !tbaa !44
  %50 = getelementptr inbounds i8, ptr %4, i64 70
  %51 = getelementptr inbounds i8, ptr %1, i64 2
  %52 = load i8, ptr %51, align 2
  %53 = lshr i8 %52, 2
  %54 = and i8 %53, 1
  %55 = lshr i8 %52, 1
  %56 = and i8 %55, 4
  %57 = or disjoint i8 %54, %56
  %58 = zext nneg i8 %57 to i16
  store i16 %58, ptr %50, align 2
  %59 = getelementptr inbounds i8, ptr %4, i64 72
  %60 = getelementptr inbounds i8, ptr %1, i64 80
  %61 = load ptr, ptr %60, align 8, !tbaa !45
  store ptr %61, ptr %59, align 8, !tbaa !46
  %62 = getelementptr inbounds i8, ptr %1, i64 48
  %63 = load ptr, ptr %62, align 8, !tbaa !47
  %.not72 = icmp eq ptr %63, null
  br i1 %.not72, label %65, label %64

64:                                               ; preds = %31
  store ptr %63, ptr %38, align 8, !tbaa !37
  br label %65

65:                                               ; preds = %64, %31
  %66 = getelementptr inbounds i8, ptr %1, i64 56
  %67 = load ptr, ptr %66, align 8, !tbaa !48
  %.not73 = icmp eq ptr %67, null
  br i1 %.not73, label %68, label %.sink.split

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %0, i64 290
  %70 = load i8, ptr %69, align 2
  %71 = and i8 %70, 32
  %.not74 = icmp eq i8 %71, 0
  br i1 %.not74, label %76, label %72

72:                                               ; preds = %68
  %73 = getelementptr inbounds i8, ptr %2, i64 16
  %74 = load i32, ptr %73, align 8, !tbaa !49
  %75 = icmp eq i32 %74, 1
  %__arm_2d_simple_list_draw_cover_horizontal.__arm_2d_simple_list_draw_cover_vertical = select i1 %75, ptr @__arm_2d_simple_list_draw_cover_horizontal, ptr @__arm_2d_simple_list_draw_cover_vertical
  br label %.sink.split

.sink.split:                                      ; preds = %72, %65
  %__arm_2d_simple_list_draw_cover_vertical.sink = phi ptr [ %67, %65 ], [ %__arm_2d_simple_list_draw_cover_horizontal.__arm_2d_simple_list_draw_cover_vertical, %72 ]
  store ptr %__arm_2d_simple_list_draw_cover_vertical.sink, ptr %39, align 8, !tbaa !38
  br label %76

76:                                               ; preds = %.sink.split, %68
  %77 = getelementptr inbounds i8, ptr %1, i64 40
  %78 = load ptr, ptr %77, align 8, !tbaa !51
  %.not75 = icmp eq ptr %78, null
  br i1 %.not75, label %80, label %79

79:                                               ; preds = %76
  store ptr %78, ptr %37, align 8, !tbaa !36
  br label %80

80:                                               ; preds = %79, %76
  %81 = call i32 @__arm_2d_list_core_init(ptr noundef nonnull %0, ptr noundef nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #7
  %82 = getelementptr inbounds i8, ptr %0, i64 352
  %83 = load ptr, ptr %82, align 8, !tbaa !52
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %86

85:                                               ; preds = %80
  store ptr @ARM_2D_FONT_6x8, ptr %82, align 8, !tbaa !52
  br label %86

86:                                               ; preds = %85, %80
  %87 = getelementptr inbounds i8, ptr %0, i64 292
  %88 = load i8, ptr %87, align 4, !tbaa !53
  %89 = icmp eq i8 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  store i8 -1, ptr %87, align 4, !tbaa !53
  br label %91

91:                                               ; preds = %90, %86
  %92 = getelementptr inbounds i8, ptr %0, i64 384
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %92, i8 0, i64 56, i1 false)
  %93 = getelementptr inbounds i8, ptr %0, i64 394
  store i16 3, ptr %93, align 2
  %94 = load i8, ptr %9, align 4, !tbaa !18
  %95 = getelementptr inbounds i8, ptr %0, i64 416
  store i8 %94, ptr %95, align 8, !tbaa !54
  %96 = load i8, ptr %12, align 1, !tbaa !19
  %97 = getelementptr inbounds i8, ptr %0, i64 417
  store i8 %96, ptr %97, align 1, !tbaa !55
  %98 = getelementptr inbounds i8, ptr %0, i64 422
  store i16 %.sroa.0.0.copyload, ptr %98, align 2, !tbaa !14
  %.sroa.5.0..sroa_idx8 = getelementptr inbounds i8, ptr %0, i64 424
  store i16 %.sroa.5.1, ptr %.sroa.5.0..sroa_idx8, align 2, !tbaa !14
  %99 = getelementptr inbounds i8, ptr %1, i64 32
  %100 = load ptr, ptr %99, align 8, !tbaa !56
  %.not76 = icmp eq ptr %100, null
  br i1 %.not76, label %103, label %101

101:                                              ; preds = %91
  %102 = getelementptr inbounds i8, ptr %0, i64 408
  store ptr %100, ptr %102, align 8, !tbaa !57
  br label %103

103:                                              ; preds = %101, %91
  %104 = getelementptr inbounds i8, ptr %0, i64 290
  %105 = load i8, ptr %104, align 2
  %106 = and i8 %105, 2
  %.not77 = icmp eq i8 %106, 0
  br i1 %.not77, label %110, label %107

107:                                              ; preds = %103
  %108 = getelementptr inbounds i8, ptr %0, i64 376
  %109 = load ptr, ptr %108, align 8, !tbaa !58
  %.not78 = icmp eq ptr %109, null
  br i1 %.not78, label %110, label %112

110:                                              ; preds = %107, %103
  %111 = and i8 %105, -3
  store i8 %111, ptr %104, align 2
  br label %112

112:                                              ; preds = %110, %107
  %113 = getelementptr inbounds i8, ptr %0, i64 442
  %114 = load i8, ptr %113, align 2
  %115 = or i8 %114, 5
  store i8 %115, ptr %113, align 2
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare hidden ptr @__arm_2d_simple_list_iterator(ptr noundef, i32 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__arm_2d_simple_list_draw_cover_horizontal(ptr noundef, ptr noundef, i1 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__arm_2d_simple_list_draw_cover_vertical(ptr noundef, ptr noundef, i1 noundef zeroext) #0

declare i32 @__arm_2d_list_core_init(ptr noundef, ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !7, i64 0}
!6 = !{!"__simple_list_cfg_t", !7, i64 0, !8, i64 2, !8, i64 2, !8, i64 2, !8, i64 2, !8, i64 2, !8, i64 2, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !10, i64 20, !10, i64 24, !8, i64 28, !8, i64 29, !7, i64 30, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !12, i64 72, !11, i64 80, !11, i64 88}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"arm_2d_size_t", !7, i64 0, !7, i64 2}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{i64 0, i64 2, !14, i64 2, i64 1, !15, i64 3, i64 1, !15, i64 4, i64 1, !15, i64 8, i64 4, !15, i64 12, i64 4, !15, i64 16, i64 4, !15, i64 20, i64 2, !14, i64 22, i64 2, !14, i64 24, i64 2, !14, i64 26, i64 2, !14, i64 28, i64 1, !15, i64 29, i64 1, !15, i64 30, i64 2, !14, i64 32, i64 8, !16, i64 40, i64 8, !16, i64 48, i64 8, !16, i64 56, i64 8, !16, i64 64, i64 8, !16, i64 72, i64 4, !17, i64 80, i64 8, !16, i64 88, i64 8, !16}
!14 = !{!7, !7, i64 0}
!15 = !{!8, !8, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!6, !8, i64 28}
!19 = !{!6, !8, i64 29}
!20 = !{!6, !11, i64 64}
!21 = !{!22, !7, i64 26}
!22 = !{!"arm_2d_font_t", !23, i64 0, !10, i64 24, !12, i64 28, !11, i64 32, !11, i64 40}
!23 = !{!"arm_2d_tile_t", !8, i64 0, !8, i64 4, !8, i64 16}
!24 = !{!25, !7, i64 288}
!25 = !{!"__simple_list_t", !8, i64 0, !26, i64 288, !27, i64 384}
!26 = !{!"", !6, i64 0}
!27 = !{!"", !28, i64 0, !7, i64 56, !8, i64 58, !8, i64 58, !8, i64 58, !8, i64 58, !8, i64 58, !8, i64 59, !33, i64 60, !32, i64 72, !8, i64 80}
!28 = !{!"arm_2d_list_item_t", !29, i64 0, !7, i64 8, !8, i64 10, !11, i64 16, !11, i64 24, !30, i64 32, !31, i64 34, !10, i64 38, !32, i64 48}
!29 = !{!"", !11, i64 0}
!30 = !{!"", !8, i64 0, !8, i64 1}
!31 = !{!"arm_2d_margin_t", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!32 = !{!"long", !8, i64 0}
!33 = !{!"arm_2d_region_t", !8, i64 0, !8, i64 4}
!34 = !{!35, !11, i64 8}
!35 = !{!"__arm_2d_list_core_cfg_t", !10, i64 0, !11, i64 8, !8, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !11, i64 56, !7, i64 64, !7, i64 66, !7, i64 68, !7, i64 70, !7, i64 70, !7, i64 70, !11, i64 72}
!36 = !{!35, !11, i64 24}
!37 = !{!35, !11, i64 32}
!38 = !{!35, !11, i64 40}
!39 = !{!35, !12, i64 48}
!40 = !{!35, !11, i64 56}
!41 = !{!35, !7, i64 64}
!42 = !{!35, !7, i64 66}
!43 = !{!6, !7, i64 30}
!44 = !{!35, !7, i64 68}
!45 = !{!6, !11, i64 80}
!46 = !{!35, !11, i64 72}
!47 = !{!6, !11, i64 48}
!48 = !{!6, !11, i64 56}
!49 = !{!50, !12, i64 16}
!50 = !{!"arm_2d_i_list_region_calculator_t", !11, i64 0, !11, i64 8, !12, i64 16}
!51 = !{!6, !11, i64 40}
!52 = !{!25, !11, i64 352}
!53 = !{!25, !8, i64 292}
!54 = !{!25, !8, i64 416}
!55 = !{!25, !8, i64 417}
!56 = !{!6, !11, i64 32}
!57 = !{!25, !11, i64 408}
!58 = !{!25, !11, i64 376}


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