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

; 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.mline_t = type { %struct.mpoint_t, %struct.mpoint_t }
%struct.mpoint_t = type { i32, i32 }
%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 }
%struct.mobj_s = type { %struct.thinker_s, i32, i32, i32, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, %struct.mapthing_t, ptr }
%struct.thinker_s = type { ptr, ptr, %union.actionf_t }
%union.actionf_t = type { ptr }
%struct.mapthing_t = type { i16, i16, i16, i16, i16 }

@player_arrow = external dso_local global [7 x %struct.mline_t], align 16
@cheat_player_arrow = external dso_local global [16 x %struct.mline_t], align 16
@plr = external hidden global ptr, align 8
@playeringame = external global [4 x i32], align 16
@players = external global [4 x %struct.player_s], align 16
@deathmatch = external global i32, align 4
@cheating = external hidden global i32, align 4
@AM_drawPlayers.their_colors = external hidden global [4 x i32], align 16
@netgame = external global i32, align 4
@singledemo = external global i32, align 4

; 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: nounwind uwtable
declare dso_local void @AM_drawLineCharacter(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @AM_drawPlayers() #1 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 -1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  %6 = load i32, ptr @netgame, align 4, !tbaa !5
  %7 = icmp ne i32 %6, 0
  br i1 %7, label %44, label %8

8:                                                ; preds = %0
  %9 = load i32, ptr @cheating, align 4, !tbaa !5
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %11, label %27

11:                                               ; preds = %8
  %12 = load ptr, ptr @plr, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.player_s, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %struct.mobj_s, ptr %14, i32 0, i32 6
  %16 = load i32, ptr %15, align 8, !tbaa !15
  %17 = load ptr, ptr @plr, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.player_s, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.mobj_s, ptr %19, i32 0, i32 1
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %22 = load ptr, ptr @plr, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.player_s, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %struct.mobj_s, ptr %24, i32 0, i32 2
  %26 = load i32, ptr %25, align 4, !tbaa !20
  call void @AM_drawLineCharacter(ptr noundef @cheat_player_arrow, i32 noundef 16, i32 noundef 0, i32 noundef %16, i32 noundef 209, i32 noundef %21, i32 noundef %26)
  br label %43

27:                                               ; preds = %8
  %28 = load ptr, ptr @plr, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.player_s, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.mobj_s, ptr %30, i32 0, i32 6
  %32 = load i32, ptr %31, align 8, !tbaa !15
  %33 = load ptr, ptr @plr, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.player_s, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.mobj_s, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !19
  %38 = load ptr, ptr @plr, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.player_s, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds %struct.mobj_s, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !20
  call void @AM_drawLineCharacter(ptr noundef @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %32, i32 noundef 209, i32 noundef %37, i32 noundef %42)
  br label %43

43:                                               ; preds = %27, %11
  store i32 1, ptr %5, align 4
  br label %104

44:                                               ; preds = %0
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %100, %44
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = icmp slt i32 %46, 4
  br i1 %47, label %48, label %103

48:                                               ; preds = %45
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !5
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %52
  store ptr %53, ptr %2, align 8, !tbaa !9
  %54 = load i32, ptr @deathmatch, align 4, !tbaa !5
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %64

56:                                               ; preds = %48
  %57 = load i32, ptr @singledemo, align 4, !tbaa !5
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %64, label %59

59:                                               ; preds = %56
  %60 = load ptr, ptr %2, align 8, !tbaa !9
  %61 = load ptr, ptr @plr, align 8, !tbaa !9
  %62 = icmp ne ptr %60, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %59
  br label %100

64:                                               ; preds = %59, %56, %48
  %65 = load i32, ptr %1, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [4 x i32], ptr @playeringame, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %71, label %70

70:                                               ; preds = %64
  br label %100

71:                                               ; preds = %64
  %72 = load ptr, ptr %2, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.player_s, ptr %72, i32 0, i32 10
  %74 = getelementptr inbounds [6 x i32], ptr %73, i64 0, i64 2
  %75 = load i32, ptr %74, align 8, !tbaa !5
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %71
  store i32 246, ptr %4, align 4, !tbaa !5
  br label %83

78:                                               ; preds = %71
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [4 x i32], ptr @AM_drawPlayers.their_colors, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %4, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %78, %77
  %84 = load ptr, ptr %2, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.player_s, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = getelementptr inbounds %struct.mobj_s, ptr %86, i32 0, i32 6
  %88 = load i32, ptr %87, align 8, !tbaa !15
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = load ptr, ptr %2, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.player_s, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds %struct.mobj_s, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 8, !tbaa !19
  %95 = load ptr, ptr %2, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.player_s, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds %struct.mobj_s, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !20
  call void @AM_drawLineCharacter(ptr noundef @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %88, i32 noundef %89, i32 noundef %94, i32 noundef %99)
  br label %100

100:                                              ; preds = %83, %70, %63
  %101 = load i32, ptr %1, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %1, align 4, !tbaa !5
  br label %45, !llvm.loop !21

103:                                              ; preds = %45
  store i32 0, ptr %5, align 4
  br label %104

104:                                              ; preds = %103, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #2
  %105 = load i32, ptr %5, align 4
  switch i32 %105, label %107 [
    i32 0, label %106
    i32 1, label %106
  ]

106:                                              ; preds = %104, %104
  ret void

107:                                              ; preds = %104
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!12, !10, i64 0}
!12 = !{!"player_s", !10, i64 0, !6, i64 8, !13, 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}
!13 = !{!"", !7, i64 0, !7, i64 1, !14, i64 2, !14, i64 4, !7, i64 6, !7, i64 7}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !6, i64 56}
!16 = !{!"mobj_s", !17, i64 0, !6, i64 24, !6, i64 28, !6, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !10, i64 136, !6, i64 144, !10, i64 152, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !10, i64 176, !6, i64 184, !6, i64 188, !10, i64 192, !6, i64 200, !18, i64 204, !10, i64 216}
!17 = !{!"thinker_s", !10, i64 0, !10, i64 8, !7, i64 16}
!18 = !{!"", !14, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!19 = !{!16, !6, i64 24}
!20 = !{!16, !6, i64 28}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; 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.mline_t = type { %struct.mpoint_t, %struct.mpoint_t }
%struct.mpoint_t = type { i32, i32 }
%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 }

@player_arrow = external dso_local global [7 x %struct.mline_t], align 16
@cheat_player_arrow = external dso_local global [16 x %struct.mline_t], align 16
@plr = external hidden local_unnamed_addr global ptr, align 8
@playeringame = external local_unnamed_addr global [4 x i32], align 16
@players = external global [4 x %struct.player_s], align 16
@deathmatch = external local_unnamed_addr global i32, align 4
@cheating = external hidden local_unnamed_addr global i32, align 4
@AM_drawPlayers.their_colors = external hidden local_unnamed_addr global [4 x i32], align 16
@netgame = external local_unnamed_addr global i32, align 4
@singledemo = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @AM_drawLineCharacter(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @AM_drawPlayers() local_unnamed_addr #0 {
  %1 = load i32, ptr @netgame, align 4, !tbaa !5
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %7, label %.preheader.preheader

.preheader.preheader:                             ; preds = %0
  %2 = load i32, ptr @deathmatch, align 4, !tbaa !5
  %3 = icmp eq i32 %2, 0
  %4 = load i32, ptr @singledemo, align 4
  %5 = icmp ne i32 %4, 0
  %or.cond = select i1 %3, i1 true, i1 %5
  %6 = load ptr, ptr @plr, align 8
  %.not15 = icmp eq ptr %6, @players
  %or.cond18 = select i1 %or.cond, i1 true, i1 %.not15
  br i1 %or.cond18, label %19, label %.preheader.1

7:                                                ; preds = %0
  %8 = load i32, ptr @cheating, align 4, !tbaa !5
  %.not14 = icmp eq i32 %8, 0
  %9 = load ptr, ptr @plr, align 8, !tbaa !9
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %10, i64 56
  %12 = load i32, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %10, i64 24
  %14 = load i32, ptr %13, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %10, i64 28
  %16 = load i32, ptr %15, align 4, !tbaa !20
  br i1 %.not14, label %18, label %17

17:                                               ; preds = %7
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @cheat_player_arrow, i32 noundef 16, i32 noundef 0, i32 noundef %12, i32 noundef 209, i32 noundef %14, i32 noundef %16)
  br label %.loopexit

18:                                               ; preds = %7
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %12, i32 noundef 209, i32 noundef %14, i32 noundef %16)
  br label %.loopexit

19:                                               ; preds = %.preheader.preheader
  %20 = load i32, ptr @playeringame, align 16, !tbaa !5
  %.not16 = icmp eq i32 %20, 0
  br i1 %.not16, label %.preheader.1, label %21

21:                                               ; preds = %19
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @players, i64 56), align 8, !tbaa !5
  %.not17 = icmp eq i32 %22, 0
  %23 = load i32, ptr @AM_drawPlayers.their_colors, align 16
  %spec.select = select i1 %.not17, i32 %23, i32 246
  %24 = load ptr, ptr @players, align 16, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 56
  %26 = load i32, ptr %25, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %24, i64 24
  %28 = load i32, ptr %27, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %24, i64 28
  %30 = load i32, ptr %29, align 4, !tbaa !20
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %26, i32 noundef %spec.select, i32 noundef %28, i32 noundef %30)
  %.pre = load i32, ptr @deathmatch, align 4, !tbaa !5
  %.pre26 = load i32, ptr @singledemo, align 4
  %.pre27 = load ptr, ptr @plr, align 8
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.preheader, %19, %21
  %31 = phi ptr [ %6, %.preheader.preheader ], [ %6, %19 ], [ %.pre27, %21 ]
  %32 = phi i32 [ 0, %.preheader.preheader ], [ %4, %19 ], [ %.pre26, %21 ]
  %33 = phi i32 [ %2, %.preheader.preheader ], [ %2, %19 ], [ %.pre, %21 ]
  %34 = icmp eq i32 %33, 0
  %35 = icmp ne i32 %32, 0
  %or.cond.1 = select i1 %34, i1 true, i1 %35
  %.not15.1 = icmp eq ptr %31, getelementptr inbounds (i8, ptr @players, i64 320)
  %or.cond18.1 = select i1 %or.cond.1, i1 true, i1 %.not15.1
  br i1 %or.cond18.1, label %36, label %.preheader.2

36:                                               ; preds = %.preheader.1
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @playeringame, i64 4), align 4, !tbaa !5
  %.not16.1 = icmp eq i32 %37, 0
  br i1 %.not16.1, label %.preheader.2, label %38

38:                                               ; preds = %36
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @players, i64 376), align 8, !tbaa !5
  %.not17.1 = icmp eq i32 %39, 0
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @AM_drawPlayers.their_colors, i64 4), align 4
  %spec.select34 = select i1 %.not17.1, i32 %40, i32 246
  %41 = load ptr, ptr getelementptr inbounds (i8, ptr @players, i64 320), align 16, !tbaa !11
  %42 = getelementptr inbounds i8, ptr %41, i64 56
  %43 = load i32, ptr %42, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %41, i64 24
  %45 = load i32, ptr %44, align 8, !tbaa !19
  %46 = getelementptr inbounds i8, ptr %41, i64 28
  %47 = load i32, ptr %46, align 4, !tbaa !20
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %43, i32 noundef %spec.select34, i32 noundef %45, i32 noundef %47)
  %.pre28 = load i32, ptr @deathmatch, align 4, !tbaa !5
  %.pre29 = load i32, ptr @singledemo, align 4
  %.pre30 = load ptr, ptr @plr, align 8
  br label %.preheader.2

.preheader.2:                                     ; preds = %38, %36, %.preheader.1
  %48 = phi ptr [ %.pre30, %38 ], [ %31, %36 ], [ %31, %.preheader.1 ]
  %49 = phi i32 [ %.pre29, %38 ], [ %32, %36 ], [ 0, %.preheader.1 ]
  %50 = phi i32 [ %.pre28, %38 ], [ %33, %36 ], [ %33, %.preheader.1 ]
  %51 = icmp eq i32 %50, 0
  %52 = icmp ne i32 %49, 0
  %or.cond.2 = select i1 %51, i1 true, i1 %52
  %.not15.2 = icmp eq ptr %48, getelementptr inbounds (i8, ptr @players, i64 640)
  %or.cond18.2 = select i1 %or.cond.2, i1 true, i1 %.not15.2
  br i1 %or.cond18.2, label %53, label %.preheader.3

53:                                               ; preds = %.preheader.2
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @playeringame, i64 8), align 8, !tbaa !5
  %.not16.2 = icmp eq i32 %54, 0
  br i1 %.not16.2, label %.preheader.3, label %55

55:                                               ; preds = %53
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @players, i64 696), align 8, !tbaa !5
  %.not17.2 = icmp eq i32 %56, 0
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @AM_drawPlayers.their_colors, i64 8), align 8
  %spec.select35 = select i1 %.not17.2, i32 %57, i32 246
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @players, i64 640), align 16, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %58, i64 56
  %60 = load i32, ptr %59, align 8, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %58, i64 24
  %62 = load i32, ptr %61, align 8, !tbaa !19
  %63 = getelementptr inbounds i8, ptr %58, i64 28
  %64 = load i32, ptr %63, align 4, !tbaa !20
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %60, i32 noundef %spec.select35, i32 noundef %62, i32 noundef %64)
  %.pre31 = load i32, ptr @deathmatch, align 4, !tbaa !5
  %.pre32 = load i32, ptr @singledemo, align 4
  %.pre33 = load ptr, ptr @plr, align 8
  br label %.preheader.3

.preheader.3:                                     ; preds = %55, %53, %.preheader.2
  %65 = phi ptr [ %.pre33, %55 ], [ %48, %53 ], [ %48, %.preheader.2 ]
  %66 = phi i32 [ %.pre32, %55 ], [ %49, %53 ], [ 0, %.preheader.2 ]
  %67 = phi i32 [ %.pre31, %55 ], [ %50, %53 ], [ %50, %.preheader.2 ]
  %68 = icmp ne i32 %67, 0
  %69 = icmp eq i32 %66, 0
  %or.cond.3.not41 = select i1 %68, i1 %69, i1 false
  %.not15.3 = icmp ne ptr %65, getelementptr inbounds (i8, ptr @players, i64 960)
  %or.cond18.3.not38 = select i1 %or.cond.3.not41, i1 %.not15.3, i1 false
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @playeringame, i64 12), align 4
  %.not16.3 = icmp eq i32 %70, 0
  %or.cond36 = select i1 %or.cond18.3.not38, i1 true, i1 %.not16.3
  br i1 %or.cond36, label %.loopexit, label %71

71:                                               ; preds = %.preheader.3
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @players, i64 1016), align 8, !tbaa !5
  %.not17.3 = icmp eq i32 %72, 0
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @AM_drawPlayers.their_colors, i64 12), align 4
  %spec.select37 = select i1 %.not17.3, i32 %73, i32 246
  %74 = load ptr, ptr getelementptr inbounds (i8, ptr @players, i64 960), align 16, !tbaa !11
  %75 = getelementptr inbounds i8, ptr %74, i64 56
  %76 = load i32, ptr %75, align 8, !tbaa !15
  %77 = getelementptr inbounds i8, ptr %74, i64 24
  %78 = load i32, ptr %77, align 8, !tbaa !19
  %79 = getelementptr inbounds i8, ptr %74, i64 28
  %80 = load i32, ptr %79, align 4, !tbaa !20
  tail call void @AM_drawLineCharacter(ptr noundef nonnull @player_arrow, i32 noundef 7, i32 noundef 0, i32 noundef %76, i32 noundef %spec.select37, i32 noundef %78, i32 noundef %80)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.3, %71, %17, %18
  ret void
}

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

!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 = !{!12, !10, i64 0}
!12 = !{!"player_s", !10, i64 0, !6, i64 8, !13, 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}
!13 = !{!"", !7, i64 0, !7, i64 1, !14, i64 2, !14, i64 4, !7, i64 6, !7, i64 7}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !6, i64 56}
!16 = !{!"mobj_s", !17, i64 0, !6, i64 24, !6, i64 28, !6, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !10, i64 136, !6, i64 144, !10, i64 152, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !10, i64 176, !6, i64 184, !6, i64 188, !10, i64 192, !6, i64 200, !18, i64 204, !10, i64 216}
!17 = !{!"thinker_s", !10, i64 0, !10, i64 8, !7, i64 16}
!18 = !{!"", !14, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!19 = !{!16, !6, i64 24}
!20 = !{!16, !6, i64 28}


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