; LLVM IR from alekras/ao.rtos.cpp :: Porting/ARM-Raspberry_Pi (display-start)

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

%class.FormatParser = type { %class.Fsm, ptr, ptr, i32, i32, [1 x %struct.__va_list_tag] }
%class.Fsm = type { { i64, i64 } }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.rpi_mailbox_property_t = type { i32, i32, %union.anon }
%union.anon = type { [64 x i32] }

@baseAddress = external dso_local global ptr, align 8
@_ZL11fontSet8x16 = external hidden global <{ [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], <{ i8, i8, i8, i8, [12 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8] }>, align 16

; Function Attrs: mustprogress uwtable
define dso_local void @initDisplay() #0 {
  %1 = alloca [80 x i8], align 16
  %2 = alloca %class.FormatParser, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %2) #4
  call void @_ZN12FormatParserC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @RPI_PropertyInit()
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262145)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294915, i32 noundef 1280, i32 noundef 1024)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294916, i32 noundef 1280, i32 noundef 2048)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294917, i32 noundef 32)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262152)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262147)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262149)
  %18 = call i32 @RPI_PropertyProcess()
  %19 = call ptr @RPI_PropertyGet(i32 noundef 262147)
  store ptr %19, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %30

21:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.rpi_mailbox_property_t, ptr %22, i32 0, i32 2
  %24 = getelementptr inbounds [64 x i32], ptr %23, i64 0, i64 0
  %25 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %25, ptr %6, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.rpi_mailbox_property_t, ptr %26, i32 0, i32 2
  %28 = getelementptr inbounds [64 x i32], ptr %27, i64 0, i64 1
  %29 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %29, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %30

30:                                               ; preds = %21, %0
  %31 = call ptr @RPI_PropertyGet(i32 noundef 262149)
  store ptr %31, ptr %5, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %38

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.rpi_mailbox_property_t, ptr %34, i32 0, i32 2
  %36 = getelementptr inbounds [64 x i32], ptr %35, i64 0, i64 0
  %37 = load i32, ptr %36, align 4, !tbaa !9
  store i32 %37, ptr %8, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %38

38:                                               ; preds = %33, %30
  %39 = call ptr @RPI_PropertyGet(i32 noundef 262152)
  store ptr %39, ptr %5, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %46

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.rpi_mailbox_property_t, ptr %42, i32 0, i32 2
  %44 = getelementptr inbounds [64 x i32], ptr %43, i64 0, i64 0
  %45 = load i32, ptr %44, align 4, !tbaa !9
  store i32 %45, ptr %9, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %46

46:                                               ; preds = %41, %38
  %47 = call ptr @RPI_PropertyGet(i32 noundef 262145)
  store ptr %47, ptr %5, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %57

49:                                               ; preds = %46
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.rpi_mailbox_property_t, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds [64 x i32], ptr %51, i64 0, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = and i32 %53, 1073741823
  %55 = zext i32 %54 to i64
  %56 = inttoptr i64 %55 to ptr
  store ptr %56, ptr @baseAddress, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %49, %46
  %58 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  store ptr %58, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !10
  br label %59

59:                                               ; preds = %65, %57
  %60 = load i32, ptr %4, align 4, !tbaa !10
  %61 = icmp ult i32 %60, 1280
  br i1 %61, label %62, label %68

62:                                               ; preds = %59
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds i32, ptr %63, i32 1
  store ptr %64, ptr %3, align 8, !tbaa !5
  store volatile i32 -1, ptr %63, align 4, !tbaa !10
  br label %65

65:                                               ; preds = %62
  %66 = load i32, ptr %4, align 4, !tbaa !10
  %67 = add i32 %66, 1
  store i32 %67, ptr %4, align 4, !tbaa !10
  br label %59, !llvm.loop !12

68:                                               ; preds = %59
  %69 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  %70 = getelementptr inbounds i32, ptr %69, i64 1309440
  store ptr %70, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !10
  br label %71

71:                                               ; preds = %77, %68
  %72 = load i32, ptr %4, align 4, !tbaa !10
  %73 = icmp ult i32 %72, 1280
  br i1 %73, label %74, label %80

74:                                               ; preds = %71
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds i32, ptr %75, i32 1
  store ptr %76, ptr %3, align 8, !tbaa !5
  store volatile i32 -1, ptr %75, align 4, !tbaa !10
  br label %77

77:                                               ; preds = %74
  %78 = load i32, ptr %4, align 4, !tbaa !10
  %79 = add i32 %78, 1
  store i32 %79, ptr %4, align 4, !tbaa !10
  br label %71, !llvm.loop !14

80:                                               ; preds = %71
  %81 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  store ptr %81, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !10
  br label %82

82:                                               ; preds = %89, %80
  %83 = load i32, ptr %4, align 4, !tbaa !10
  %84 = icmp ult i32 %83, 1024
  br i1 %84, label %85, label %92

85:                                               ; preds = %82
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  store volatile i32 -1, ptr %86, align 4, !tbaa !10
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds i32, ptr %87, i64 1280
  store ptr %88, ptr %3, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %85
  %90 = load i32, ptr %4, align 4, !tbaa !10
  %91 = add i32 %90, 1
  store i32 %91, ptr %4, align 4, !tbaa !10
  br label %82, !llvm.loop !15

92:                                               ; preds = %82
  %93 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  %94 = getelementptr inbounds i32, ptr %93, i64 1280
  %95 = getelementptr inbounds i32, ptr %94, i64 -1
  store ptr %95, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !10
  br label %96

96:                                               ; preds = %103, %92
  %97 = load i32, ptr %4, align 4, !tbaa !10
  %98 = icmp ult i32 %97, 1024
  br i1 %98, label %99, label %106

99:                                               ; preds = %96
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  store volatile i32 -1, ptr %100, align 4, !tbaa !10
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds i32, ptr %101, i64 1280
  store ptr %102, ptr %3, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %99
  %104 = load i32, ptr %4, align 4, !tbaa !10
  %105 = add i32 %104, 1
  store i32 %105, ptr %4, align 4, !tbaa !10
  br label %96, !llvm.loop !16

106:                                              ; preds = %96
  %107 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  store ptr %107, ptr %3, align 8, !tbaa !5
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds i32, ptr %108, i64 25600
  store ptr %109, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %10, align 4, !tbaa !10
  br label %110

110:                                              ; preds = %161, %106
  %111 = load i32, ptr %10, align 4, !tbaa !10
  %112 = icmp slt i32 %111, 90
  br i1 %112, label %113, label %164

113:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %114 = load i32, ptr %10, align 4, !tbaa !10
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [97 x [16 x i8]], ptr @_ZL11fontSet8x16, i64 0, i64 %115
  %117 = getelementptr inbounds [16 x i8], ptr %116, i64 0, i64 0
  store ptr %117, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !10
  br label %118

118:                                              ; preds = %155, %113
  %119 = load i32, ptr %12, align 4, !tbaa !10
  %120 = icmp slt i32 %119, 16
  br i1 %120, label %121, label %158

121:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %122 = load i32, ptr %12, align 4, !tbaa !10
  %123 = mul nsw i32 %122, 1280
  store i32 %123, ptr %14, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 1, ptr %15, align 1, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !10
  br label %124

124:                                              ; preds = %151, %121
  %125 = load i32, ptr %11, align 4, !tbaa !10
  %126 = icmp slt i32 %125, 8
  br i1 %126, label %127, label %154

127:                                              ; preds = %124
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !10
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i8, ptr %128, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !9
  %133 = zext i8 %132 to i32
  %134 = load i8, ptr %15, align 1, !tbaa !9
  %135 = zext i8 %134 to i32
  %136 = and i32 %133, %135
  %137 = icmp ne i32 %136, 0
  %138 = zext i1 %137 to i64
  %139 = select i1 %137, i32 -1, i32 -16777216
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = load i32, ptr %11, align 4, !tbaa !10
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %140, i64 %142
  %144 = load i32, ptr %14, align 4, !tbaa !10
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %143, i64 %145
  store volatile i32 %139, ptr %146, align 4, !tbaa !10
  %147 = load i8, ptr %15, align 1, !tbaa !9
  %148 = zext i8 %147 to i32
  %149 = shl i32 %148, 1
  %150 = trunc i32 %149 to i8
  store i8 %150, ptr %15, align 1, !tbaa !9
  br label %151

151:                                              ; preds = %127
  %152 = load i32, ptr %11, align 4, !tbaa !10
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %11, align 4, !tbaa !10
  br label %124, !llvm.loop !17

154:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %12, align 4, !tbaa !10
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %12, align 4, !tbaa !10
  br label %118, !llvm.loop !18

158:                                              ; preds = %118
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds i32, ptr %159, i64 8
  store ptr %160, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %161

161:                                              ; preds = %158
  %162 = load i32, ptr %10, align 4, !tbaa !10
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %10, align 4, !tbaa !10
  br label %110, !llvm.loop !19

164:                                              ; preds = %110
  %165 = load ptr, ptr @baseAddress, align 8, !tbaa !5
  store ptr %165, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %166 = getelementptr inbounds [80 x i8], ptr %1, i64 0, i64 0
  store ptr %166, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !10
  br label %167

167:                                              ; preds = %172, %164
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  %169 = load i8, ptr %168, align 1, !tbaa !9
  %170 = sext i8 %169 to i32
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %178

172:                                              ; preds = %167
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %173, i32 1
  store ptr %174, ptr %16, align 8, !tbaa !5
  %175 = load i8, ptr %173, align 1, !tbaa !9
  %176 = load i32, ptr %17, align 4, !tbaa !10
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %17, align 4, !tbaa !10
  call void @putChar2VRAM(i8 noundef signext %175, i32 noundef %176, i32 noundef 17, i32 noundef 16777215, i32 noundef 0)
  br label %167, !llvm.loop !20

178:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %1) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12FormatParserC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #0 align 2

declare void @RPI_PropertyInit() #2

declare void @RPI_PropertyAddTag(i32 noundef, ...) #2

declare i32 @RPI_PropertyProcess() #2

declare ptr @RPI_PropertyGet(i32 noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @putChar2VRAM(i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

attributes #0 = { mustprogress 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 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}


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

%class.FormatParser = type { %class.Fsm, ptr, ptr, i32, i32, [1 x %struct.__va_list_tag] }
%class.Fsm = type { { i64, i64 } }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@baseAddress = external dso_local local_unnamed_addr global ptr, align 8
@_ZL11fontSet8x16 = external hidden local_unnamed_addr global <{ [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], <{ i8, i8, i8, i8, i8, i8, i8, [9 x i8] }>, [16 x i8], <{ i8, i8, i8, i8, [12 x i8] }>, [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8], [16 x i8] }>, align 16

; Function Attrs: mustprogress uwtable
define dso_local void @initDisplay() local_unnamed_addr #0 {
  %1 = alloca [80 x i8], align 16
  %2 = alloca %class.FormatParser, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #4
  call void @_ZN12FormatParserC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2)
  call void @RPI_PropertyInit()
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262145)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294915, i32 noundef 1280, i32 noundef 1024)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294916, i32 noundef 1280, i32 noundef 2048)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 294917, i32 noundef 32)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262152)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262147)
  call void (i32, ...) @RPI_PropertyAddTag(i32 noundef 262149)
  %3 = call i32 @RPI_PropertyProcess()
  %4 = call ptr @RPI_PropertyGet(i32 noundef 262147)
  %5 = call ptr @RPI_PropertyGet(i32 noundef 262149)
  %6 = call ptr @RPI_PropertyGet(i32 noundef 262152)
  %7 = call ptr @RPI_PropertyGet(i32 noundef 262145)
  %.not54 = icmp eq ptr %7, null
  br i1 %.not54, label %._crit_edge85, label %8

._crit_edge85:                                    ; preds = %0
  %.pre = load ptr, ptr @baseAddress, align 8, !tbaa !5
  br label %14

8:                                                ; preds = %0
  %9 = getelementptr inbounds i8, ptr %7, i64 8
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %11 = and i32 %10, 1073741823
  %12 = zext nneg i32 %11 to i64
  %13 = inttoptr i64 %12 to ptr
  store ptr %13, ptr @baseAddress, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %._crit_edge85, %8
  %15 = phi ptr [ %.pre, %._crit_edge85 ], [ %13, %8 ]
  br label %16

16:                                               ; preds = %16, %14
  %.04059 = phi ptr [ %15, %14 ], [ %26, %16 ]
  %.04158 = phi i32 [ 0, %14 ], [ %27, %16 ]
  %17 = getelementptr inbounds i8, ptr %.04059, i64 4
  store volatile i32 -1, ptr %.04059, align 4, !tbaa !10
  %18 = getelementptr inbounds i8, ptr %.04059, i64 8
  store volatile i32 -1, ptr %17, align 4, !tbaa !10
  %19 = getelementptr inbounds i8, ptr %.04059, i64 12
  store volatile i32 -1, ptr %18, align 4, !tbaa !10
  %20 = getelementptr inbounds i8, ptr %.04059, i64 16
  store volatile i32 -1, ptr %19, align 4, !tbaa !10
  %21 = getelementptr inbounds i8, ptr %.04059, i64 20
  store volatile i32 -1, ptr %20, align 4, !tbaa !10
  %22 = getelementptr inbounds i8, ptr %.04059, i64 24
  store volatile i32 -1, ptr %21, align 4, !tbaa !10
  %23 = getelementptr inbounds i8, ptr %.04059, i64 28
  store volatile i32 -1, ptr %22, align 4, !tbaa !10
  %24 = getelementptr inbounds i8, ptr %.04059, i64 32
  store volatile i32 -1, ptr %23, align 4, !tbaa !10
  %25 = getelementptr inbounds i8, ptr %.04059, i64 36
  store volatile i32 -1, ptr %24, align 4, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %.04059, i64 40
  store volatile i32 -1, ptr %25, align 4, !tbaa !10
  %27 = add nuw nsw i32 %.04158, 10
  %exitcond.not.9 = icmp eq i32 %27, 1280
  br i1 %exitcond.not.9, label %28, label %16, !llvm.loop !12

28:                                               ; preds = %16
  %29 = getelementptr inbounds i8, ptr %15, i64 5237760
  br label %30

30:                                               ; preds = %30, %28
  %.161 = phi ptr [ %29, %28 ], [ %40, %30 ]
  %.14260 = phi i32 [ 0, %28 ], [ %41, %30 ]
  %31 = getelementptr inbounds i8, ptr %.161, i64 4
  store volatile i32 -1, ptr %.161, align 4, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %.161, i64 8
  store volatile i32 -1, ptr %31, align 4, !tbaa !10
  %33 = getelementptr inbounds i8, ptr %.161, i64 12
  store volatile i32 -1, ptr %32, align 4, !tbaa !10
  %34 = getelementptr inbounds i8, ptr %.161, i64 16
  store volatile i32 -1, ptr %33, align 4, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %.161, i64 20
  store volatile i32 -1, ptr %34, align 4, !tbaa !10
  %36 = getelementptr inbounds i8, ptr %.161, i64 24
  store volatile i32 -1, ptr %35, align 4, !tbaa !10
  %37 = getelementptr inbounds i8, ptr %.161, i64 28
  store volatile i32 -1, ptr %36, align 4, !tbaa !10
  %38 = getelementptr inbounds i8, ptr %.161, i64 32
  store volatile i32 -1, ptr %37, align 4, !tbaa !10
  %39 = getelementptr inbounds i8, ptr %.161, i64 36
  store volatile i32 -1, ptr %38, align 4, !tbaa !10
  %40 = getelementptr inbounds i8, ptr %.161, i64 40
  store volatile i32 -1, ptr %39, align 4, !tbaa !10
  %41 = add nuw nsw i32 %.14260, 10
  %exitcond74.not.9 = icmp eq i32 %41, 1280
  br i1 %exitcond74.not.9, label %.preheader57, label %30, !llvm.loop !14

.preheader57:                                     ; preds = %30, %.preheader57
  %.263 = phi ptr [ %49, %.preheader57 ], [ %15, %30 ]
  %.24362 = phi i32 [ %50, %.preheader57 ], [ 0, %30 ]
  store volatile i32 -1, ptr %.263, align 4, !tbaa !10
  %42 = getelementptr inbounds i8, ptr %.263, i64 5120
  store volatile i32 -1, ptr %42, align 4, !tbaa !10
  %43 = getelementptr inbounds i8, ptr %.263, i64 10240
  store volatile i32 -1, ptr %43, align 4, !tbaa !10
  %44 = getelementptr inbounds i8, ptr %.263, i64 15360
  store volatile i32 -1, ptr %44, align 4, !tbaa !10
  %45 = getelementptr inbounds i8, ptr %.263, i64 20480
  store volatile i32 -1, ptr %45, align 4, !tbaa !10
  %46 = getelementptr inbounds i8, ptr %.263, i64 25600
  store volatile i32 -1, ptr %46, align 4, !tbaa !10
  %47 = getelementptr inbounds i8, ptr %.263, i64 30720
  store volatile i32 -1, ptr %47, align 4, !tbaa !10
  %48 = getelementptr inbounds i8, ptr %.263, i64 35840
  store volatile i32 -1, ptr %48, align 4, !tbaa !10
  %49 = getelementptr inbounds i8, ptr %.263, i64 40960
  %50 = add nuw nsw i32 %.24362, 8
  %exitcond75.not.7 = icmp eq i32 %50, 1024
  br i1 %exitcond75.not.7, label %51, label %.preheader57, !llvm.loop !15

51:                                               ; preds = %.preheader57
  %52 = getelementptr inbounds i8, ptr %15, i64 5116
  br label %53

53:                                               ; preds = %53, %51
  %.365 = phi ptr [ %52, %51 ], [ %61, %53 ]
  %.34464 = phi i32 [ 0, %51 ], [ %62, %53 ]
  store volatile i32 -1, ptr %.365, align 4, !tbaa !10
  %54 = getelementptr inbounds i8, ptr %.365, i64 5120
  store volatile i32 -1, ptr %54, align 4, !tbaa !10
  %55 = getelementptr inbounds i8, ptr %.365, i64 10240
  store volatile i32 -1, ptr %55, align 4, !tbaa !10
  %56 = getelementptr inbounds i8, ptr %.365, i64 15360
  store volatile i32 -1, ptr %56, align 4, !tbaa !10
  %57 = getelementptr inbounds i8, ptr %.365, i64 20480
  store volatile i32 -1, ptr %57, align 4, !tbaa !10
  %58 = getelementptr inbounds i8, ptr %.365, i64 25600
  store volatile i32 -1, ptr %58, align 4, !tbaa !10
  %59 = getelementptr inbounds i8, ptr %.365, i64 30720
  store volatile i32 -1, ptr %59, align 4, !tbaa !10
  %60 = getelementptr inbounds i8, ptr %.365, i64 35840
  store volatile i32 -1, ptr %60, align 4, !tbaa !10
  %61 = getelementptr inbounds i8, ptr %.365, i64 40960
  %62 = add nuw nsw i32 %.34464, 8
  %exitcond76.not.7 = icmp eq i32 %62, 1024
  br i1 %exitcond76.not.7, label %63, label %53, !llvm.loop !16

63:                                               ; preds = %53
  %64 = getelementptr inbounds i8, ptr %15, i64 102400
  br label %66

.preheader:                                       ; preds = %93
  %65 = load i8, ptr %1, align 16, !tbaa !9
  %.not5571 = icmp eq i8 %65, 0
  br i1 %.not5571, label %._crit_edge, label %.lr.ph

66:                                               ; preds = %63, %93
  %indvars.iv81 = phi i64 [ 0, %63 ], [ %indvars.iv.next82, %93 ]
  %.470 = phi ptr [ %64, %63 ], [ %94, %93 ]
  %67 = getelementptr inbounds [97 x [16 x i8]], ptr @_ZL11fontSet8x16, i64 0, i64 %indvars.iv81
  br label %68

68:                                               ; preds = %66, %68
  %indvars.iv = phi i64 [ 0, %66 ], [ %indvars.iv.next, %68 ]
  %69 = getelementptr inbounds i8, ptr %67, i64 %indvars.iv
  %invariant.gep.idx = mul i64 %indvars.iv, 5120
  %invariant.gep = getelementptr inbounds i8, ptr %.470, i64 %invariant.gep.idx
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = and i8 %70, 1
  %.not56 = icmp eq i8 %71, 0
  %72 = select i1 %.not56, i32 -16777216, i32 -1
  store volatile i32 %72, ptr %invariant.gep, align 4, !tbaa !10
  %73 = load i8, ptr %69, align 1, !tbaa !9
  %74 = and i8 %73, 2
  %.not56.1 = icmp eq i8 %74, 0
  %75 = select i1 %.not56.1, i32 -16777216, i32 -1
  %gep.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 4
  store volatile i32 %75, ptr %gep.1, align 4, !tbaa !10
  %76 = load i8, ptr %69, align 1, !tbaa !9
  %77 = and i8 %76, 4
  %.not56.2 = icmp eq i8 %77, 0
  %78 = select i1 %.not56.2, i32 -16777216, i32 -1
  %gep.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 8
  store volatile i32 %78, ptr %gep.2, align 4, !tbaa !10
  %79 = load i8, ptr %69, align 1, !tbaa !9
  %80 = and i8 %79, 8
  %.not56.3 = icmp eq i8 %80, 0
  %81 = select i1 %.not56.3, i32 -16777216, i32 -1
  %gep.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 12
  store volatile i32 %81, ptr %gep.3, align 4, !tbaa !10
  %82 = load i8, ptr %69, align 1, !tbaa !9
  %83 = and i8 %82, 16
  %.not56.4 = icmp eq i8 %83, 0
  %84 = select i1 %.not56.4, i32 -16777216, i32 -1
  %gep.4 = getelementptr inbounds i8, ptr %invariant.gep, i64 16
  store volatile i32 %84, ptr %gep.4, align 4, !tbaa !10
  %85 = load i8, ptr %69, align 1, !tbaa !9
  %86 = and i8 %85, 32
  %.not56.5 = icmp eq i8 %86, 0
  %87 = select i1 %.not56.5, i32 -16777216, i32 -1
  %gep.5 = getelementptr inbounds i8, ptr %invariant.gep, i64 20
  store volatile i32 %87, ptr %gep.5, align 4, !tbaa !10
  %88 = load i8, ptr %69, align 1, !tbaa !9
  %89 = and i8 %88, 64
  %.not56.6 = icmp eq i8 %89, 0
  %90 = select i1 %.not56.6, i32 -16777216, i32 -1
  %gep.6 = getelementptr inbounds i8, ptr %invariant.gep, i64 24
  store volatile i32 %90, ptr %gep.6, align 4, !tbaa !10
  %91 = load i8, ptr %69, align 1, !tbaa !9
  %.not56.7 = icmp sgt i8 %91, -1
  %92 = select i1 %.not56.7, i32 -16777216, i32 -1
  %gep.7 = getelementptr inbounds i8, ptr %invariant.gep, i64 28
  store volatile i32 %92, ptr %gep.7, align 4, !tbaa !10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next, 16
  br i1 %exitcond80.not, label %93, label %68, !llvm.loop !17

93:                                               ; preds = %68
  %94 = getelementptr inbounds i8, ptr %.470, i64 32
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next82, 90
  br i1 %exitcond84.not, label %.preheader, label %66, !llvm.loop !18

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %95 = phi i8 [ %98, %.lr.ph ], [ %65, %.preheader ]
  %.073 = phi i32 [ %97, %.lr.ph ], [ 1, %.preheader ]
  %.03872 = phi ptr [ %96, %.lr.ph ], [ %1, %.preheader ]
  %96 = getelementptr inbounds i8, ptr %.03872, i64 1
  %97 = add nuw nsw i32 %.073, 1
  call void @putChar2VRAM(i8 noundef signext %95, i32 noundef %.073, i32 noundef 17, i32 noundef 16777215, i32 noundef 0)
  %98 = load i8, ptr %96, align 1, !tbaa !9
  %.not55 = icmp eq i8 %98, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #4
  ret void
}

; 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 uwtable
declare dso_local void @_ZN12FormatParserC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #0 align 2

declare void @RPI_PropertyInit() local_unnamed_addr #2

declare void @RPI_PropertyAddTag(i32 noundef, ...) local_unnamed_addr #2

declare i32 @RPI_PropertyProcess() local_unnamed_addr #2

declare ptr @RPI_PropertyGet(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @putChar2VRAM(i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress 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 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass