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

; 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.EFI_EDITOR_FILE_BUFFER = type { ptr, i32, ptr, ptr, i64, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, i8, i8, i8, ptr }
%struct.EFI_EDITOR_POSITION = type { i64, i64 }
%struct._EFI_EDITOR_LINE = type { i64, ptr, i64, i64, i32, %struct._LIST_ENTRY }
%struct._LIST_ENTRY = type { ptr, ptr }

@FileBuffer = external dso_local global %struct.EFI_EDITOR_FILE_BUFFER, align 8
@FileBufferNeedRefresh = external dso_local global i8, align 1
@FileBufferOnlyLineNeedRefresh = external dso_local global i8, align 1
@.str.1 = external hidden unnamed_addr constant [163 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.25 = external hidden unnamed_addr constant [35 x i32], align 4
@.str.26 = external hidden unnamed_addr constant [15 x i32], align 4

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @FileBufferCreateLine() #2

declare i64 @StatusBarSetStatusString(ptr noundef) #1

declare i64 @StrCmp(ptr noundef, ptr noundef) #1

declare ptr @RemoveEntryList(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @FileBufferCutLine(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %9 = load i8, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 11), align 2, !tbaa !9
  %10 = icmp ne i8 %9, 0
  br i1 %10, label %11, label %13

11:                                               ; preds = %1
  %12 = call i64 @StatusBarSetStatusString(ptr noundef @.str.25)
  store i64 0, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %108

13:                                               ; preds = %1
  %14 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 12), align 8, !tbaa !14
  store ptr %14, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = call i64 @StrCmp(ptr noundef %17, ptr noundef @.str.10)
  %19 = icmp eq i64 %18, 0
  br i1 %19, label %20, label %29

20:                                               ; preds = %13
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %21, i32 0, i32 5
  %23 = getelementptr inbounds %struct._LIST_ENTRY, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 2), align 8, !tbaa !19
  %26 = icmp eq ptr %24, %25
  br i1 %26, label %27, label %29

27:                                               ; preds = %20
  %28 = call i64 @StatusBarSetStatusString(ptr noundef @.str.26)
  store i64 -9223372036854775794, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %108

29:                                               ; preds = %20, %13
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %30, i32 0, i32 5
  %32 = getelementptr inbounds %struct._LIST_ENTRY, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 2), align 8, !tbaa !19
  %35 = icmp eq ptr %33, %34
  br i1 %35, label %36, label %42

36:                                               ; preds = %29
  %37 = call ptr @FileBufferCreateLine()
  store ptr %37, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %36
  store i64 -9223372036854775799, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %108

41:                                               ; preds = %36
  br label %42

42:                                               ; preds = %41, %29
  %43 = load i64, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 4), align 8, !tbaa !20
  %44 = add i64 %43, -1
  store i64 %44, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 4), align 8, !tbaa !20
  %45 = load i64, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 6), align 8, !tbaa !21
  store i64 %45, ptr %6, align 8, !tbaa !22
  store i64 1, ptr %7, align 8, !tbaa !22
  %46 = call zeroext i8 @DebugAssertEnabled()
  %47 = zext i8 %46 to i32
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %65

49:                                               ; preds = %42
  %50 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 12), align 8, !tbaa !14
  %51 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %50, i32 0, i32 5
  %52 = getelementptr inbounds %struct._LIST_ENTRY, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, ptrtoint (ptr getelementptr inbounds (%struct._EFI_EDITOR_LINE, ptr null, i32 0, i32 5) to i64)
  %56 = inttoptr i64 %55 to ptr
  %57 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %56, i32 0, i32 0
  %58 = load i64, ptr %57, align 8, !tbaa !23
  %59 = icmp ne i64 %58, 1819043173
  br i1 %59, label %60, label %65

60:                                               ; preds = %49
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 2862, ptr noundef @.str.2)
  %61 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 12), align 8, !tbaa !14
  %62 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %61, i32 0, i32 5
  %63 = getelementptr inbounds %struct._LIST_ENTRY, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  br label %73

65:                                               ; preds = %49, %42
  %66 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 12), align 8, !tbaa !14
  %67 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %66, i32 0, i32 5
  %68 = getelementptr inbounds %struct._LIST_ENTRY, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = ptrtoint ptr %69 to i64
  %71 = sub i64 %70, ptrtoint (ptr getelementptr inbounds (%struct._EFI_EDITOR_LINE, ptr null, i32 0, i32 5) to i64)
  %72 = inttoptr i64 %71 to ptr
  br label %73

73:                                               ; preds = %65, %60
  %74 = phi ptr [ %64, %60 ], [ %72, %65 ]
  store ptr %74, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 12), align 8, !tbaa !14
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %75, i32 0, i32 5
  %77 = call ptr @RemoveEntryList(ptr noundef %76)
  %78 = call zeroext i8 @DebugAssertEnabled()
  %79 = zext i8 %78 to i32
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %95

81:                                               ; preds = %73
  %82 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 2), align 8, !tbaa !19
  %83 = getelementptr inbounds %struct._LIST_ENTRY, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !24
  %85 = ptrtoint ptr %84 to i64
  %86 = sub i64 %85, ptrtoint (ptr getelementptr inbounds (%struct._EFI_EDITOR_LINE, ptr null, i32 0, i32 5) to i64)
  %87 = inttoptr i64 %86 to ptr
  %88 = getelementptr inbounds %struct._EFI_EDITOR_LINE, ptr %87, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !23
  %90 = icmp ne i64 %89, 1819043173
  br i1 %90, label %91, label %95

91:                                               ; preds = %81
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 2866, ptr noundef @.str.2)
  %92 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 2), align 8, !tbaa !19
  %93 = getelementptr inbounds %struct._LIST_ENTRY, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !24
  br label %102

95:                                               ; preds = %81, %73
  %96 = load ptr, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 2), align 8, !tbaa !19
  %97 = getelementptr inbounds %struct._LIST_ENTRY, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = ptrtoint ptr %98 to i64
  %100 = sub i64 %99, ptrtoint (ptr getelementptr inbounds (%struct._EFI_EDITOR_LINE, ptr null, i32 0, i32 5) to i64)
  %101 = inttoptr i64 %100 to ptr
  br label %102

102:                                              ; preds = %95, %91
  %103 = phi ptr [ %94, %91 ], [ %101, %95 ]
  store ptr %103, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 3), align 8, !tbaa !25
  %104 = load i64, ptr %6, align 8, !tbaa !22
  %105 = load i64, ptr %7, align 8, !tbaa !22
  call void @FileBufferMovePosition(i64 noundef %104, i64 noundef %105)
  store i8 1, ptr getelementptr inbounds (%struct.EFI_EDITOR_FILE_BUFFER, ptr @FileBuffer, i32 0, i32 9), align 8, !tbaa !26
  store i8 1, ptr @FileBufferNeedRefresh, align 1, !tbaa !27
  store i8 0, ptr @FileBufferOnlyLineNeedRefresh, align 1, !tbaa !27
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %106, ptr %107, align 8, !tbaa !5
  store i64 0, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %108

108:                                              ; preds = %102, %40, %27, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %109 = load i64, ptr %2, align 8
  ret i64 %109
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 106}
!10 = !{!"", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !13, i64 40, !13, i64 56, !13, i64 72, !13, i64 88, !7, i64 104, !7, i64 105, !7, i64 106, !6, i64 112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 8}
!14 = !{!10, !6, i64 112}
!15 = !{!16, !6, i64 8}
!16 = !{!"_EFI_EDITOR_LINE", !12, i64 0, !6, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !17, i64 40}
!17 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!18 = !{!16, !6, i64 40}
!19 = !{!10, !6, i64 16}
!20 = !{!10, !12, i64 32}
!21 = !{!10, !12, i64 56}
!22 = !{!12, !12, i64 0}
!23 = !{!16, !12, i64 0}
!24 = !{!17, !6, i64 0}
!25 = !{!10, !6, i64 24}
!26 = !{!10, !7, i64 104}
!27 = !{!7, !7, i64 0}


; 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.EFI_EDITOR_FILE_BUFFER = type { ptr, i32, ptr, ptr, i64, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, %struct.EFI_EDITOR_POSITION, i8, i8, i8, ptr }
%struct.EFI_EDITOR_POSITION = type { i64, i64 }

@FileBuffer = external dso_local local_unnamed_addr global %struct.EFI_EDITOR_FILE_BUFFER, align 8
@FileBufferNeedRefresh = external dso_local local_unnamed_addr global i8, align 1
@FileBufferOnlyLineNeedRefresh = external dso_local local_unnamed_addr global i8, align 1
@.str.1 = external hidden unnamed_addr constant [163 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.25 = external hidden unnamed_addr constant [35 x i32], align 4
@.str.26 = external hidden unnamed_addr constant [15 x i32], align 4

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @FileBufferCreateLine() local_unnamed_addr #1

declare i64 @StatusBarSetStatusString(ptr noundef) local_unnamed_addr #0

declare i64 @StrCmp(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @RemoveEntryList(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @FileBufferMovePosition(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775799, 1) i64 @FileBufferCutLine(ptr nocapture noundef writeonly %0) local_unnamed_addr #1 {
  %2 = load i8, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 106), align 2, !tbaa !5
  %.not = icmp eq i8 %2, 0
  br i1 %.not, label %5, label %3

3:                                                ; preds = %1
  %4 = tail call i64 @StatusBarSetStatusString(ptr noundef nonnull @.str.25) #2
  br label %42

5:                                                ; preds = %1
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 112), align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = tail call i64 @StrCmp(ptr noundef %8, ptr noundef nonnull @.str.10) #2
  %10 = icmp eq i64 %9, 0
  %11 = getelementptr inbounds i8, ptr %6, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 16), align 8, !tbaa !18
  %14 = icmp eq ptr %12, %13
  %or.cond = select i1 %10, i1 %14, i1 false
  br i1 %or.cond, label %15, label %._crit_edge

15:                                               ; preds = %5
  %16 = tail call i64 @StatusBarSetStatusString(ptr noundef nonnull @.str.26) #2
  br label %42

._crit_edge:                                      ; preds = %5
  %17 = getelementptr inbounds i8, ptr %6, i64 40
  %18 = icmp eq ptr %12, %13
  br i1 %18, label %19, label %22

19:                                               ; preds = %._crit_edge
  %20 = tail call ptr @FileBufferCreateLine()
  %21 = icmp eq ptr %20, null
  br i1 %21, label %42, label %22

22:                                               ; preds = %19, %._crit_edge
  %23 = load i64, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 32), align 8, !tbaa !19
  %24 = add i64 %23, -1
  store i64 %24, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 32), align 8, !tbaa !19
  %25 = load i64, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 56), align 8, !tbaa !20
  %26 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not9 = icmp eq i8 %26, 0
  %.pre14 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 112), align 8, !tbaa !13
  %.phi.trans.insert16 = getelementptr inbounds i8, ptr %.pre14, i64 40
  %.pre17 = load ptr, ptr %.phi.trans.insert16, align 8, !tbaa !17
  %.pre20 = ptrtoint ptr %.pre17 to i64
  %.pre21 = add i64 %.pre20, -40
  %.pre23 = inttoptr i64 %.pre21 to ptr
  br i1 %.not9, label %._crit_edge15, label %27

27:                                               ; preds = %22
  %28 = load i64, ptr %.pre23, align 8, !tbaa !21
  %.not10 = icmp eq i64 %28, 1819043173
  br i1 %.not10, label %._crit_edge15, label %29

29:                                               ; preds = %27
  tail call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 2862, ptr noundef nonnull @.str.2) #2
  %30 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 112), align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %30, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  br label %._crit_edge15

._crit_edge15:                                    ; preds = %22, %27, %29
  %33 = phi ptr [ %32, %29 ], [ %.pre23, %27 ], [ %.pre23, %22 ]
  store ptr %33, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 112), align 8, !tbaa !13
  %34 = tail call ptr @RemoveEntryList(ptr noundef nonnull %17) #2
  %35 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not11 = icmp eq i8 %35, 0
  %.pre18 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 16), align 8, !tbaa !18
  %.pre19 = load ptr, ptr %.pre18, align 8, !tbaa !22
  %.pre26 = ptrtoint ptr %.pre19 to i64
  %.pre28 = add i64 %.pre26, -40
  %.pre30 = inttoptr i64 %.pre28 to ptr
  br i1 %.not11, label %._crit_edge25, label %36

36:                                               ; preds = %._crit_edge15
  %37 = load i64, ptr %.pre30, align 8, !tbaa !21
  %.not12 = icmp eq i64 %37, 1819043173
  br i1 %.not12, label %._crit_edge25, label %38

38:                                               ; preds = %36
  tail call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 2866, ptr noundef nonnull @.str.2) #2
  %39 = load ptr, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 16), align 8, !tbaa !18
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  br label %._crit_edge25

._crit_edge25:                                    ; preds = %._crit_edge15, %36, %38
  %41 = phi ptr [ %40, %38 ], [ %.pre30, %36 ], [ %.pre30, %._crit_edge15 ]
  store ptr %41, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 24), align 8, !tbaa !23
  tail call void @FileBufferMovePosition(i64 noundef %25, i64 noundef 1)
  store i8 1, ptr getelementptr inbounds (i8, ptr @FileBuffer, i64 104), align 8, !tbaa !24
  store i8 1, ptr @FileBufferNeedRefresh, align 1, !tbaa !25
  store i8 0, ptr @FileBufferOnlyLineNeedRefresh, align 1, !tbaa !25
  store ptr %6, ptr %0, align 8, !tbaa !26
  br label %42

42:                                               ; preds = %19, %._crit_edge25, %15, %3
  %.0 = phi i64 [ 0, %3 ], [ -9223372036854775794, %15 ], [ 0, %._crit_edge25 ], [ -9223372036854775799, %19 ]
  ret i64 %.0
}

attributes #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 = { 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 #2 = { 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, !8, i64 106}
!6 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !12, i64 56, !12, i64 72, !12, i64 88, !8, i64 104, !8, i64 105, !8, i64 106, !7, i64 112}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 8}
!13 = !{!6, !7, i64 112}
!14 = !{!15, !7, i64 8}
!15 = !{!"_EFI_EDITOR_LINE", !11, i64 0, !7, i64 8, !11, i64 16, !11, i64 24, !10, i64 32, !16, i64 40}
!16 = !{!"_LIST_ENTRY", !7, i64 0, !7, i64 8}
!17 = !{!15, !7, i64 40}
!18 = !{!6, !7, i64 16}
!19 = !{!6, !11, i64 32}
!20 = !{!6, !11, i64 56}
!21 = !{!15, !11, i64 0}
!22 = !{!16, !7, i64 0}
!23 = !{!6, !7, i64 24}
!24 = !{!6, !8, i64 104}
!25 = !{!8, !8, i64 0}
!26 = !{!7, !7, i64 0}


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