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

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

%union.arm_2d_color_rgb565_t = type { i16 }
%struct.arm_2d_margin_t = type { i8, i8, i8, i8 }
%struct.arm_2d_tile_t = type { %union.anon.4, %union.anon.15, %union.anon.16 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { i8, %union.arm_2d_color_info_t, %union.anon.8 }
%union.arm_2d_color_info_t = type { %struct.anon.6 }
%struct.anon.6 = type { i8 }
%union.anon.8 = type { i16 }
%union.anon.15 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon, %union.anon.2 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.2 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.16 = type { ptr }
%struct.text_box_t = type { %struct.anon }
%struct.anon = type { %struct.text_box_cfg_t, %struct.anon.0, i32, i16, i16, %struct.__text_box_line_info_t, [1 x %struct.arm_2d_helper_dirty_region_item_t] }
%struct.text_box_cfg_t = type { ptr, float, %struct.text_box_io_text_stream_reader_t, ptr, i8, i8 }
%struct.text_box_io_text_stream_reader_t = type { ptr, i64 }
%struct.anon.0 = type { i32, i32 }
%struct.__text_box_line_info_t = type { %struct.anon.1 }
%struct.anon.1 = type { ptr, i32, i32, i16, i16, i16, i16, i16, i16, i32 }
%struct.arm_2d_helper_dirty_region_item_t = type { [48 x i8], %struct.arm_2d_region_t }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@__PRETTY_FUNCTION__.text_box_show = external hidden unnamed_addr constant [120 x i8], align 1

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

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

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

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

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

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

47:                                               ; preds = %6
  %48 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %48, ptr %9, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %47, %6
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = icmp ne ptr null, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %49
  br label %54

53:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 617, ptr noundef @__PRETTY_FUNCTION__.text_box_show) #7
  unreachable

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %498, %54
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %56, i32 1
  store ptr %57, ptr %14, align 8, !tbaa !5
  %58 = icmp eq ptr %56, null
  br i1 %58, label %59, label %64

59:                                               ; preds = %55
  %60 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 0
  store i8 0, ptr %60, align 1, !tbaa !12
  %61 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 1
  store i8 0, ptr %61, align 1, !tbaa !14
  %62 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 2
  store i8 0, ptr %62, align 1, !tbaa !15
  %63 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %15, i32 0, i32 3
  store i8 0, ptr %63, align 1, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %13, ptr align 1 %15, i64 4, i1 false), !tbaa.struct !17
  br label %65

64:                                               ; preds = %55
  br label %65

65:                                               ; preds = %64, %59
  %66 = phi i32 [ 1, %59 ], [ 0, %64 ]
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  store i32 2, ptr %16, align 4
  br label %499

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store ptr null, ptr %18, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %495, %69
  %71 = load ptr, ptr %18, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %71, i32 1
  store ptr %72, ptr %18, align 8, !tbaa !5
  %73 = icmp eq ptr %71, null
  br i1 %73, label %74, label %145

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.memset.p0.i64(ptr align 2 %19, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %75, ptr %20, align 8, !tbaa !5
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = icmp eq ptr null, %76
  br i1 %77, label %78, label %84

78:                                               ; preds = %74
  %79 = call ptr @arm_2d_get_default_frame_buffer()
  store ptr %79, ptr %20, align 8, !tbaa !5
  %80 = load ptr, ptr %20, align 8, !tbaa !5
  %81 = icmp eq ptr null, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  store i32 4, ptr %16, align 4
  br label %141

83:                                               ; preds = %78
  br label %84

84:                                               ; preds = %83, %74
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = icmp eq ptr null, %85
  br i1 %86, label %87, label %92

87:                                               ; preds = %84
  %88 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 1
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %89, i32 0, i32 1
  %91 = getelementptr inbounds %struct.arm_2d_region_t, ptr %90, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %88, ptr align 4 %91, i64 4, i1 false), !tbaa.struct !18
  br label %94

92:                                               ; preds = %84
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %19, ptr align 2 %93, i64 8, i1 false), !tbaa.struct !21
  br label %94

94:                                               ; preds = %92, %87
  %95 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 0
  %96 = load i8, ptr %95, align 1, !tbaa !12
  %97 = zext i8 %96 to i32
  %98 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 0
  %99 = getelementptr inbounds %struct.arm_2d_location_t, ptr %98, i32 0, i32 0
  %100 = load i16, ptr %99, align 2, !tbaa !9
  %101 = sext i16 %100 to i32
  %102 = add nsw i32 %101, %97
  %103 = trunc i32 %102 to i16
  store i16 %103, ptr %99, align 2, !tbaa !9
  %104 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 2
  %105 = load i8, ptr %104, align 1, !tbaa !15
  %106 = zext i8 %105 to i32
  %107 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 0
  %108 = getelementptr inbounds %struct.arm_2d_location_t, ptr %107, i32 0, i32 1
  %109 = load i16, ptr %108, align 2, !tbaa !9
  %110 = sext i16 %109 to i32
  %111 = add nsw i32 %110, %106
  %112 = trunc i32 %111 to i16
  store i16 %112, ptr %108, align 2, !tbaa !9
  %113 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 0
  %114 = load i8, ptr %113, align 1, !tbaa !12
  %115 = zext i8 %114 to i32
  %116 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 1
  %117 = load i8, ptr %116, align 1, !tbaa !14
  %118 = zext i8 %117 to i32
  %119 = add nsw i32 %115, %118
  %120 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 1
  %121 = getelementptr inbounds %struct.arm_2d_size_t, ptr %120, i32 0, i32 0
  %122 = load i16, ptr %121, align 2, !tbaa !9
  %123 = sext i16 %122 to i32
  %124 = sub nsw i32 %123, %119
  %125 = trunc i32 %124 to i16
  store i16 %125, ptr %121, align 2, !tbaa !9
  %126 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 2
  %127 = load i8, ptr %126, align 1, !tbaa !15
  %128 = zext i8 %127 to i32
  %129 = getelementptr inbounds %struct.arm_2d_margin_t, ptr %13, i32 0, i32 3
  %130 = load i8, ptr %129, align 1, !tbaa !16
  %131 = zext i8 %130 to i32
  %132 = add nsw i32 %128, %131
  %133 = getelementptr inbounds %struct.arm_2d_region_t, ptr %19, i32 0, i32 1
  %134 = getelementptr inbounds %struct.arm_2d_size_t, ptr %133, i32 0, i32 1
  %135 = load i16, ptr %134, align 2, !tbaa !9
  %136 = sext i16 %135 to i32
  %137 = sub nsw i32 %136, %132
  %138 = trunc i32 %137 to i16
  store i16 %138, ptr %134, align 2, !tbaa !9
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  %140 = call ptr @arm_2d_tile_generate_child(ptr noundef %139, ptr noundef %19, ptr noundef %17, i1 noundef zeroext false)
  store ptr %140, ptr %21, align 8, !tbaa !5
  store i32 0, ptr %16, align 4
  br label %141

141:                                              ; preds = %94, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %142 = load i32, ptr %16, align 4
  switch i32 %142, label %496 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  %144 = load ptr, ptr %21, align 8, !tbaa !5
  br label %146

145:                                              ; preds = %70
  br label %146

146:                                              ; preds = %145, %143
  %147 = phi i32 [ 1, %143 ], [ 0, %145 ]
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %150, label %149

149:                                              ; preds = %146
  store i32 4, ptr %16, align 4
  br label %496

150:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.memset.p0.i64(ptr align 2 %22, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store ptr null, ptr %23, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %487, %150
  %152 = load ptr, ptr %23, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.arm_2d_region_t, ptr %152, i32 1
  store ptr %153, ptr %23, align 8, !tbaa !5
  %154 = icmp eq ptr %152, null
  br i1 %154, label %155, label %159

155:                                              ; preds = %151
  %156 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %157 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %17, i32 0, i32 1
  %158 = getelementptr inbounds %struct.arm_2d_region_t, ptr %157, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %156, ptr align 4 %158, i64 4, i1 false), !tbaa.struct !18
  br label %160

159:                                              ; preds = %151
  br label %160

160:                                              ; preds = %159, %155
  %161 = phi i32 [ 1, %155 ], [ 0, %159 ]
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  store i32 7, ptr %16, align 4
  br label %492

164:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store ptr %17, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store ptr null, ptr %25, align 8, !tbaa !5
  br label %165

165:                                              ; preds = %482, %164
  %166 = load ptr, ptr %25, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %166, i32 1
  store ptr %167, ptr %25, align 8, !tbaa !5
  %168 = icmp eq ptr %166, null
  br i1 %168, label %170, label %169

169:                                              ; preds = %165
  store i32 10, ptr %16, align 4
  br label %484

170:                                              ; preds = %165
  call void @arm_lcd_text_set_target_framebuffer(ptr noundef %17)
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.text_box_t, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.anon, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds %struct.text_box_cfg_t, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !22
  %176 = call i32 @arm_lcd_text_set_font(ptr noundef %175)
  %177 = load i16, ptr %7, align 2, !tbaa !9
  call void @arm_lcd_text_set_colour(i16 noundef zeroext %177, i16 noundef zeroext 0)
  %178 = load i8, ptr %11, align 1, !tbaa !9
  call void @arm_lcd_text_set_opacity(i8 noundef zeroext %178)
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.text_box_t, ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds %struct.anon, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds %struct.text_box_cfg_t, ptr %181, i32 0, i32 1
  %183 = load float, ptr %182, align 8, !tbaa !33
  call void @arm_lcd_text_set_scale(float noundef %183)
  %184 = load i8, ptr %12, align 1, !tbaa !10, !range !34, !noundef !35
  %185 = trunc i8 %184 to i1
  br i1 %185, label %186, label %257

186:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #8
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.text_box_t, ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds %struct.anon, ptr %188, i32 0, i32 3
  %190 = load i16, ptr %189, align 4
  %191 = and i16 %190, 1
  %192 = icmp ne i16 %191, 0
  %193 = zext i1 %192 to i8
  store i8 %193, ptr %26, align 1, !tbaa !10
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.text_box_t, ptr %194, i32 0, i32 0
  %196 = getelementptr inbounds %struct.anon, ptr %195, i32 0, i32 2
  %197 = load i32, ptr %196, align 8, !tbaa !36
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.text_box_t, ptr %198, i32 0, i32 0
  %200 = getelementptr inbounds %struct.anon, ptr %199, i32 0, i32 1
  %201 = getelementptr inbounds %struct.anon.0, ptr %200, i32 0, i32 0
  %202 = load i32, ptr %201, align 8, !tbaa !37
  %203 = icmp ne i32 %197, %202
  br i1 %203, label %204, label %205

204:                                              ; preds = %186
  store i8 1, ptr %26, align 1, !tbaa !10
  br label %205

205:                                              ; preds = %204, %186
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.text_box_t, ptr %206, i32 0, i32 0
  %208 = getelementptr inbounds %struct.anon, ptr %207, i32 0, i32 4
  %209 = load i16, ptr %208, align 2, !tbaa !38
  %210 = sext i16 %209 to i32
  %211 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %212 = getelementptr inbounds %struct.arm_2d_size_t, ptr %211, i32 0, i32 0
  %213 = load i16, ptr %212, align 2, !tbaa !9
  %214 = sext i16 %213 to i32
  %215 = icmp ne i32 %210, %214
  br i1 %215, label %216, label %231

216:                                              ; preds = %205
  %217 = getelementptr inbounds %struct.arm_2d_region_t, ptr %22, i32 0, i32 1
  %218 = getelementptr inbounds %struct.arm_2d_size_t, ptr %217, i32 0, i32 0
  %219 = load i16, ptr %218, align 2, !tbaa !9
  %220 = sext i16 %219 to i32
  %221 = call i32 @arm_lcd_text_get_actual_char_size()
  store i32 %221, ptr %27, align 2
  %222 = getelementptr inbounds %struct.arm_2d_size_t, ptr %27, i32 0, i32 0
  %223 = load i16, ptr %222, align 2, !tbaa !39
  %224 = sext i16 %223 to i32
  %225 = ashr i32 %224, 2
  %226 = sub nsw i32 %220, %225
  %227 = trunc i32 %226 to i16
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.text_box_t, ptr %228, i32 0, i32 0
  %230 = getelementptr inbounds %struct.anon, ptr %229, i32 0, i32 4
  store i16 %227, ptr %230, align 2, !tbaa !38
  store i8 1, ptr %26, align 1, !tbaa !10
  br label %231

231:                                              ; preds = %216, %205
  %232 = load i8, ptr %26, align 1, !tbaa !10, !range !34, !noundef !35
  %233 = trunc i8 %232 to i1
  br i1 %233, label %234, label %256

234:                                              ; preds = %231
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.text_box_t, ptr %235, i32 0, i32 0
  %237 = getelementptr inbounds %struct.anon, ptr %236, i32 0, i32 3
  %238 = load i16, ptr %237, align 4
  %239 = and i16 %238, -2
  %240 = or i16 %239, 0
  store i16 %240, ptr %237, align 4
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  call void @__text_box_update(ptr noundef %241)
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.text_box_t, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds %struct.anon, ptr %243, i32 0, i32 0
  %245 = getelementptr inbounds %struct.text_box_cfg_t, ptr %244, i32 0, i32 4
  %246 = load i8, ptr %245, align 8
  %247 = lshr i8 %246, 6
  %248 = and i8 %247, 1
  %249 = icmp ne i8 %248, 0
  br i1 %249, label %250, label %255

250:                                              ; preds = %234
  %251 = load ptr, ptr %8, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.text_box_t, ptr %251, i32 0, i32 0
  %253 = getelementptr inbounds %struct.anon, ptr %252, i32 0, i32 6
  %254 = getelementptr inbounds [1 x %struct.arm_2d_helper_dirty_region_item_t], ptr %253, i64 0, i64 0
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef %254, ptr noundef %17, ptr noundef null, ptr noundef %22)
  br label %255

255:                                              ; preds = %250, %234
  br label %256

256:                                              ; preds = %255, %231
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #8
  br label %257

257:                                              ; preds = %256, %170
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = load ptr, ptr %8, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.text_box_t, ptr %259, i32 0, i32 0
  %261 = getelementptr inbounds %struct.anon, ptr %260, i32 0, i32 1
  %262 = getelementptr inbounds %struct.anon.0, ptr %261, i32 0, i32 1
  %263 = load i32, ptr %262, align 4, !tbaa !41
  %264 = call i32 @__text_box_set_current_position(ptr noundef %258, i32 noundef %263)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %265 = load ptr, ptr %8, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.text_box_t, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds %struct.anon, ptr %266, i32 0, i32 1
  %268 = getelementptr inbounds %struct.anon.0, ptr %267, i32 0, i32 0
  %269 = load i32, ptr %268, align 8, !tbaa !37
  store i32 %269, ptr %28, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 2, ptr %29) #8
  %270 = call i32 @arm_lcd_text_get_actual_char_box()
  store i32 %270, ptr %30, align 2
  %271 = getelementptr inbounds %struct.arm_2d_size_t, ptr %30, i32 0, i32 1
  %272 = load i16, ptr %271, align 2, !tbaa !43
  store i16 %272, ptr %29, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %31) #8
  %273 = call i32 @arm_lcd_text_get_actual_char_size()
  store i32 %273, ptr %32, align 2
  %274 = getelementptr inbounds %struct.arm_2d_size_t, ptr %32, i32 0, i32 1
  %275 = load i16, ptr %274, align 2, !tbaa !43
  store i16 %275, ptr %31, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  br label %276

276:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %277 = getelementptr inbounds %struct.arm_2d_region_t, ptr %33, i32 0, i32 0
  %278 = call ptr @__arm_2d_tile_get_virtual_screen_or_root(ptr noundef %17, ptr noundef %34, ptr noundef %277, ptr noundef null, i1 noundef zeroext false)
  %279 = icmp ne ptr %278, null
  br i1 %279, label %281, label %280

280:                                              ; preds = %276
  store i32 1, ptr %16, align 4
  br label %284

281:                                              ; preds = %276
  %282 = getelementptr inbounds %struct.arm_2d_region_t, ptr %33, i32 0, i32 1
  %283 = getelementptr inbounds %struct.arm_2d_region_t, ptr %34, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %282, ptr align 2 %283, i64 4, i1 false), !tbaa.struct !18
  store i32 0, ptr %16, align 4
  br label %284

284:                                              ; preds = %281, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  %285 = load i32, ptr %16, align 4
  switch i32 %285, label %479 [
    i32 0, label %286
  ]

286:                                              ; preds = %284
  br label %287

287:                                              ; preds = %286
  br label %288

288:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 2, ptr %35) #8
  store i16 0, ptr %35, align 2, !tbaa !19
  br label %289

289:                                              ; preds = %477, %288
  %290 = load ptr, ptr %8, align 8, !tbaa !5
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.text_box_t, ptr %291, i32 0, i32 0
  %293 = getelementptr inbounds %struct.anon, ptr %292, i32 0, i32 5
  %294 = call zeroext i1 @__text_box_get_and_analyze_one_line(ptr noundef %290, ptr noundef %293)
  br i1 %294, label %296, label %295

295:                                              ; preds = %289
  br label %478

296:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %297 = load i32, ptr %28, align 4, !tbaa !42
  %298 = load ptr, ptr %8, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.text_box_t, ptr %298, i32 0, i32 0
  %300 = getelementptr inbounds %struct.anon, ptr %299, i32 0, i32 1
  %301 = getelementptr inbounds %struct.anon.0, ptr %300, i32 0, i32 0
  %302 = load i32, ptr %301, align 8, !tbaa !37
  %303 = sub nsw i32 %297, %302
  store i32 %303, ptr %36, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %304 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 0
  %305 = getelementptr inbounds %struct.arm_2d_location_t, ptr %304, i32 0, i32 0
  store i16 0, ptr %305, align 2, !tbaa !44
  %306 = getelementptr inbounds %struct.arm_2d_location_t, ptr %304, i32 0, i32 1
  %307 = load i32, ptr %36, align 4, !tbaa !42
  %308 = load i16, ptr %29, align 2, !tbaa !19
  %309 = sext i16 %308 to i32
  %310 = mul nsw i32 %307, %309
  %311 = load i16, ptr %35, align 2, !tbaa !19
  %312 = sext i16 %311 to i32
  %313 = add nsw i32 %310, %312
  %314 = trunc i32 %313 to i16
  store i16 %314, ptr %306, align 2, !tbaa !46
  %315 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 1
  %316 = getelementptr inbounds %struct.arm_2d_size_t, ptr %315, i32 0, i32 0
  store i16 0, ptr %316, align 2, !tbaa !39
  %317 = getelementptr inbounds %struct.arm_2d_size_t, ptr %315, i32 0, i32 1
  %318 = load i16, ptr %31, align 2, !tbaa !19
  store i16 %318, ptr %317, align 2, !tbaa !43
  %319 = load ptr, ptr %8, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.text_box_t, ptr %319, i32 0, i32 0
  %321 = getelementptr inbounds %struct.anon, ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds %struct.text_box_cfg_t, ptr %321, i32 0, i32 4
  %323 = load i8, ptr %322, align 8
  %324 = and i8 %323, 3
  %325 = zext i8 %324 to i32
  %326 = icmp eq i32 %325, 2
  br i1 %326, label %327, label %334

327:                                              ; preds = %296
  %328 = load ptr, ptr %8, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.text_box_t, ptr %328, i32 0, i32 0
  %330 = getelementptr inbounds %struct.anon, ptr %329, i32 0, i32 4
  %331 = load i16, ptr %330, align 2, !tbaa !38
  %332 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 1
  %333 = getelementptr inbounds %struct.arm_2d_size_t, ptr %332, i32 0, i32 0
  store i16 %331, ptr %333, align 2, !tbaa !9
  br label %343

334:                                              ; preds = %296
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.text_box_t, ptr %335, i32 0, i32 0
  %337 = getelementptr inbounds %struct.anon, ptr %336, i32 0, i32 5
  %338 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %337, i32 0, i32 0
  %339 = getelementptr inbounds %struct.anon.1, ptr %338, i32 0, i32 6
  %340 = load i16, ptr %339, align 2, !tbaa !47
  %341 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 1
  %342 = getelementptr inbounds %struct.arm_2d_size_t, ptr %341, i32 0, i32 0
  store i16 %340, ptr %342, align 2, !tbaa !9
  br label %343

343:                                              ; preds = %334, %327
  %344 = load i32, ptr %28, align 4, !tbaa !42
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.text_box_t, ptr %345, i32 0, i32 0
  %347 = getelementptr inbounds %struct.anon, ptr %346, i32 0, i32 5
  %348 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %347, i32 0, i32 0
  %349 = getelementptr inbounds %struct.anon.1, ptr %348, i32 0, i32 1
  store i32 %344, ptr %349, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #8
  store i8 0, ptr %38, align 1, !tbaa !10
  %350 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 1
  %351 = getelementptr inbounds %struct.arm_2d_size_t, ptr %350, i32 0, i32 0
  %352 = load i16, ptr %351, align 2, !tbaa !9
  %353 = sext i16 %352 to i32
  %354 = icmp ne i32 0, %353
  br i1 %354, label %355, label %396

355:                                              ; preds = %343
  %356 = call zeroext i1 @arm_2d_region_intersect(ptr noundef %22, ptr noundef %37, ptr noundef %37)
  br i1 %356, label %358, label %357

357:                                              ; preds = %355
  store i32 15, ptr %16, align 4
  br label %474

358:                                              ; preds = %355
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %39, ptr align 2 %37, i64 8, i1 false), !tbaa.struct !21
  %359 = load i16, ptr %31, align 2, !tbaa !19
  %360 = sext i16 %359 to i32
  %361 = sdiv i32 %360, 2
  %362 = getelementptr inbounds %struct.arm_2d_region_t, ptr %39, i32 0, i32 0
  %363 = getelementptr inbounds %struct.arm_2d_location_t, ptr %362, i32 0, i32 1
  %364 = load i16, ptr %363, align 2, !tbaa !9
  %365 = sext i16 %364 to i32
  %366 = sub nsw i32 %365, %361
  %367 = trunc i32 %366 to i16
  store i16 %367, ptr %363, align 2, !tbaa !9
  %368 = load i16, ptr %31, align 2, !tbaa !19
  %369 = sext i16 %368 to i32
  %370 = mul nsw i32 %369, 2
  %371 = trunc i32 %370 to i16
  %372 = getelementptr inbounds %struct.arm_2d_region_t, ptr %39, i32 0, i32 1
  %373 = getelementptr inbounds %struct.arm_2d_size_t, ptr %372, i32 0, i32 1
  store i16 %371, ptr %373, align 2, !tbaa !9
  %374 = call zeroext i1 @arm_2d_region_intersect(ptr noundef %33, ptr noundef %39, ptr noundef null)
  br i1 %374, label %392, label %375

375:                                              ; preds = %358
  store i8 1, ptr %38, align 1, !tbaa !10
  %376 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 0
  %377 = getelementptr inbounds %struct.arm_2d_location_t, ptr %376, i32 0, i32 1
  %378 = load i16, ptr %377, align 2, !tbaa !9
  %379 = sext i16 %378 to i32
  %380 = getelementptr inbounds %struct.arm_2d_region_t, ptr %33, i32 0, i32 0
  %381 = getelementptr inbounds %struct.arm_2d_location_t, ptr %380, i32 0, i32 1
  %382 = load i16, ptr %381, align 2, !tbaa !9
  %383 = sext i16 %382 to i32
  %384 = getelementptr inbounds %struct.arm_2d_region_t, ptr %33, i32 0, i32 1
  %385 = getelementptr inbounds %struct.arm_2d_size_t, ptr %384, i32 0, i32 1
  %386 = load i16, ptr %385, align 2, !tbaa !9
  %387 = sext i16 %386 to i32
  %388 = add nsw i32 %383, %387
  %389 = icmp sge i32 %379, %388
  br i1 %389, label %390, label %391

390:                                              ; preds = %375
  store i32 15, ptr %16, align 4
  br label %393

391:                                              ; preds = %375
  br label %392

392:                                              ; preds = %391, %358
  store i32 0, ptr %16, align 4
  br label %393

393:                                              ; preds = %392, %390
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  %394 = load i32, ptr %16, align 4
  switch i32 %394, label %474 [
    i32 0, label %395
  ]

395:                                              ; preds = %393
  br label %396

396:                                              ; preds = %395, %343
  %397 = load i8, ptr %38, align 1, !tbaa !10, !range !34, !noundef !35
  %398 = trunc i8 %397 to i1
  br i1 %398, label %411, label %399

399:                                              ; preds = %396
  %400 = load ptr, ptr %8, align 8, !tbaa !5
  %401 = load ptr, ptr %8, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.text_box_t, ptr %401, i32 0, i32 0
  %403 = getelementptr inbounds %struct.anon, ptr %402, i32 0, i32 5
  %404 = load ptr, ptr %8, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.text_box_t, ptr %404, i32 0, i32 0
  %406 = getelementptr inbounds %struct.anon, ptr %405, i32 0, i32 0
  %407 = getelementptr inbounds %struct.text_box_cfg_t, ptr %406, i32 0, i32 4
  %408 = load i8, ptr %407, align 8
  %409 = and i8 %408, 3
  %410 = zext i8 %409 to i32
  call void @__text_box_draw_line(ptr noundef %400, ptr noundef %403, ptr noundef %17, ptr noundef %37, i32 noundef %410)
  br label %411

411:                                              ; preds = %399, %396
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %412 = load ptr, ptr %8, align 8, !tbaa !5
  %413 = getelementptr inbounds %struct.text_box_t, ptr %412, i32 0, i32 0
  %414 = getelementptr inbounds %struct.anon, ptr %413, i32 0, i32 5
  %415 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %414, i32 0, i32 0
  %416 = getelementptr inbounds %struct.anon.1, ptr %415, i32 0, i32 2
  %417 = load i32, ptr %416, align 4, !tbaa !49
  %418 = load ptr, ptr %8, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.text_box_t, ptr %418, i32 0, i32 0
  %420 = getelementptr inbounds %struct.anon, ptr %419, i32 0, i32 5
  %421 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %420, i32 0, i32 0
  %422 = getelementptr inbounds %struct.anon.1, ptr %421, i32 0, i32 8
  %423 = load i16, ptr %422, align 2, !tbaa !50
  %424 = zext i16 %423 to i32
  %425 = add nsw i32 %417, %424
  store i32 %425, ptr %40, align 4, !tbaa !42
  %426 = load ptr, ptr %8, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.text_box_t, ptr %426, i32 0, i32 0
  %428 = getelementptr inbounds %struct.anon, ptr %427, i32 0, i32 5
  %429 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %428, i32 0, i32 0
  %430 = getelementptr inbounds %struct.anon.1, ptr %429, i32 0, i32 5
  %431 = load i16, ptr %430, align 4, !tbaa !51
  %432 = zext i16 %431 to i32
  %433 = icmp sgt i32 %432, 0
  br i1 %433, label %434, label %448

434:                                              ; preds = %411
  %435 = load ptr, ptr %8, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.text_box_t, ptr %435, i32 0, i32 0
  %437 = getelementptr inbounds %struct.anon, ptr %436, i32 0, i32 5
  %438 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %437, i32 0, i32 0
  %439 = getelementptr inbounds %struct.anon.1, ptr %438, i32 0, i32 4
  %440 = load i16, ptr %439, align 2
  %441 = and i16 %440, 1
  %442 = icmp ne i16 %441, 0
  %443 = xor i1 %442, true
  %444 = xor i1 %443, true
  %445 = zext i1 %444 to i32
  %446 = load i32, ptr %40, align 4, !tbaa !42
  %447 = add nsw i32 %446, %445
  store i32 %447, ptr %40, align 4, !tbaa !42
  br label %448

448:                                              ; preds = %434, %411
  %449 = load ptr, ptr %8, align 8, !tbaa !5
  %450 = load i32, ptr %40, align 4, !tbaa !42
  %451 = call i32 @__text_box_set_current_position(ptr noundef %449, i32 noundef %450)
  %452 = load ptr, ptr %8, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.text_box_t, ptr %452, i32 0, i32 0
  %454 = getelementptr inbounds %struct.anon, ptr %453, i32 0, i32 5
  %455 = getelementptr inbounds %struct.__text_box_line_info_t, ptr %454, i32 0, i32 0
  %456 = getelementptr inbounds %struct.anon.1, ptr %455, i32 0, i32 4
  %457 = load i16, ptr %456, align 2
  %458 = and i16 %457, 1
  %459 = icmp ne i16 %458, 0
  br i1 %459, label %460, label %471

460:                                              ; preds = %448
  %461 = load ptr, ptr %8, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct.text_box_t, ptr %461, i32 0, i32 0
  %463 = getelementptr inbounds %struct.anon, ptr %462, i32 0, i32 0
  %464 = getelementptr inbounds %struct.text_box_cfg_t, ptr %463, i32 0, i32 5
  %465 = load i8, ptr %464, align 1, !tbaa !52
  %466 = sext i8 %465 to i32
  %467 = load i16, ptr %35, align 2, !tbaa !19
  %468 = sext i16 %467 to i32
  %469 = add nsw i32 %468, %466
  %470 = trunc i32 %469 to i16
  store i16 %470, ptr %35, align 2, !tbaa !19
  br label %471

471:                                              ; preds = %460, %448
  %472 = load i32, ptr %28, align 4, !tbaa !42
  %473 = add nsw i32 %472, 1
  store i32 %473, ptr %28, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  store i32 0, ptr %16, align 4
  br label %474

474:                                              ; preds = %471, %393, %357
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  %475 = load i32, ptr %16, align 4
  switch i32 %475, label %504 [
    i32 0, label %476
    i32 15, label %478
  ]

476:                                              ; preds = %474
  br label %477

477:                                              ; preds = %476
  br i1 true, label %289, label %478

478:                                              ; preds = %477, %474, %295
  call void @llvm.lifetime.end.p0(i64 2, ptr %35) #8
  store i32 0, ptr %16, align 4
  br label %479

479:                                              ; preds = %478, %284
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  %480 = load i32, ptr %16, align 4
  switch i32 %480, label %484 [
    i32 0, label %481
  ]

481:                                              ; preds = %479
  br label %482

482:                                              ; preds = %481
  %483 = load ptr, ptr %24, align 8, !tbaa !5
  br label %165, !llvm.loop !53

484:                                              ; preds = %479, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %485 = load i32, ptr %16, align 4
  switch i32 %485, label %492 [
    i32 10, label %486
  ]

486:                                              ; preds = %484
  br label %487

487:                                              ; preds = %486
  %488 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  %489 = zext i1 %488 to i8
  store i8 %489, ptr %41, align 1, !tbaa !10
  %490 = load i8, ptr %41, align 1, !tbaa !10, !range !34, !noundef !35
  %491 = trunc i8 %490 to i1
  br label %151, !llvm.loop !55

492:                                              ; preds = %484, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %493 = load i32, ptr %16, align 4
  switch i32 %493, label %496 [
    i32 7, label %494
  ]

494:                                              ; preds = %492
  br label %495

495:                                              ; preds = %494
  br label %70, !llvm.loop !56

496:                                              ; preds = %492, %149, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  %497 = load i32, ptr %16, align 4
  switch i32 %497, label %499 [
    i32 4, label %498
  ]

498:                                              ; preds = %496
  br label %55, !llvm.loop !57

499:                                              ; preds = %496, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %500 = load i32, ptr %16, align 4
  switch i32 %500, label %504 [
    i32 2, label %501
    i32 1, label %503
  ]

501:                                              ; preds = %499
  %502 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null)
  br label %503

503:                                              ; preds = %501, %499
  ret void

504:                                              ; preds = %499, %474
  unreachable
}

declare ptr @arm_2d_get_default_frame_buffer() #5

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

declare void @arm_lcd_text_set_target_framebuffer(ptr noundef) #5

declare i32 @arm_lcd_text_set_font(ptr noundef) #5

declare void @arm_lcd_text_set_colour(i16 noundef zeroext, i16 noundef zeroext) #5

declare void @arm_lcd_text_set_opacity(i8 noundef zeroext) #5

declare void @arm_lcd_text_set_scale(float noundef) #5

declare i32 @arm_lcd_text_get_actual_char_size() #5

; Function Attrs: nounwind uwtable
declare hidden void @__text_box_update(ptr noundef nonnull) #4

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @__text_box_set_current_position(ptr noundef, i32 noundef) #6

declare i32 @arm_lcd_text_get_actual_char_box() #5

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @__text_box_get_and_analyze_one_line(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden void @__text_box_draw_line(ptr noundef nonnull, ptr noundef nonnull, ptr noundef, ptr noundef, i32 noundef) #4

declare zeroext i1 @arm_2d_op_wait_async(ptr noundef) #5

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"arm_2d_margin_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!14 = !{!13, !7, i64 1}
!15 = !{!13, !7, i64 2}
!16 = !{!13, !7, i64 3}
!17 = !{i64 0, i64 1, !9, i64 1, i64 1, !9, i64 2, i64 1, !9, i64 3, i64 1, !9}
!18 = !{i64 0, i64 2, !19, i64 2, i64 2, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!22 = !{!23, !6, i64 0}
!23 = !{!"text_box_t", !24, i64 0}
!24 = !{!"", !25, i64 0, !29, i64 48, !30, i64 56, !20, i64 60, !20, i64 62, !31, i64 64, !7, i64 96}
!25 = !{!"text_box_cfg_t", !6, i64 0, !26, i64 8, !27, i64 16, !6, i64 32, !7, i64 40, !7, i64 40, !7, i64 41}
!26 = !{!"float", !7, i64 0}
!27 = !{!"text_box_io_text_stream_reader_t", !6, i64 0, !28, i64 8}
!28 = !{!"long", !7, i64 0}
!29 = !{!"", !30, i64 0, !30, i64 4}
!30 = !{!"int", !7, i64 0}
!31 = !{!"__text_box_line_info_t", !32, i64 0}
!32 = !{!"", !6, i64 0, !30, i64 8, !30, i64 12, !20, i64 16, !20, i64 18, !20, i64 20, !20, i64 22, !20, i64 24, !20, i64 26, !30, i64 28}
!33 = !{!23, !26, i64 8}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!23, !30, i64 56}
!37 = !{!23, !30, i64 48}
!38 = !{!23, !20, i64 62}
!39 = !{!40, !20, i64 0}
!40 = !{!"arm_2d_size_t", !20, i64 0, !20, i64 2}
!41 = !{!23, !30, i64 52}
!42 = !{!30, !30, i64 0}
!43 = !{!40, !20, i64 2}
!44 = !{!45, !20, i64 0}
!45 = !{!"arm_2d_location_t", !20, i64 0, !20, i64 2}
!46 = !{!45, !20, i64 2}
!47 = !{!23, !20, i64 86}
!48 = !{!23, !30, i64 72}
!49 = !{!23, !30, i64 76}
!50 = !{!23, !20, i64 90}
!51 = !{!23, !20, i64 84}
!52 = !{!23, !7, i64 41}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = distinct !{!55, !54}
!56 = distinct !{!56, !54}
!57 = distinct !{!57, !54}


; 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.4, %union.anon.15, %union.anon.16 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { i8, %union.arm_2d_color_info_t, %union.anon.8 }
%union.arm_2d_color_info_t = type { %struct.anon.6 }
%struct.anon.6 = type { i8 }
%union.anon.8 = type { i16 }
%union.anon.15 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon, %union.anon.2 }
%union.anon = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.2 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.16 = type { ptr }

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

; Function Attrs: nounwind uwtable
define dso_local void @text_box_show(ptr noundef nonnull %0, ptr noundef %1, ptr noundef readonly %2, i16 %3, i8 noundef zeroext %4, i1 noundef zeroext %5) local_unnamed_addr #2 {
  %7 = alloca %struct.arm_2d_tile_t, align 8
  %8 = alloca %struct.arm_2d_region_t, align 8
  %9 = alloca %struct.arm_2d_region_t, align 8
  %10 = alloca %struct.arm_2d_region_t, align 2
  %11 = alloca %struct.arm_2d_region_t, align 2
  %12 = alloca %struct.arm_2d_region_t, align 8
  %13 = alloca %struct.arm_2d_region_t, align 8
  %14 = icmp eq ptr %1, inttoptr (i64 -1 to ptr)
  br i1 %14, label %15, label %.split176

15:                                               ; preds = %6
  %16 = tail call ptr @arm_2d_get_default_frame_buffer() #5
  br label %.split176

.split176:                                        ; preds = %15, %6
  %.0 = phi ptr [ %16, %15 ], [ %1, %6 ]
  %17 = icmp eq ptr %.0, null
  %18 = icmp eq ptr %2, null
  %19 = getelementptr inbounds i8, ptr %8, i64 4
  %20 = getelementptr inbounds i8, ptr %9, i64 4
  %21 = getelementptr inbounds i8, ptr %7, i64 8
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = getelementptr inbounds i8, ptr %0, i64 60
  %24 = getelementptr inbounds i8, ptr %0, i64 62
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = getelementptr inbounds i8, ptr %0, i64 96
  %29 = getelementptr inbounds i8, ptr %0, i64 52
  %30 = getelementptr inbounds i8, ptr %10, i64 4
  %31 = getelementptr inbounds i8, ptr %11, i64 4
  %32 = getelementptr inbounds i8, ptr %0, i64 64
  %33 = getelementptr inbounds i8, ptr %12, i64 2
  %34 = getelementptr inbounds i8, ptr %12, i64 4
  %35 = getelementptr inbounds i8, ptr %12, i64 6
  %36 = getelementptr inbounds i8, ptr %0, i64 72
  %37 = getelementptr inbounds i8, ptr %13, i64 2
  %38 = getelementptr inbounds i8, ptr %13, i64 6
  %39 = getelementptr inbounds i8, ptr %10, i64 2
  %40 = getelementptr inbounds i8, ptr %10, i64 6
  %41 = getelementptr inbounds i8, ptr %0, i64 76
  %42 = getelementptr inbounds i8, ptr %0, i64 90
  %43 = getelementptr inbounds i8, ptr %0, i64 84
  %44 = getelementptr inbounds i8, ptr %0, i64 82
  %45 = getelementptr inbounds i8, ptr %0, i64 41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8
  br i1 %17, label %46, label %49

46:                                               ; preds = %.split176
  %47 = tail call ptr @arm_2d_get_default_frame_buffer() #5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %55, label %49

49:                                               ; preds = %46, %.split176
  %.098 = phi ptr [ %47, %46 ], [ %.0, %.split176 ]
  br i1 %18, label %50, label %53

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %.098, i64 8
  %52 = load i32, ptr %51, align 4
  store i32 %52, ptr %19, align 4
  br label %.split174

53:                                               ; preds = %49
  %54 = load i64, ptr %2, align 2
  store i64 %54, ptr %8, align 8
  br label %.split174

55:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %142

.split174:                                        ; preds = %50, %53
  %56 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %.098, ptr noundef nonnull %8, ptr noundef nonnull %7, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store i64 0, ptr %9, align 8
  %57 = load i32, ptr %21, align 8
  store i32 %57, ptr %20, align 4
  call void @arm_lcd_text_set_target_framebuffer(ptr noundef nonnull %7) #5
  %58 = load ptr, ptr %0, align 8, !tbaa !5
  %59 = call i32 @arm_lcd_text_set_font(ptr noundef %58) #5
  call void @arm_lcd_text_set_colour(i16 noundef zeroext %3, i16 noundef zeroext 0) #5
  call void @arm_lcd_text_set_opacity(i8 noundef zeroext %4) #5
  %60 = load float, ptr %22, align 8, !tbaa !20
  call void @arm_lcd_text_set_scale(float noundef %60) #5
  %61 = trunc i32 %57 to i16
  br i1 %5, label %62, label %79

62:                                               ; preds = %.split174
  %63 = load i16, ptr %24, align 2, !tbaa !21
  %.not116 = icmp eq i16 %63, %61
  br i1 %.not116, label %68, label %.critedge127

.critedge127:                                     ; preds = %62
  %64 = call i32 @arm_lcd_text_get_actual_char_size() #5
  %sext = shl i32 %64, 16
  %65 = ashr i32 %sext, 18
  %66 = trunc nsw i32 %65 to i16
  %67 = sub i16 %61, %66
  store i16 %67, ptr %24, align 2, !tbaa !21
  %.pre = load i16, ptr %23, align 4
  br label %73

68:                                               ; preds = %62
  %69 = load i32, ptr %25, align 8, !tbaa !22
  %70 = load i32, ptr %26, align 8, !tbaa !23
  %.not115 = icmp ne i32 %69, %70
  %71 = load i16, ptr %23, align 4
  %72 = trunc i16 %71 to i1
  %spec.select = select i1 %.not115, i1 true, i1 %72
  br i1 %spec.select, label %73, label %79

73:                                               ; preds = %.critedge127, %68
  %74 = phi i16 [ %.pre, %.critedge127 ], [ %71, %68 ]
  %75 = and i16 %74, -2
  store i16 %75, ptr %23, align 4
  call void @__text_box_update(ptr noundef %0)
  %76 = load i8, ptr %27, align 8
  %77 = and i8 %76, 64
  %.not117 = icmp eq i8 %77, 0
  br i1 %.not117, label %79, label %78

78:                                               ; preds = %73
  call void @__arm_2d_helper_dirty_region_item_update(ptr noundef nonnull %28, ptr noundef nonnull %7, ptr noundef null, ptr noundef nonnull %9) #5
  br label %79

79:                                               ; preds = %68, %78, %73, %.split174
  %80 = load i32, ptr %29, align 4, !tbaa !24
  %81 = call i32 @__text_box_set_current_position(ptr noundef nonnull %0, i32 noundef %80)
  %82 = load i32, ptr %26, align 8, !tbaa !23
  %83 = call i32 @arm_lcd_text_get_actual_char_box() #5
  %84 = call i32 @arm_lcd_text_get_actual_char_size() #5
  %.sroa.1.0.extract.shift = lshr i32 %84, 16
  %.sroa.1.0.extract.trunc = trunc nuw i32 %.sroa.1.0.extract.shift to i16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %85 = call ptr @__arm_2d_tile_get_virtual_screen_or_root(ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef null, i1 noundef zeroext false) #5
  %.not118.not.not = icmp eq ptr %85, null
  br i1 %.not118.not.not, label %.thread155, label %86

86:                                               ; preds = %79
  %87 = load i32, ptr %31, align 2
  store i32 %87, ptr %30, align 2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %88 = call zeroext i1 @__text_box_get_and_analyze_one_line(ptr noundef nonnull %0, ptr noundef nonnull %32)
  br i1 %88, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %86
  %89 = lshr i32 %83, 16
  %90 = ashr i32 %84, 16
  %.neg.lhs.trunc = trunc nsw i32 %90 to i16
  %.neg169 = sdiv i16 %.neg.lhs.trunc, -2
  %91 = shl nsw i32 %90, 1
  %92 = trunc i32 %91 to i16
  br label %93

93:                                               ; preds = %.lr.ph, %138
  %.088173 = phi i16 [ 0, %.lr.ph ], [ %.189, %138 ]
  %.096172 = phi i32 [ %82, %.lr.ph ], [ %139, %138 ]
  %94 = load i32, ptr %26, align 8, !tbaa !23
  %95 = sub nsw i32 %.096172, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  store i16 0, ptr %12, align 8, !tbaa !25
  %96 = mul i32 %95, %89
  %97 = trunc i32 %96 to i16
  %98 = add i16 %.088173, %97
  store i16 %98, ptr %33, align 2, !tbaa !27
  store i16 %.sroa.1.0.extract.trunc, ptr %35, align 2, !tbaa !28
  %99 = load i8, ptr %27, align 8
  %100 = and i8 %99, 3
  %101 = icmp eq i8 %100, 2
  %storemerge.in.v = select i1 %101, i64 62, i64 86
  %storemerge.in = getelementptr inbounds i8, ptr %0, i64 %storemerge.in.v
  %storemerge = load i16, ptr %storemerge.in, align 2, !tbaa !30
  store i16 %storemerge, ptr %34, align 4, !tbaa !31
  store i32 %.096172, ptr %36, align 8, !tbaa !32
  %.not120 = icmp eq i16 %storemerge, 0
  br i1 %.not120, label %.critedge131, label %102

102:                                              ; preds = %93
  %103 = call zeroext i1 @arm_2d_region_intersect(ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef nonnull %12) #5
  br i1 %103, label %104, label %.thread149

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %105 = load i64, ptr %12, align 8
  store i64 %105, ptr %13, align 8
  %106 = lshr i64 %105, 16
  %107 = trunc i64 %106 to i16
  %108 = add i16 %.neg169, %107
  store i16 %108, ptr %37, align 2, !tbaa !31
  store i16 %92, ptr %38, align 2, !tbaa !31
  %109 = call zeroext i1 @arm_2d_region_intersect(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef null) #5
  br i1 %109, label %118, label %110

110:                                              ; preds = %104
  %111 = load i16, ptr %33, align 2, !tbaa !31
  %112 = sext i16 %111 to i32
  %113 = load i16, ptr %39, align 2, !tbaa !31
  %114 = sext i16 %113 to i32
  %115 = load i16, ptr %40, align 2, !tbaa !31
  %116 = sext i16 %115 to i32
  %117 = add nsw i32 %116, %114
  %.not122 = icmp sgt i32 %117, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br i1 %.not122, label %.thread147, label %.thread149

118:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %.pre177 = load i8, ptr %27, align 8
  %.pre178 = and i8 %.pre177, 3
  br label %.critedge131

.critedge131:                                     ; preds = %118, %93
  %.pre-phi = phi i8 [ %.pre178, %118 ], [ %100, %93 ]
  %119 = zext nneg i8 %.pre-phi to i32
  call void @__text_box_draw_line(ptr noundef %0, ptr noundef %32, ptr noundef nonnull %7, ptr noundef nonnull %12, i32 noundef %119)
  br label %.thread147

.thread147:                                       ; preds = %110, %.critedge131
  %120 = load i32, ptr %41, align 4, !tbaa !33
  %121 = load i16, ptr %42, align 2, !tbaa !34
  %122 = zext i16 %121 to i32
  %123 = add nsw i32 %120, %122
  %124 = load i16, ptr %43, align 4, !tbaa !35
  %.not123 = icmp eq i16 %124, 0
  br i1 %.not123, label %130, label %125

125:                                              ; preds = %.thread147
  %126 = load i16, ptr %44, align 2
  %127 = and i16 %126, 1
  %128 = zext nneg i16 %127 to i32
  %129 = add nsw i32 %123, %128
  br label %130

130:                                              ; preds = %125, %.thread147
  %.086 = phi i32 [ %129, %125 ], [ %123, %.thread147 ]
  %131 = call i32 @__text_box_set_current_position(ptr noundef nonnull %0, i32 noundef %.086)
  %132 = load i16, ptr %44, align 2
  %133 = and i16 %132, 1
  %.not124 = icmp eq i16 %133, 0
  br i1 %.not124, label %138, label %134

134:                                              ; preds = %130
  %135 = load i8, ptr %45, align 1, !tbaa !36
  %136 = sext i8 %135 to i16
  %137 = add i16 %.088173, %136
  br label %138

.thread149:                                       ; preds = %102, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %.loopexit

138:                                              ; preds = %130, %134
  %.189 = phi i16 [ %137, %134 ], [ %.088173, %130 ]
  %139 = add nsw i32 %.096172, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  %140 = call zeroext i1 @__text_box_get_and_analyze_one_line(ptr noundef nonnull %0, ptr noundef nonnull %32)
  br i1 %140, label %93, label %.loopexit

.thread155:                                       ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %144

.loopexit:                                        ; preds = %138, %86, %.thread149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %141 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %142

142:                                              ; preds = %.loopexit, %55
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  %143 = call zeroext i1 @arm_2d_op_wait_async(ptr noundef null) #5
  br label %144

144:                                              ; preds = %.thread155, %142
  ret void
}

declare ptr @arm_2d_get_default_frame_buffer() local_unnamed_addr #3

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

declare void @arm_lcd_text_set_target_framebuffer(ptr noundef) local_unnamed_addr #3

declare i32 @arm_lcd_text_set_font(ptr noundef) local_unnamed_addr #3

declare void @arm_lcd_text_set_colour(i16 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #3

declare void @arm_lcd_text_set_opacity(i8 noundef zeroext) local_unnamed_addr #3

declare void @arm_lcd_text_set_scale(float noundef) local_unnamed_addr #3

declare i32 @arm_lcd_text_get_actual_char_size() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @__text_box_update(ptr noundef nonnull) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @__text_box_set_current_position(ptr noundef, i32 noundef) local_unnamed_addr #4

declare i32 @arm_lcd_text_get_actual_char_box() local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @__text_box_get_and_analyze_one_line(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @__text_box_draw_line(ptr noundef nonnull, ptr noundef nonnull, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 = { 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, !9, i64 0}
!6 = !{!"text_box_t", !7, i64 0}
!7 = !{!"", !8, i64 0, !15, i64 48, !16, i64 56, !17, i64 60, !17, i64 62, !18, i64 64, !10, i64 96}
!8 = !{!"text_box_cfg_t", !9, i64 0, !12, i64 8, !13, i64 16, !9, i64 32, !10, i64 40, !10, i64 40, !10, i64 41}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"float", !10, i64 0}
!13 = !{!"text_box_io_text_stream_reader_t", !9, i64 0, !14, i64 8}
!14 = !{!"long", !10, i64 0}
!15 = !{!"", !16, i64 0, !16, i64 4}
!16 = !{!"int", !10, i64 0}
!17 = !{!"short", !10, i64 0}
!18 = !{!"__text_box_line_info_t", !19, i64 0}
!19 = !{!"", !9, i64 0, !16, i64 8, !16, i64 12, !17, i64 16, !17, i64 18, !17, i64 20, !17, i64 22, !17, i64 24, !17, i64 26, !16, i64 28}
!20 = !{!6, !12, i64 8}
!21 = !{!6, !17, i64 62}
!22 = !{!6, !16, i64 56}
!23 = !{!6, !16, i64 48}
!24 = !{!6, !16, i64 52}
!25 = !{!26, !17, i64 0}
!26 = !{!"arm_2d_location_t", !17, i64 0, !17, i64 2}
!27 = !{!26, !17, i64 2}
!28 = !{!29, !17, i64 2}
!29 = !{!"arm_2d_size_t", !17, i64 0, !17, i64 2}
!30 = !{!17, !17, i64 0}
!31 = !{!10, !10, i64 0}
!32 = !{!6, !16, i64 72}
!33 = !{!6, !16, i64 76}
!34 = !{!6, !17, i64 90}
!35 = !{!6, !17, i64 84}
!36 = !{!6, !10, i64 41}


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