; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/ShellPkg/Library (HBufferImageRefresh)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.HEFI_EDITOR_BUFFER_IMAGE = type { ptr, ptr, i64, ptr, %struct.HEFI_EDITOR_POSITION, %struct.HEFI_EDITOR_POSITION, %struct.HEFI_EDITOR_POSITION, i64, i8, i8, i32, ptr, ptr, ptr }
%struct.HEFI_EDITOR_POSITION = type { i64, i64 }
%struct.HEFI_EDITOR_GLOBAL_EDITOR = type { ptr, %union.HEFI_EDITOR_COLOR_UNION, %struct.HEFI_EDITOR_POSITION, i8, ptr, i32, i32, i64, i64 }
%union.HEFI_EDITOR_COLOR_UNION = type { i64 }
%struct.EFI_SYSTEM_TABLE = type { %struct.EFI_TABLE_HEADER, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct._EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._HEFI_EDITOR_LINE = type { i64, [16 x i8], i64, %struct._LIST_ENTRY }
%struct._LIST_ENTRY = type { ptr, ptr }

@HBufferImage = external dso_local global %struct.HEFI_EDITOR_BUFFER_IMAGE, align 8
@HBufferImageNeedRefresh = external dso_local global i8, align 1
@HBufferImageOnlyLineNeedRefresh = external dso_local global i8, align 1
@HBufferImageBackupVar = external dso_local global %struct.HEFI_EDITOR_BUFFER_IMAGE, align 8
@HMainEditor = external global %struct.HEFI_EDITOR_GLOBAL_EDITOR, align 8
@HEditorMouseAction = external global i8, align 1
@gST = external global ptr, align 8
@HEditorFirst = external global i8, align 1
@HMainEditorBackupVar = external global %struct.HEFI_EDITOR_GLOBAL_EDITOR, align 8
@.str.10 = external hidden unnamed_addr constant [167 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImagePrintLine(ptr noundef, i64 noundef, i64 noundef, i64, i64) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImageRestoreMousePosition() #2

declare ptr @HMoveLine(i64 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImageRestorePosition() #2

; Function Attrs: nounwind uwtable
define dso_local i64 @HBufferImageRefresh() #2 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %union.HEFI_EDITOR_COLOR_UNION, align 8
  %6 = alloca %union.HEFI_EDITOR_COLOR_UNION, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 1), i64 8, i1 false), !tbaa.struct !5
  store i64 0, ptr %6, align 8, !tbaa !6
  %12 = load i8, ptr %5, align 8
  %13 = lshr i8 %12, 4
  %14 = zext i8 %13 to i32
  %15 = trunc i32 %14 to i8
  %16 = load i8, ptr %6, align 8
  %17 = and i8 %15, 15
  %18 = and i8 %16, -16
  %19 = or i8 %18, %17
  store i8 %19, ptr %6, align 8
  %20 = zext i8 %17 to i32
  %21 = load i8, ptr %5, align 8
  %22 = and i8 %21, 15
  %23 = zext i8 %22 to i32
  %24 = trunc i32 %23 to i8
  %25 = load i8, ptr %6, align 8
  %26 = and i8 %24, 15
  %27 = shl i8 %26, 4
  %28 = and i8 %25, 15
  %29 = or i8 %28, %27
  store i8 %29, ptr %6, align 8
  %30 = zext i8 %26 to i32
  %31 = load i8, ptr @HEditorFirst, align 1, !tbaa !6
  %32 = zext i8 %31 to i32
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %48

34:                                               ; preds = %0
  %35 = load i8, ptr @HBufferImageNeedRefresh, align 1, !tbaa !6
  %36 = icmp ne i8 %35, 0
  br i1 %36, label %47, label %37

37:                                               ; preds = %34
  %38 = load i8, ptr @HBufferImageOnlyLineNeedRefresh, align 1, !tbaa !6
  %39 = icmp ne i8 %38, 0
  br i1 %39, label %47, label %40

40:                                               ; preds = %37
  %41 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImageBackupVar, i32 0, i32 7), align 8, !tbaa !9
  %42 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  %43 = icmp eq i64 %41, %42
  br i1 %43, label %44, label %47

44:                                               ; preds = %40
  %45 = call i64 @HBufferImageRestoreMousePosition()
  %46 = call i64 @HBufferImageRestorePosition()
  store i64 0, ptr %1, align 8
  store i32 1, ptr %11, align 4
  br label %254

47:                                               ; preds = %40, %37, %34
  br label %48

48:                                               ; preds = %47, %0
  %49 = load ptr, ptr @gST, align 8, !tbaa !15
  %50 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %49, i32 0, i32 6
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = getelementptr inbounds %struct._EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL, ptr %51, i32 0, i32 8
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr @gST, align 8, !tbaa !15
  %55 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %54, i32 0, i32 6
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = call i64 %53(ptr noundef %56, i8 noundef zeroext 0)
  %58 = load i8, ptr @HBufferImageOnlyLineNeedRefresh, align 1, !tbaa !6
  %59 = zext i8 %58 to i32
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %74

61:                                               ; preds = %48
  %62 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImageBackupVar, i32 0, i32 7), align 8, !tbaa !9
  %63 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  %64 = icmp eq i64 %62, %63
  br i1 %64, label %65, label %74

65:                                               ; preds = %61
  %66 = load ptr, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 3), align 8, !tbaa !21
  %67 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 4), align 8, !tbaa !22
  %68 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 6), align 8, !tbaa !23
  %69 = getelementptr inbounds %union.HEFI_EDITOR_COLOR_UNION, ptr %5, i32 0, i32 0
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds %union.HEFI_EDITOR_COLOR_UNION, ptr %6, i32 0, i32 0
  %72 = load i64, ptr %71, align 8
  %73 = call i64 @HBufferImagePrintLine(ptr noundef %66, i64 noundef %67, i64 noundef %68, i64 %70, i64 %72)
  br label %242

74:                                               ; preds = %61, %48
  %75 = load i8, ptr @HEditorMouseAction, align 1, !tbaa !6
  %76 = zext i8 %75 to i32
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %143

78:                                               ; preds = %74
  %79 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 7), align 8, !tbaa !24
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %143

81:                                               ; preds = %78
  %82 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 8), align 8, !tbaa !26
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %84, label %143

84:                                               ; preds = %81
  %85 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 7), align 8, !tbaa !24
  %86 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 7), align 8, !tbaa !24
  %87 = icmp ne i64 %85, %86
  br i1 %87, label %88, label %106

88:                                               ; preds = %84
  %89 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 7), align 8, !tbaa !24
  %90 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 7), align 8, !tbaa !24
  %91 = icmp uge i64 %89, %90
  br i1 %91, label %92, label %100

92:                                               ; preds = %88
  %93 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 7), align 8, !tbaa !24
  %94 = icmp ne i64 %93, 0
  br i1 %94, label %95, label %100

95:                                               ; preds = %92
  %96 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 7), align 8, !tbaa !24
  %97 = sub i64 %96, 1
  %98 = udiv i64 %97, 16
  %99 = add i64 %98, 1
  store i64 %99, ptr %7, align 8, !tbaa !27
  br label %105

100:                                              ; preds = %92, %88
  %101 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 7), align 8, !tbaa !24
  %102 = sub i64 %101, 1
  %103 = udiv i64 %102, 16
  %104 = add i64 %103, 1
  store i64 %104, ptr %7, align 8, !tbaa !27
  br label %105

105:                                              ; preds = %100, %95
  br label %111

106:                                              ; preds = %84
  %107 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 7), align 8, !tbaa !24
  %108 = sub i64 %107, 1
  %109 = udiv i64 %108, 16
  %110 = add i64 %109, 1
  store i64 %110, ptr %7, align 8, !tbaa !27
  br label %111

111:                                              ; preds = %106, %105
  %112 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 8), align 8, !tbaa !26
  %113 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 8), align 8, !tbaa !26
  %114 = icmp ule i64 %112, %113
  br i1 %114, label %115, label %120

115:                                              ; preds = %111
  %116 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditorBackupVar, i32 0, i32 8), align 8, !tbaa !26
  %117 = sub i64 %116, 1
  %118 = udiv i64 %117, 16
  %119 = add i64 %118, 1
  store i64 %119, ptr %8, align 8, !tbaa !27
  br label %125

120:                                              ; preds = %111
  %121 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 8), align 8, !tbaa !26
  %122 = sub i64 %121, 1
  %123 = udiv i64 %122, 16
  %124 = add i64 %123, 1
  store i64 %124, ptr %8, align 8, !tbaa !27
  br label %125

125:                                              ; preds = %120, %115
  %126 = load i64, ptr %7, align 8, !tbaa !27
  %127 = load i64, ptr %8, align 8, !tbaa !27
  %128 = icmp ugt i64 %126, %127
  br i1 %128, label %129, label %133

129:                                              ; preds = %125
  %130 = load i64, ptr %7, align 8, !tbaa !27
  store i64 %130, ptr %10, align 8, !tbaa !27
  %131 = load i64, ptr %8, align 8, !tbaa !27
  store i64 %131, ptr %7, align 8, !tbaa !27
  %132 = load i64, ptr %10, align 8, !tbaa !27
  store i64 %132, ptr %8, align 8, !tbaa !27
  br label %133

133:                                              ; preds = %129, %125
  %134 = load i64, ptr %7, align 8, !tbaa !27
  store i64 %134, ptr %9, align 8, !tbaa !27
  %135 = load i64, ptr %7, align 8, !tbaa !27
  %136 = add i64 2, %135
  %137 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  %138 = sub i64 %136, %137
  store i64 %138, ptr %7, align 8, !tbaa !27
  %139 = load i64, ptr %8, align 8, !tbaa !27
  %140 = add i64 2, %139
  %141 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  %142 = sub i64 %140, %141
  store i64 %142, ptr %8, align 8, !tbaa !27
  br label %147

143:                                              ; preds = %81, %78, %74
  %144 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  store i64 %144, ptr %9, align 8, !tbaa !27
  store i64 2, ptr %7, align 8, !tbaa !27
  %145 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 2), align 8, !tbaa !28
  %146 = sub i64 %145, 1
  store i64 %146, ptr %8, align 8, !tbaa !27
  br label %147

147:                                              ; preds = %143, %133
  %148 = load ptr, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 1), align 8, !tbaa !29
  %149 = icmp eq ptr %148, null
  br i1 %149, label %150, label %162

150:                                              ; preds = %147
  %151 = call i64 @HBufferImageRestoreMousePosition()
  %152 = call i64 @HBufferImageRestorePosition()
  %153 = load ptr, ptr @gST, align 8, !tbaa !15
  %154 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %153, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !16
  %156 = getelementptr inbounds %struct._EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL, ptr %155, i32 0, i32 8
  %157 = load ptr, ptr %156, align 8, !tbaa !19
  %158 = load ptr, ptr @gST, align 8, !tbaa !15
  %159 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %158, i32 0, i32 6
  %160 = load ptr, ptr %159, align 8, !tbaa !16
  %161 = call i64 %157(ptr noundef %160, i8 noundef zeroext 1)
  store i64 0, ptr %1, align 8
  store i32 1, ptr %11, align 4
  br label %254

162:                                              ; preds = %147
  %163 = load i64, ptr %9, align 8, !tbaa !27
  %164 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 6), align 8, !tbaa !23
  %165 = sub i64 %163, %164
  %166 = call ptr @HMoveLine(i64 noundef %165)
  store ptr %166, ptr %3, align 8, !tbaa !15
  %167 = load ptr, ptr %3, align 8, !tbaa !15
  %168 = icmp eq ptr %167, null
  br i1 %168, label %169, label %179

169:                                              ; preds = %162
  %170 = load ptr, ptr @gST, align 8, !tbaa !15
  %171 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %170, i32 0, i32 6
  %172 = load ptr, ptr %171, align 8, !tbaa !16
  %173 = getelementptr inbounds %struct._EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL, ptr %172, i32 0, i32 8
  %174 = load ptr, ptr %173, align 8, !tbaa !19
  %175 = load ptr, ptr @gST, align 8, !tbaa !15
  %176 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %175, i32 0, i32 6
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = call i64 %174(ptr noundef %177, i8 noundef zeroext 1)
  store i64 -9223372036854775807, ptr %1, align 8
  store i32 1, ptr %11, align 4
  br label %254

179:                                              ; preds = %162
  %180 = load ptr, ptr %3, align 8, !tbaa !15
  %181 = getelementptr inbounds %struct._HEFI_EDITOR_LINE, ptr %180, i32 0, i32 3
  store ptr %181, ptr %2, align 8, !tbaa !15
  %182 = load i64, ptr %7, align 8, !tbaa !27
  store i64 %182, ptr %4, align 8, !tbaa !27
  br label %183

183:                                              ; preds = %228, %179
  %184 = call zeroext i8 @DebugAssertEnabled()
  %185 = zext i8 %184 to i32
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %197

187:                                              ; preds = %183
  %188 = load ptr, ptr %2, align 8, !tbaa !15
  %189 = ptrtoint ptr %188 to i64
  %190 = sub i64 %189, ptrtoint (ptr getelementptr inbounds (%struct._HEFI_EDITOR_LINE, ptr null, i32 0, i32 3) to i64)
  %191 = inttoptr i64 %190 to ptr
  %192 = getelementptr inbounds %struct._HEFI_EDITOR_LINE, ptr %191, i32 0, i32 0
  %193 = load i64, ptr %192, align 8, !tbaa !30
  %194 = icmp ne i64 %193, 1819043173
  br i1 %194, label %195, label %197

195:                                              ; preds = %187
  call void @DebugAssert(ptr noundef @.str.10, i64 noundef 858, ptr noundef @.str.11)
  %196 = load ptr, ptr %2, align 8, !tbaa !15
  br label %202

197:                                              ; preds = %187, %183
  %198 = load ptr, ptr %2, align 8, !tbaa !15
  %199 = ptrtoint ptr %198 to i64
  %200 = sub i64 %199, ptrtoint (ptr getelementptr inbounds (%struct._HEFI_EDITOR_LINE, ptr null, i32 0, i32 3) to i64)
  %201 = inttoptr i64 %200 to ptr
  br label %202

202:                                              ; preds = %197, %195
  %203 = phi ptr [ %196, %195 ], [ %201, %197 ]
  store ptr %203, ptr %3, align 8, !tbaa !15
  %204 = load ptr, ptr %3, align 8, !tbaa !15
  %205 = load i64, ptr %4, align 8, !tbaa !27
  %206 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_BUFFER_IMAGE, ptr @HBufferImage, i32 0, i32 7), align 8, !tbaa !9
  %207 = load i64, ptr %4, align 8, !tbaa !27
  %208 = add i64 %206, %207
  %209 = sub i64 %208, 2
  %210 = getelementptr inbounds %union.HEFI_EDITOR_COLOR_UNION, ptr %5, i32 0, i32 0
  %211 = load i64, ptr %210, align 8
  %212 = getelementptr inbounds %union.HEFI_EDITOR_COLOR_UNION, ptr %6, i32 0, i32 0
  %213 = load i64, ptr %212, align 8
  %214 = call i64 @HBufferImagePrintLine(ptr noundef %204, i64 noundef %205, i64 noundef %209, i64 %211, i64 %213)
  %215 = load ptr, ptr %2, align 8, !tbaa !15
  %216 = getelementptr inbounds %struct._LIST_ENTRY, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !33
  store ptr %217, ptr %2, align 8, !tbaa !15
  %218 = load i64, ptr %4, align 8, !tbaa !27
  %219 = add i64 %218, 1
  store i64 %219, ptr %4, align 8, !tbaa !27
  br label %220

220:                                              ; preds = %202
  %221 = load ptr, ptr %2, align 8, !tbaa !15
  %222 = load ptr, ptr @HBufferImage, align 8, !tbaa !34
  %223 = icmp ne ptr %221, %222
  br i1 %223, label %224, label %228

224:                                              ; preds = %220
  %225 = load i64, ptr %4, align 8, !tbaa !27
  %226 = load i64, ptr %8, align 8, !tbaa !27
  %227 = icmp ule i64 %225, %226
  br label %228

228:                                              ; preds = %224, %220
  %229 = phi i1 [ false, %220 ], [ %227, %224 ]
  br i1 %229, label %183, label %230, !llvm.loop !35

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %235, %230
  %232 = load i64, ptr %4, align 8, !tbaa !27
  %233 = load i64, ptr %8, align 8, !tbaa !27
  %234 = icmp ule i64 %232, %233
  br i1 %234, label %235, label %241

235:                                              ; preds = %231
  %236 = load i64, ptr %4, align 8, !tbaa !27
  %237 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_POSITION, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 2), i32 0, i32 1), align 8, !tbaa !37
  %238 = load i64, ptr getelementptr inbounds (%struct.HEFI_EDITOR_GLOBAL_EDITOR, ptr @HMainEditor, i32 0, i32 2), align 8, !tbaa !28
  call void @EditorClearLine(i64 noundef %236, i64 noundef %237, i64 noundef %238)
  %239 = load i64, ptr %4, align 8, !tbaa !27
  %240 = add i64 %239, 1
  store i64 %240, ptr %4, align 8, !tbaa !27
  br label %231, !llvm.loop !38

241:                                              ; preds = %231
  br label %242

242:                                              ; preds = %241, %65
  %243 = call i64 @HBufferImageRestoreMousePosition()
  %244 = call i64 @HBufferImageRestorePosition()
  store i8 0, ptr @HBufferImageNeedRefresh, align 1, !tbaa !6
  store i8 0, ptr @HBufferImageOnlyLineNeedRefresh, align 1, !tbaa !6
  %245 = load ptr, ptr @gST, align 8, !tbaa !15
  %246 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %245, i32 0, i32 6
  %247 = load ptr, ptr %246, align 8, !tbaa !16
  %248 = getelementptr inbounds %struct._EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL, ptr %247, i32 0, i32 8
  %249 = load ptr, ptr %248, align 8, !tbaa !19
  %250 = load ptr, ptr @gST, align 8, !tbaa !15
  %251 = getelementptr inbounds %struct.EFI_SYSTEM_TABLE, ptr %250, i32 0, i32 6
  %252 = load ptr, ptr %251, align 8, !tbaa !16
  %253 = call i64 %249(ptr noundef %252, i8 noundef zeroext 1)
  store i64 0, ptr %1, align 8
  store i32 1, ptr %11, align 4
  br label %254

254:                                              ; preds = %242, %169, %150, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  %255 = load i64, ptr %1, align 8
  ret i64 %255
}

declare zeroext i8 @DebugAssertEnabled() #3

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #3

declare void @EditorClearLine(i64 noundef, i64 noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 = !{i64 0, i64 8, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 80}
!10 = !{!"", !11, i64 0, !11, i64 8, !12, i64 16, !11, i64 24, !13, i64 32, !13, i64 48, !13, i64 64, !12, i64 80, !7, i64 88, !7, i64 89, !14, i64 92, !11, i64 96, !11, i64 104, !11, i64 112}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !11, i64 64}
!17 = !{!"", !18, i64 0, !11, i64 24, !14, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !12, i64 104, !11, i64 112}
!18 = !{!"", !12, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!19 = !{!20, !11, i64 64}
!20 = !{!"_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72}
!21 = !{!10, !11, i64 24}
!22 = !{!10, !12, i64 32}
!23 = !{!10, !12, i64 64}
!24 = !{!25, !12, i64 56}
!25 = !{!"", !11, i64 0, !7, i64 8, !13, i64 16, !7, i64 32, !11, i64 40, !14, i64 48, !14, i64 52, !12, i64 56, !12, i64 64}
!26 = !{!25, !12, i64 64}
!27 = !{!12, !12, i64 0}
!28 = !{!25, !12, i64 16}
!29 = !{!10, !11, i64 8}
!30 = !{!31, !12, i64 0}
!31 = !{!"_HEFI_EDITOR_LINE", !12, i64 0, !7, i64 8, !12, i64 24, !32, i64 32}
!32 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!33 = !{!32, !11, i64 0}
!34 = !{!10, !11, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!25, !12, i64 24}
!38 = distinct !{!38, !36}


; 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.HEFI_EDITOR_BUFFER_IMAGE = type { ptr, ptr, i64, ptr, %struct.HEFI_EDITOR_POSITION, %struct.HEFI_EDITOR_POSITION, %struct.HEFI_EDITOR_POSITION, i64, i8, i8, i32, ptr, ptr, ptr }
%struct.HEFI_EDITOR_POSITION = type { i64, i64 }
%struct.HEFI_EDITOR_GLOBAL_EDITOR = type { ptr, %union.HEFI_EDITOR_COLOR_UNION, %struct.HEFI_EDITOR_POSITION, i8, ptr, i32, i32, i64, i64 }
%union.HEFI_EDITOR_COLOR_UNION = type { i64 }

@HBufferImage = external dso_local local_unnamed_addr global %struct.HEFI_EDITOR_BUFFER_IMAGE, align 8
@HBufferImageNeedRefresh = external dso_local local_unnamed_addr global i8, align 1
@HBufferImageOnlyLineNeedRefresh = external dso_local local_unnamed_addr global i8, align 1
@HBufferImageBackupVar = external dso_local local_unnamed_addr global %struct.HEFI_EDITOR_BUFFER_IMAGE, align 8
@HMainEditor = external local_unnamed_addr global %struct.HEFI_EDITOR_GLOBAL_EDITOR, align 8
@HEditorMouseAction = external local_unnamed_addr global i8, align 1
@gST = external local_unnamed_addr global ptr, align 8
@HEditorFirst = external local_unnamed_addr global i8, align 1
@HMainEditorBackupVar = external local_unnamed_addr global %struct.HEFI_EDITOR_GLOBAL_EDITOR, align 8
@.str.10 = external hidden unnamed_addr constant [167 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImagePrintLine(ptr noundef, i64 noundef, i64 noundef, i64, i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImageRestoreMousePosition() local_unnamed_addr #0

declare ptr @HMoveLine(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @HBufferImageRestorePosition() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775807, 1) i64 @HBufferImageRefresh() local_unnamed_addr #0 {
  %.sroa.031.0.copyload = load i8, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 8), align 8
  %.sroa.7.sroa.0.0.copyload = load i56, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 9), align 1, !tbaa !5
  %1 = tail call i8 @llvm.fshl.i8(i8 %.sroa.031.0.copyload, i8 %.sroa.031.0.copyload, i8 4)
  %2 = load i8, ptr @HEditorFirst, align 1, !tbaa !5
  %3 = icmp eq i8 %2, 0
  br i1 %3, label %4, label %16

4:                                                ; preds = %0
  %5 = load i8, ptr @HBufferImageNeedRefresh, align 1, !tbaa !5
  %6 = icmp ne i8 %5, 0
  %7 = load i8, ptr @HBufferImageOnlyLineNeedRefresh, align 1
  %8 = icmp ne i8 %7, 0
  %or.cond = select i1 %6, i1 true, i1 %8
  br i1 %or.cond, label %16, label %9

9:                                                ; preds = %4
  %10 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImageBackupVar, i64 80), align 8, !tbaa !8
  %11 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 80), align 8, !tbaa !8
  %12 = icmp eq i64 %10, %11
  br i1 %12, label %13, label %16

13:                                               ; preds = %9
  %14 = tail call i64 @HBufferImageRestoreMousePosition()
  %15 = tail call i64 @HBufferImageRestorePosition()
  br label %105

16:                                               ; preds = %4, %9, %0
  %17 = load ptr, ptr @gST, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %17, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %19, i64 64
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  %22 = tail call i64 %21(ptr noundef %19, i8 noundef zeroext 0) #3
  %23 = load i8, ptr @HBufferImageOnlyLineNeedRefresh, align 1, !tbaa !5
  %.not = icmp eq i8 %23, 0
  br i1 %.not, label %33, label %24

24:                                               ; preds = %16
  %25 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImageBackupVar, i64 80), align 8, !tbaa !8
  %26 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 80), align 8, !tbaa !8
  %27 = icmp eq i64 %25, %26
  br i1 %27, label %28, label %33

28:                                               ; preds = %24
  %29 = load ptr, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 24), align 8, !tbaa !20
  %30 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 32), align 8, !tbaa !21
  %31 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 64), align 8, !tbaa !22
  %.sroa.7.0.insert.ext = zext i56 %.sroa.7.sroa.0.0.copyload to i64
  %.sroa.7.0.insert.shift = shl nuw i64 %.sroa.7.0.insert.ext, 8
  %.sroa.031.0.insert.ext = zext i8 %.sroa.031.0.copyload to i64
  %.sroa.031.0.insert.insert = or disjoint i64 %.sroa.7.0.insert.shift, %.sroa.031.0.insert.ext
  %.sroa.0.0.insert.ext = zext i8 %1 to i64
  %32 = tail call i64 @HBufferImagePrintLine(ptr noundef %29, i64 noundef %30, i64 noundef %31, i64 %.sroa.031.0.insert.insert, i64 %.sroa.0.0.insert.ext)
  br label %.loopexit

33:                                               ; preds = %24, %16
  %34 = load i8, ptr @HEditorMouseAction, align 1, !tbaa !5
  %35 = icmp ne i8 %34, 0
  %36 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 56), align 8
  %37 = icmp ne i64 %36, 0
  %or.cond3 = select i1 %35, i1 %37, i1 false
  %38 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 64), align 8
  %39 = icmp ne i64 %38, 0
  %or.cond5 = select i1 %or.cond3, i1 %39, i1 false
  br i1 %or.cond5, label %40, label %48

40:                                               ; preds = %33
  %41 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditorBackupVar, i64 56), align 8
  %.not74 = icmp eq i64 %36, %41
  %42 = add i64 %41, -1
  %or.cond7 = icmp ult i64 %42, %36
  %. = select i1 %or.cond7, i64 %41, i64 %36
  %.061.in.in.in = select i1 %.not74, i64 %36, i64 %.
  %.061.in.in = add i64 %.061.in.in.in, -1
  %.061.in = lshr i64 %.061.in.in, 4
  %.061 = add nuw nsw i64 %.061.in, 1
  %43 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditorBackupVar, i64 64), align 8, !tbaa !23
  %.060.in.in.in = tail call i64 @llvm.umax.i64(i64 %38, i64 %43)
  %.060.in.in = add i64 %.060.in.in.in, -1
  %.060.in = lshr i64 %.060.in.in, 4
  %.060 = add nuw nsw i64 %.060.in, 1
  %44 = icmp ugt i64 %.061.in, %.060.in
  %.162 = select i1 %44, i64 %.060, i64 %.061
  %.1 = select i1 %44, i64 %.061, i64 %.060
  %45 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 80), align 8, !tbaa !8
  %reass.sub = sub i64 %.162, %45
  %46 = add i64 %reass.sub, 2
  %reass.sub81 = sub i64 %.1, %45
  %47 = add i64 %reass.sub81, 2
  br label %52

48:                                               ; preds = %33
  %49 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 80), align 8, !tbaa !8
  %50 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 16), align 8, !tbaa !25
  %51 = add i64 %50, -1
  br label %52

52:                                               ; preds = %48, %40
  %.263 = phi i64 [ %46, %40 ], [ 2, %48 ]
  %.2 = phi i64 [ %47, %40 ], [ %51, %48 ]
  %.059 = phi i64 [ %.162, %40 ], [ %49, %48 ]
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 8), align 8, !tbaa !26
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %64

55:                                               ; preds = %52
  %56 = tail call i64 @HBufferImageRestoreMousePosition()
  %57 = tail call i64 @HBufferImageRestorePosition()
  %58 = load ptr, ptr @gST, align 8, !tbaa !14
  %59 = getelementptr inbounds i8, ptr %58, i64 64
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %60, i64 64
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = tail call i64 %62(ptr noundef %60, i8 noundef zeroext 1) #3
  br label %105

64:                                               ; preds = %52
  %65 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 64), align 8, !tbaa !22
  %66 = sub i64 %.059, %65
  %67 = tail call ptr @HMoveLine(i64 noundef %66) #3
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %76

69:                                               ; preds = %64
  %70 = load ptr, ptr @gST, align 8, !tbaa !14
  %71 = getelementptr inbounds i8, ptr %70, i64 64
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %72, i64 64
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = tail call i64 %74(ptr noundef %72, i8 noundef zeroext 1) #3
  br label %105

76:                                               ; preds = %64
  %77 = getelementptr inbounds i8, ptr %67, i64 32
  %.sroa.7.0.insert.ext39 = zext i56 %.sroa.7.sroa.0.0.copyload to i64
  %.sroa.7.0.insert.shift40 = shl nuw i64 %.sroa.7.0.insert.ext39, 8
  %.sroa.031.0.insert.ext35 = zext i8 %.sroa.031.0.copyload to i64
  %.sroa.031.0.insert.insert37 = or disjoint i64 %.sroa.7.0.insert.shift40, %.sroa.031.0.insert.ext35
  %.sroa.0.0.insert.ext22 = zext i8 %1 to i64
  br label %78

78:                                               ; preds = %._crit_edge, %76
  %.065 = phi i64 [ %.263, %76 ], [ %89, %._crit_edge ]
  %.064 = phi ptr [ %77, %76 ], [ %88, %._crit_edge ]
  %79 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not76 = icmp eq i8 %79, 0
  %.pre = ptrtoint ptr %.064 to i64
  %.pre82 = add i64 %.pre, -32
  %.pre84 = inttoptr i64 %.pre82 to ptr
  br i1 %.not76, label %._crit_edge, label %80

80:                                               ; preds = %78
  %81 = load i64, ptr %.pre84, align 8, !tbaa !27
  %.not77 = icmp eq i64 %81, 1819043173
  br i1 %.not77, label %._crit_edge, label %82

82:                                               ; preds = %80
  tail call void @DebugAssert(ptr noundef nonnull @.str.10, i64 noundef 858, ptr noundef nonnull @.str.11) #3
  br label %._crit_edge

._crit_edge:                                      ; preds = %78, %80, %82
  %83 = phi ptr [ %.064, %82 ], [ %.pre84, %80 ], [ %.pre84, %78 ]
  %84 = load i64, ptr getelementptr inbounds (i8, ptr @HBufferImage, i64 80), align 8, !tbaa !8
  %85 = add i64 %.065, -2
  %86 = add i64 %85, %84
  %87 = tail call i64 @HBufferImagePrintLine(ptr noundef %83, i64 noundef %.065, i64 noundef %86, i64 %.sroa.031.0.insert.insert37, i64 %.sroa.0.0.insert.ext22)
  %88 = load ptr, ptr %.064, align 8, !tbaa !30
  %89 = add i64 %.065, 1
  %90 = load ptr, ptr @HBufferImage, align 8, !tbaa !31
  %91 = icmp ne ptr %88, %90
  %92 = icmp ule i64 %89, %.2
  %93 = select i1 %91, i1 %92, i1 false
  br i1 %93, label %78, label %.preheader, !llvm.loop !32

.preheader:                                       ; preds = %._crit_edge
  %.not7879 = icmp ugt i64 %89, %.2
  br i1 %.not7879, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.16680 = phi i64 [ %96, %.lr.ph ], [ %89, %.preheader ]
  %94 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 24), align 8, !tbaa !34
  %95 = load i64, ptr getelementptr inbounds (i8, ptr @HMainEditor, i64 16), align 8, !tbaa !25
  tail call void @EditorClearLine(i64 noundef %.16680, i64 noundef %94, i64 noundef %95) #3
  %96 = add i64 %.16680, 1
  %.not78 = icmp ugt i64 %96, %.2
  br i1 %.not78, label %.loopexit, label %.lr.ph, !llvm.loop !35

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %28
  %97 = tail call i64 @HBufferImageRestoreMousePosition()
  %98 = tail call i64 @HBufferImageRestorePosition()
  store i8 0, ptr @HBufferImageNeedRefresh, align 1, !tbaa !5
  store i8 0, ptr @HBufferImageOnlyLineNeedRefresh, align 1, !tbaa !5
  %99 = load ptr, ptr @gST, align 8, !tbaa !14
  %100 = getelementptr inbounds i8, ptr %99, i64 64
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = getelementptr inbounds i8, ptr %101, i64 64
  %103 = load ptr, ptr %102, align 8, !tbaa !18
  %104 = tail call i64 %103(ptr noundef %101, i8 noundef zeroext 1) #3
  br label %105

105:                                              ; preds = %.loopexit, %69, %55, %13
  %.0 = phi i64 [ 0, %.loopexit ], [ 0, %55 ], [ -9223372036854775807, %69 ], [ 0, %13 ]
  ret i64 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @EditorClearLine(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.fshl.i8(i8, i8, i8) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !11, i64 80}
!9 = !{!"", !10, i64 0, !10, i64 8, !11, i64 16, !10, i64 24, !12, i64 32, !12, i64 48, !12, i64 64, !11, i64 80, !6, i64 88, !6, i64 89, !13, i64 92, !10, i64 96, !10, i64 104, !10, i64 112}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"long long", !6, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 8}
!13 = !{!"int", !6, i64 0}
!14 = !{!10, !10, i64 0}
!15 = !{!16, !10, i64 64}
!16 = !{!"", !17, i64 0, !10, i64 24, !13, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !11, i64 104, !10, i64 112}
!17 = !{!"", !11, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!18 = !{!19, !10, i64 64}
!19 = !{!"_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!20 = !{!9, !10, i64 24}
!21 = !{!9, !11, i64 32}
!22 = !{!9, !11, i64 64}
!23 = !{!24, !11, i64 64}
!24 = !{!"", !10, i64 0, !6, i64 8, !12, i64 16, !6, i64 32, !10, i64 40, !13, i64 48, !13, i64 52, !11, i64 56, !11, i64 64}
!25 = !{!24, !11, i64 16}
!26 = !{!9, !10, i64 8}
!27 = !{!28, !11, i64 0}
!28 = !{!"_HEFI_EDITOR_LINE", !11, i64 0, !6, i64 8, !11, i64 24, !29, i64 32}
!29 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!30 = !{!29, !10, i64 0}
!31 = !{!9, !10, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!24, !11, i64 24}
!35 = distinct !{!35, !33}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass