; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Doom/mc1-doom/src (g_game)

; 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.player_s = type { ptr, i32, %struct.ticcmd_t, i32, i32, i32, i32, i32, i32, i32, [6 x i32], [6 x i32], i32, [4 x i32], i32, i32, [9 x i32], [4 x i32], [4 x i32], i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, [2 x %struct.pspdef_t], i32 }
%struct.ticcmd_t = type { i8, i8, i16, i16, i8, i8 }
%struct.pspdef_t = type { ptr, i32, i32, i32 }

@consoleplayer = external dso_local global i32, align 4
@savegameslot = external dso_local global i32, align 4
@gamemap = external dso_local global i32, align 4
@playeringame = external dso_local global [4 x i32], align 16
@players = external dso_local global [4 x %struct.player_s], align 16
@gameepisode = external dso_local global i32, align 4
@gameskill = external dso_local global i32, align 4
@gameaction = external dso_local global i32, align 4
@savedescription = external dso_local global [32 x i8], align 16
@leveltime = external global i32, align 4
@savebuffer = external dso_local global ptr, align 8
@save_p = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@screens = external global [5 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @G_DoSaveGame() #3 {
  %1 = alloca [100 x i8], align 16
  %2 = alloca [16 x i8], align 16
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 100, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %6 = call i32 @M_CheckParm(ptr noundef @.str.11)
  %7 = icmp ne i32 %6, 0
  br i1 %7, label %8, label %12

8:                                                ; preds = %0
  %9 = getelementptr inbounds [100 x i8], ptr %1, i64 0, i64 0
  %10 = load i32, ptr @savegameslot, align 4, !tbaa !5
  %11 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %9, ptr noundef @.str.12, i32 noundef %10) #7
  br label %16

12:                                               ; preds = %0
  %13 = getelementptr inbounds [100 x i8], ptr %1, i64 0, i64 0
  %14 = load i32, ptr @savegameslot, align 4, !tbaa !5
  %15 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %13, ptr noundef @.str.13, i32 noundef %14) #7
  br label %16

16:                                               ; preds = %12, %8
  store ptr @savedescription, ptr %3, align 8, !tbaa !9
  %17 = load ptr, ptr getelementptr inbounds ([5 x ptr], ptr @screens, i64 0, i64 1), align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %17, i64 16384
  store ptr %18, ptr @savebuffer, align 8, !tbaa !9
  store ptr %18, ptr @save_p, align 8, !tbaa !9
  %19 = load ptr, ptr @save_p, align 8, !tbaa !9
  %20 = load ptr, ptr %3, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %19, ptr align 1 %20, i64 24, i1 false)
  %21 = load ptr, ptr @save_p, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %21, i64 24
  store ptr %22, ptr @save_p, align 8, !tbaa !9
  %23 = getelementptr inbounds [16 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %23, i8 0, i64 16, i1 false)
  %24 = getelementptr inbounds [16 x i8], ptr %2, i64 0, i64 0
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %24, ptr noundef @.str.9, i32 noundef 110) #7
  %26 = load ptr, ptr @save_p, align 8, !tbaa !9
  %27 = getelementptr inbounds [16 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %26, ptr align 16 %27, i64 16, i1 false)
  %28 = load ptr, ptr @save_p, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store ptr %29, ptr @save_p, align 8, !tbaa !9
  %30 = load i32, ptr @gameskill, align 4, !tbaa !5
  %31 = trunc i32 %30 to i8
  %32 = load ptr, ptr @save_p, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %32, i32 1
  store ptr %33, ptr @save_p, align 8, !tbaa !9
  store i8 %31, ptr %32, align 1, !tbaa !11
  %34 = load i32, ptr @gameepisode, align 4, !tbaa !5
  %35 = trunc i32 %34 to i8
  %36 = load ptr, ptr @save_p, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %36, i32 1
  store ptr %37, ptr @save_p, align 8, !tbaa !9
  store i8 %35, ptr %36, align 1, !tbaa !11
  %38 = load i32, ptr @gamemap, align 4, !tbaa !5
  %39 = trunc i32 %38 to i8
  %40 = load ptr, ptr @save_p, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i32 1
  store ptr %41, ptr @save_p, align 8, !tbaa !9
  store i8 %39, ptr %40, align 1, !tbaa !11
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %53, %16
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 4
  br i1 %44, label %45, label %56

45:                                               ; preds = %42
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [4 x i32], ptr @playeringame, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = trunc i32 %49 to i8
  %51 = load ptr, ptr @save_p, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i32 1
  store ptr %52, ptr @save_p, align 8, !tbaa !9
  store i8 %50, ptr %51, align 1, !tbaa !11
  br label %53

53:                                               ; preds = %45
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %5, align 4, !tbaa !5
  br label %42, !llvm.loop !12

56:                                               ; preds = %42
  %57 = load i32, ptr @leveltime, align 4, !tbaa !5
  %58 = ashr i32 %57, 16
  %59 = trunc i32 %58 to i8
  %60 = load ptr, ptr @save_p, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %60, i32 1
  store ptr %61, ptr @save_p, align 8, !tbaa !9
  store i8 %59, ptr %60, align 1, !tbaa !11
  %62 = load i32, ptr @leveltime, align 4, !tbaa !5
  %63 = ashr i32 %62, 8
  %64 = trunc i32 %63 to i8
  %65 = load ptr, ptr @save_p, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i32 1
  store ptr %66, ptr @save_p, align 8, !tbaa !9
  store i8 %64, ptr %65, align 1, !tbaa !11
  %67 = load i32, ptr @leveltime, align 4, !tbaa !5
  %68 = trunc i32 %67 to i8
  %69 = load ptr, ptr @save_p, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %69, i32 1
  store ptr %70, ptr @save_p, align 8, !tbaa !9
  store i8 %68, ptr %69, align 1, !tbaa !11
  call void @P_ArchivePlayers()
  call void @P_ArchiveWorld()
  call void @P_ArchiveThinkers()
  call void @P_ArchiveSpecials()
  %71 = load ptr, ptr @save_p, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %71, i32 1
  store ptr %72, ptr @save_p, align 8, !tbaa !9
  store i8 29, ptr %71, align 1, !tbaa !11
  %73 = load ptr, ptr @save_p, align 8, !tbaa !9
  %74 = load ptr, ptr @savebuffer, align 8, !tbaa !9
  %75 = ptrtoint ptr %73 to i64
  %76 = ptrtoint ptr %74 to i64
  %77 = sub i64 %75, %76
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr %4, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 180224
  br i1 %80, label %81, label %82

81:                                               ; preds = %56
  call void (ptr, ...) @I_Error(ptr noundef @.str.14) #8
  unreachable

82:                                               ; preds = %56
  %83 = getelementptr inbounds [100 x i8], ptr %1, i64 0, i64 0
  %84 = load ptr, ptr @savebuffer, align 8, !tbaa !9
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = call i32 @M_WriteFile(ptr noundef %83, ptr noundef %84, i32 noundef %85)
  store i32 0, ptr @gameaction, align 4, !tbaa !5
  store i8 0, ptr @savedescription, align 16, !tbaa !11
  %87 = load i32, ptr @consoleplayer, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %88
  %90 = getelementptr inbounds %struct.player_s, ptr %89, i32 0, i32 26
  store ptr @.str.15, ptr %90, align 16, !tbaa !14
  call void @R_FillBackScreen()
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr %1) #7
  ret void
}

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: noreturn
declare void @I_Error(ptr noundef, ...) #5

declare void @R_FillBackScreen() #6

declare i32 @M_CheckParm(ptr noundef) #6

declare void @P_ArchivePlayers() #6

declare void @P_ArchiveWorld() #6

declare void @P_ArchiveThinkers() #6

declare void @P_ArchiveSpecials() #6

declare i32 @M_WriteFile(ptr noundef, ptr noundef, i32 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !10, i64 224}
!15 = !{!"player_s", !10, i64 0, !6, i64 8, !16, i64 12, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !7, i64 48, !7, i64 72, !6, i64 96, !7, i64 100, !6, i64 116, !6, i64 120, !7, i64 124, !7, i64 160, !7, i64 176, !6, i64 192, !6, i64 196, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !10, i64 224, !6, i64 232, !6, i64 236, !10, i64 240, !6, i64 248, !6, i64 252, !6, i64 256, !7, i64 264, !6, i64 312}
!16 = !{!"", !7, i64 0, !7, i64 1, !17, i64 2, !17, i64 4, !7, i64 6, !7, i64 7}
!17 = !{!"short", !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.player_s = type { ptr, i32, %struct.ticcmd_t, i32, i32, i32, i32, i32, i32, i32, [6 x i32], [6 x i32], i32, [4 x i32], i32, i32, [9 x i32], [4 x i32], [4 x i32], i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, [2 x %struct.pspdef_t], i32 }
%struct.ticcmd_t = type { i8, i8, i16, i16, i8, i8 }
%struct.pspdef_t = type { ptr, i32, i32, i32 }

@consoleplayer = external dso_local local_unnamed_addr global i32, align 4
@savegameslot = external dso_local local_unnamed_addr global i32, align 4
@gamemap = external dso_local local_unnamed_addr global i32, align 4
@playeringame = external dso_local local_unnamed_addr global [4 x i32], align 16
@players = external dso_local local_unnamed_addr global [4 x %struct.player_s], align 16
@gameepisode = external dso_local local_unnamed_addr global i32, align 4
@gameskill = external dso_local local_unnamed_addr global i32, align 4
@gameaction = external dso_local local_unnamed_addr global i32, align 4
@savedescription = external dso_local local_unnamed_addr global [32 x i8], align 16
@leveltime = external local_unnamed_addr global i32, align 4
@savebuffer = external dso_local local_unnamed_addr global ptr, align 8
@save_p = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@screens = external local_unnamed_addr global [5 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @G_DoSaveGame() local_unnamed_addr #3 {
  %1 = alloca [100 x i8], align 16
  %2 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  %3 = tail call i32 @M_CheckParm(ptr noundef nonnull @.str.11) #7
  %.not = icmp eq i32 %3, 0
  %4 = load i32, ptr @savegameslot, align 4, !tbaa !5
  %.str.13..str.12 = select i1 %.not, ptr @.str.13, ptr @.str.12
  %5 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %.str.13..str.12, i32 noundef %4) #7
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @screens, i64 8), align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %6, i64 16384
  store ptr %7, ptr @savebuffer, align 8, !tbaa !9
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %7, ptr noundef nonnull align 16 dereferenceable(24) @savedescription, i64 24, i1 false)
  %8 = getelementptr inbounds i8, ptr %6, i64 16408
  store ptr %8, ptr @save_p, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %9 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef 110) #7
  %10 = load ptr, ptr @save_p, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %2, i64 16, i1 false)
  %11 = load ptr, ptr @save_p, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load i32, ptr @gameskill, align 4, !tbaa !5
  %14 = trunc i32 %13 to i8
  %15 = getelementptr inbounds i8, ptr %11, i64 17
  store i8 %14, ptr %12, align 1, !tbaa !11
  %16 = load i32, ptr @gameepisode, align 4, !tbaa !5
  %17 = trunc i32 %16 to i8
  %18 = getelementptr inbounds i8, ptr %11, i64 18
  store i8 %17, ptr %15, align 1, !tbaa !11
  %19 = load i32, ptr @gamemap, align 4, !tbaa !5
  %20 = trunc i32 %19 to i8
  %21 = getelementptr inbounds i8, ptr %11, i64 19
  store i8 %20, ptr %18, align 1, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %11, i64 23
  %23 = load <4 x i32>, ptr @playeringame, align 16, !tbaa !5
  %24 = trunc <4 x i32> %23 to <4 x i8>
  store <4 x i8> %24, ptr %21, align 1, !tbaa !11
  %25 = load i32, ptr @leveltime, align 4, !tbaa !5
  %26 = lshr i32 %25, 16
  %27 = trunc i32 %26 to i8
  %28 = getelementptr inbounds i8, ptr %11, i64 24
  store i8 %27, ptr %22, align 1, !tbaa !11
  %29 = lshr i32 %25, 8
  %30 = trunc i32 %29 to i8
  %31 = getelementptr inbounds i8, ptr %11, i64 25
  store i8 %30, ptr %28, align 1, !tbaa !11
  %32 = trunc i32 %25 to i8
  %33 = getelementptr inbounds i8, ptr %11, i64 26
  store ptr %33, ptr @save_p, align 8, !tbaa !9
  store i8 %32, ptr %31, align 1, !tbaa !11
  tail call void @P_ArchivePlayers() #7
  tail call void @P_ArchiveWorld() #7
  tail call void @P_ArchiveThinkers() #7
  tail call void @P_ArchiveSpecials() #7
  %34 = load ptr, ptr @save_p, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %34, i64 1
  store ptr %35, ptr @save_p, align 8, !tbaa !9
  store i8 29, ptr %34, align 1, !tbaa !11
  %36 = load ptr, ptr @save_p, align 8, !tbaa !9
  %37 = load ptr, ptr @savebuffer, align 8, !tbaa !9
  %38 = ptrtoint ptr %36 to i64
  %39 = ptrtoint ptr %37 to i64
  %40 = sub i64 %38, %39
  %41 = trunc i64 %40 to i32
  %42 = icmp sgt i32 %41, 180224
  br i1 %42, label %43, label %44

43:                                               ; preds = %0
  tail call void (ptr, ...) @I_Error(ptr noundef nonnull @.str.14) #8
  unreachable

44:                                               ; preds = %0
  %45 = call i32 @M_WriteFile(ptr noundef nonnull %1, ptr noundef %37, i32 noundef %41) #7
  store i32 0, ptr @gameaction, align 4, !tbaa !5
  store i8 0, ptr @savedescription, align 16, !tbaa !11
  %46 = load i32, ptr @consoleplayer, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %47, i32 26
  store ptr @.str.15, ptr %48, align 16, !tbaa !12
  call void @R_FillBackScreen() #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %1) #7
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: noreturn
declare void @I_Error(ptr noundef, ...) local_unnamed_addr #5

declare void @R_FillBackScreen() local_unnamed_addr #6

declare i32 @M_CheckParm(ptr noundef) local_unnamed_addr #6

declare void @P_ArchivePlayers() local_unnamed_addr #6

declare void @P_ArchiveWorld() local_unnamed_addr #6

declare void @P_ArchiveThinkers() local_unnamed_addr #6

declare void @P_ArchiveSpecials() local_unnamed_addr #6

declare i32 @M_WriteFile(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 224}
!13 = !{!"player_s", !10, i64 0, !6, i64 8, !14, i64 12, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !7, i64 48, !7, i64 72, !6, i64 96, !7, i64 100, !6, i64 116, !6, i64 120, !7, i64 124, !7, i64 160, !7, i64 176, !6, i64 192, !6, i64 196, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !10, i64 224, !6, i64 232, !6, i64 236, !10, i64 240, !6, i64 248, !6, i64 252, !6, i64 256, !7, i64 264, !6, i64 312}
!14 = !{!"", !7, i64 0, !7, i64 1, !15, i64 2, !15, i64 4, !7, i64 6, !7, i64 7}
!15 = !{!"short", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass