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

; 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.cheatseq_t = type { ptr, ptr }
%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.event_t = type { i32, 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 }

@cheat_mus = external dso_local global %struct.cheatseq_t, align 8
@cheat_god = external dso_local global %struct.cheatseq_t, align 8
@cheat_ammo = external dso_local global %struct.cheatseq_t, align 8
@cheat_ammonokey = external dso_local global %struct.cheatseq_t, align 8
@cheat_noclip = external dso_local global %struct.cheatseq_t, align 8
@cheat_commercial_noclip = external dso_local global %struct.cheatseq_t, align 8
@cheat_powerup = external dso_local global [7 x %struct.cheatseq_t], align 16
@cheat_choppers = external dso_local global %struct.cheatseq_t, align 8
@cheat_clev = external dso_local global %struct.cheatseq_t, align 8
@cheat_mypos = external dso_local global %struct.cheatseq_t, align 8
@netgame = external global i32, align 4
@st_gamestate = external hidden global i32, align 4
@st_firsttime = external hidden global i32, align 4
@plyr = external hidden global ptr, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@gamemode = external global i32, align 4
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@ST_Responder.buf = external hidden global [52 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@players = external global [4 x %struct.player_s], align 16
@consoleplayer = external global i32, align 4
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@gameskill = 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
define dso_local i32 @ST_Responder(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [3 x i8], align 1
  %6 = alloca i32, align 4
  %7 = alloca [3 x i8], align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.event_t, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %15, label %28

15:                                               ; preds = %1
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.event_t, ptr %16, i32 0, i32 1
  %18 = load i32, ptr %17, align 4, !tbaa !12
  %19 = and i32 %18, -65536
  %20 = icmp eq i32 %19, 1634533376
  br i1 %20, label %21, label %28

21:                                               ; preds = %15
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.event_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !12
  switch i32 %24, label %27 [
    i32 1634559232, label %25
    i32 1634564096, label %26
  ]

25:                                               ; preds = %21
  store i32 0, ptr @st_gamestate, align 4, !tbaa !13
  store i32 1, ptr @st_firsttime, align 4, !tbaa !13
  br label %27

26:                                               ; preds = %21
  store i32 1, ptr @st_gamestate, align 4, !tbaa !13
  br label %27

27:                                               ; preds = %26, %25, %21
  br label %485

28:                                               ; preds = %15, %1
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.event_t, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %484

33:                                               ; preds = %28
  %34 = load i32, ptr @netgame, align 4, !tbaa !13
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %395, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.event_t, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = trunc i32 %39 to i8
  %41 = call i32 @cht_CheckCheat(ptr noundef @cheat_god, i8 noundef signext %40)
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %72

43:                                               ; preds = %36
  %44 = load ptr, ptr @plyr, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.player_s, ptr %44, i32 0, i32 21
  %46 = load i32, ptr %45, align 8, !tbaa !14
  %47 = xor i32 %46, 2
  store i32 %47, ptr %45, align 8, !tbaa !14
  %48 = load ptr, ptr @plyr, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.player_s, ptr %48, i32 0, i32 21
  %50 = load i32, ptr %49, align 8, !tbaa !14
  %51 = and i32 %50, 2
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %68

53:                                               ; preds = %43
  %54 = load ptr, ptr @plyr, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.player_s, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !18
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %63

58:                                               ; preds = %53
  %59 = load ptr, ptr @plyr, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.player_s, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = getelementptr inbounds %struct.mobj_s, ptr %61, i32 0, i32 25
  store i32 100, ptr %62, align 4, !tbaa !19
  br label %63

63:                                               ; preds = %58, %53
  %64 = load ptr, ptr @plyr, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.player_s, ptr %64, i32 0, i32 7
  store i32 100, ptr %65, align 4, !tbaa !23
  %66 = load ptr, ptr @plyr, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.player_s, ptr %66, i32 0, i32 26
  store ptr @.str, ptr %67, align 8, !tbaa !24
  br label %71

68:                                               ; preds = %43
  %69 = load ptr, ptr @plyr, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.player_s, ptr %69, i32 0, i32 26
  store ptr @.str.1, ptr %70, align 8, !tbaa !24
  br label %71

71:                                               ; preds = %68, %63
  br label %285

72:                                               ; preds = %36
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.event_t, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = trunc i32 %75 to i8
  %77 = call i32 @cht_CheckCheat(ptr noundef @cheat_ammonokey, i8 noundef signext %76)
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %118

79:                                               ; preds = %72
  %80 = load ptr, ptr @plyr, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.player_s, ptr %80, i32 0, i32 8
  store i32 200, ptr %81, align 8, !tbaa !25
  %82 = load ptr, ptr @plyr, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.player_s, ptr %82, i32 0, i32 9
  store i32 2, ptr %83, align 4, !tbaa !26
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %84

84:                                               ; preds = %93, %79
  %85 = load i32, ptr %4, align 4, !tbaa !13
  %86 = icmp slt i32 %85, 9
  br i1 %86, label %87, label %96

87:                                               ; preds = %84
  %88 = load ptr, ptr @plyr, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.player_s, ptr %88, i32 0, i32 16
  %90 = load i32, ptr %4, align 4, !tbaa !13
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [9 x i32], ptr %89, i64 0, i64 %91
  store i32 1, ptr %92, align 4, !tbaa !13
  br label %93

93:                                               ; preds = %87
  %94 = load i32, ptr %4, align 4, !tbaa !13
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %4, align 4, !tbaa !13
  br label %84, !llvm.loop !27

96:                                               ; preds = %84
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %97

97:                                               ; preds = %112, %96
  %98 = load i32, ptr %4, align 4, !tbaa !13
  %99 = icmp slt i32 %98, 4
  br i1 %99, label %100, label %115

100:                                              ; preds = %97
  %101 = load ptr, ptr @plyr, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.player_s, ptr %101, i32 0, i32 18
  %103 = load i32, ptr %4, align 4, !tbaa !13
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [4 x i32], ptr %102, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !13
  %107 = load ptr, ptr @plyr, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.player_s, ptr %107, i32 0, i32 17
  %109 = load i32, ptr %4, align 4, !tbaa !13
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [4 x i32], ptr %108, i64 0, i64 %110
  store i32 %106, ptr %111, align 4, !tbaa !13
  br label %112

112:                                              ; preds = %100
  %113 = load i32, ptr %4, align 4, !tbaa !13
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %4, align 4, !tbaa !13
  br label %97, !llvm.loop !29

115:                                              ; preds = %97
  %116 = load ptr, ptr @plyr, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.player_s, ptr %116, i32 0, i32 26
  store ptr @.str.2, ptr %117, align 8, !tbaa !24
  br label %284

118:                                              ; preds = %72
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.event_t, ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !12
  %122 = trunc i32 %121 to i8
  %123 = call i32 @cht_CheckCheat(ptr noundef @cheat_ammo, i8 noundef signext %122)
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %177

125:                                              ; preds = %118
  %126 = load ptr, ptr @plyr, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.player_s, ptr %126, i32 0, i32 8
  store i32 200, ptr %127, align 8, !tbaa !25
  %128 = load ptr, ptr @plyr, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.player_s, ptr %128, i32 0, i32 9
  store i32 2, ptr %129, align 4, !tbaa !26
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %130

130:                                              ; preds = %139, %125
  %131 = load i32, ptr %4, align 4, !tbaa !13
  %132 = icmp slt i32 %131, 9
  br i1 %132, label %133, label %142

133:                                              ; preds = %130
  %134 = load ptr, ptr @plyr, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.player_s, ptr %134, i32 0, i32 16
  %136 = load i32, ptr %4, align 4, !tbaa !13
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [9 x i32], ptr %135, i64 0, i64 %137
  store i32 1, ptr %138, align 4, !tbaa !13
  br label %139

139:                                              ; preds = %133
  %140 = load i32, ptr %4, align 4, !tbaa !13
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %4, align 4, !tbaa !13
  br label %130, !llvm.loop !30

142:                                              ; preds = %130
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %143

143:                                              ; preds = %158, %142
  %144 = load i32, ptr %4, align 4, !tbaa !13
  %145 = icmp slt i32 %144, 4
  br i1 %145, label %146, label %161

146:                                              ; preds = %143
  %147 = load ptr, ptr @plyr, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.player_s, ptr %147, i32 0, i32 18
  %149 = load i32, ptr %4, align 4, !tbaa !13
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [4 x i32], ptr %148, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !13
  %153 = load ptr, ptr @plyr, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.player_s, ptr %153, i32 0, i32 17
  %155 = load i32, ptr %4, align 4, !tbaa !13
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [4 x i32], ptr %154, i64 0, i64 %156
  store i32 %152, ptr %157, align 4, !tbaa !13
  br label %158

158:                                              ; preds = %146
  %159 = load i32, ptr %4, align 4, !tbaa !13
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %4, align 4, !tbaa !13
  br label %143, !llvm.loop !31

161:                                              ; preds = %143
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %162

162:                                              ; preds = %171, %161
  %163 = load i32, ptr %4, align 4, !tbaa !13
  %164 = icmp slt i32 %163, 6
  br i1 %164, label %165, label %174

165:                                              ; preds = %162
  %166 = load ptr, ptr @plyr, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.player_s, ptr %166, i32 0, i32 11
  %168 = load i32, ptr %4, align 4, !tbaa !13
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [6 x i32], ptr %167, i64 0, i64 %169
  store i32 1, ptr %170, align 4, !tbaa !13
  br label %171

171:                                              ; preds = %165
  %172 = load i32, ptr %4, align 4, !tbaa !13
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %4, align 4, !tbaa !13
  br label %162, !llvm.loop !32

174:                                              ; preds = %162
  %175 = load ptr, ptr @plyr, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.player_s, ptr %175, i32 0, i32 26
  store ptr @.str.3, ptr %176, align 8, !tbaa !24
  br label %283

177:                                              ; preds = %118
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.event_t, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !12
  %181 = trunc i32 %180 to i8
  %182 = call i32 @cht_CheckCheat(ptr noundef @cheat_mus, i8 noundef signext %181)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %250

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 3, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %185 = load ptr, ptr @plyr, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.player_s, ptr %185, i32 0, i32 26
  store ptr @.str.4, ptr %186, align 8, !tbaa !24
  %187 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  call void @cht_GetParam(ptr noundef @cheat_mus, ptr noundef %187)
  %188 = load i32, ptr @gamemode, align 4, !tbaa !13
  %189 = icmp eq i32 %188, 2
  br i1 %189, label %190, label %220

190:                                              ; preds = %184
  %191 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %192 = load i8, ptr %191, align 1, !tbaa !33
  %193 = sext i8 %192 to i32
  %194 = sub nsw i32 %193, 48
  %195 = mul nsw i32 %194, 10
  %196 = add nsw i32 33, %195
  %197 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 1
  %198 = load i8, ptr %197, align 1, !tbaa !33
  %199 = sext i8 %198 to i32
  %200 = add nsw i32 %196, %199
  %201 = sub nsw i32 %200, 48
  %202 = sub nsw i32 %201, 1
  store i32 %202, ptr %6, align 4, !tbaa !13
  %203 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %204 = load i8, ptr %203, align 1, !tbaa !33
  %205 = sext i8 %204 to i32
  %206 = sub nsw i32 %205, 48
  %207 = mul nsw i32 %206, 10
  %208 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 1
  %209 = load i8, ptr %208, align 1, !tbaa !33
  %210 = sext i8 %209 to i32
  %211 = add nsw i32 %207, %210
  %212 = sub nsw i32 %211, 48
  %213 = icmp sgt i32 %212, 35
  br i1 %213, label %214, label %217

214:                                              ; preds = %190
  %215 = load ptr, ptr @plyr, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.player_s, ptr %215, i32 0, i32 26
  store ptr @.str.5, ptr %216, align 8, !tbaa !24
  br label %219

217:                                              ; preds = %190
  %218 = load i32, ptr %6, align 4, !tbaa !13
  call void @S_ChangeMusic(i32 noundef %218, i32 noundef 1)
  br label %219

219:                                              ; preds = %217, %214
  br label %249

220:                                              ; preds = %184
  %221 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %222 = load i8, ptr %221, align 1, !tbaa !33
  %223 = sext i8 %222 to i32
  %224 = sub nsw i32 %223, 49
  %225 = mul nsw i32 %224, 9
  %226 = add nsw i32 1, %225
  %227 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 1
  %228 = load i8, ptr %227, align 1, !tbaa !33
  %229 = sext i8 %228 to i32
  %230 = sub nsw i32 %229, 49
  %231 = add nsw i32 %226, %230
  store i32 %231, ptr %6, align 4, !tbaa !13
  %232 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %233 = load i8, ptr %232, align 1, !tbaa !33
  %234 = sext i8 %233 to i32
  %235 = sub nsw i32 %234, 49
  %236 = mul nsw i32 %235, 9
  %237 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 1
  %238 = load i8, ptr %237, align 1, !tbaa !33
  %239 = sext i8 %238 to i32
  %240 = add nsw i32 %236, %239
  %241 = sub nsw i32 %240, 49
  %242 = icmp sgt i32 %241, 31
  br i1 %242, label %243, label %246

243:                                              ; preds = %220
  %244 = load ptr, ptr @plyr, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.player_s, ptr %244, i32 0, i32 26
  store ptr @.str.5, ptr %245, align 8, !tbaa !24
  br label %248

246:                                              ; preds = %220
  %247 = load i32, ptr %6, align 4, !tbaa !13
  call void @S_ChangeMusic(i32 noundef %247, i32 noundef 1)
  br label %248

248:                                              ; preds = %246, %243
  br label %249

249:                                              ; preds = %248, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 3, ptr %5) #4
  br label %282

250:                                              ; preds = %177
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.event_t, ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !12
  %254 = trunc i32 %253 to i8
  %255 = call i32 @cht_CheckCheat(ptr noundef @cheat_noclip, i8 noundef signext %254)
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %264, label %257

257:                                              ; preds = %250
  %258 = load ptr, ptr %3, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.event_t, ptr %258, i32 0, i32 1
  %260 = load i32, ptr %259, align 4, !tbaa !12
  %261 = trunc i32 %260 to i8
  %262 = call i32 @cht_CheckCheat(ptr noundef @cheat_commercial_noclip, i8 noundef signext %261)
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %264, label %281

264:                                              ; preds = %257, %250
  %265 = load ptr, ptr @plyr, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.player_s, ptr %265, i32 0, i32 21
  %267 = load i32, ptr %266, align 8, !tbaa !14
  %268 = xor i32 %267, 1
  store i32 %268, ptr %266, align 8, !tbaa !14
  %269 = load ptr, ptr @plyr, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.player_s, ptr %269, i32 0, i32 21
  %271 = load i32, ptr %270, align 8, !tbaa !14
  %272 = and i32 %271, 1
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %277

274:                                              ; preds = %264
  %275 = load ptr, ptr @plyr, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.player_s, ptr %275, i32 0, i32 26
  store ptr @.str.6, ptr %276, align 8, !tbaa !24
  br label %280

277:                                              ; preds = %264
  %278 = load ptr, ptr @plyr, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.player_s, ptr %278, i32 0, i32 26
  store ptr @.str.7, ptr %279, align 8, !tbaa !24
  br label %280

280:                                              ; preds = %277, %274
  br label %281

281:                                              ; preds = %280, %257
  br label %282

282:                                              ; preds = %281, %249
  br label %283

283:                                              ; preds = %282, %174
  br label %284

284:                                              ; preds = %283, %115
  br label %285

285:                                              ; preds = %284, %71
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %286

286:                                              ; preds = %331, %285
  %287 = load i32, ptr %4, align 4, !tbaa !13
  %288 = icmp slt i32 %287, 6
  br i1 %288, label %289, label %334

289:                                              ; preds = %286
  %290 = load i32, ptr %4, align 4, !tbaa !13
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [7 x %struct.cheatseq_t], ptr @cheat_powerup, i64 0, i64 %291
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.event_t, ptr %293, i32 0, i32 1
  %295 = load i32, ptr %294, align 4, !tbaa !12
  %296 = trunc i32 %295 to i8
  %297 = call i32 @cht_CheckCheat(ptr noundef %292, i8 noundef signext %296)
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %299, label %330

299:                                              ; preds = %289
  %300 = load ptr, ptr @plyr, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.player_s, ptr %300, i32 0, i32 10
  %302 = load i32, ptr %4, align 4, !tbaa !13
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [6 x i32], ptr %301, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !13
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %311, label %307

307:                                              ; preds = %299
  %308 = load ptr, ptr @plyr, align 8, !tbaa !5
  %309 = load i32, ptr %4, align 4, !tbaa !13
  %310 = call i32 @P_GivePower(ptr noundef %308, i32 noundef %309)
  br label %327

311:                                              ; preds = %299
  %312 = load i32, ptr %4, align 4, !tbaa !13
  %313 = icmp ne i32 %312, 1
  br i1 %313, label %314, label %320

314:                                              ; preds = %311
  %315 = load ptr, ptr @plyr, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.player_s, ptr %315, i32 0, i32 10
  %317 = load i32, ptr %4, align 4, !tbaa !13
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [6 x i32], ptr %316, i64 0, i64 %318
  store i32 1, ptr %319, align 4, !tbaa !13
  br label %326

320:                                              ; preds = %311
  %321 = load ptr, ptr @plyr, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.player_s, ptr %321, i32 0, i32 10
  %323 = load i32, ptr %4, align 4, !tbaa !13
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [6 x i32], ptr %322, i64 0, i64 %324
  store i32 0, ptr %325, align 4, !tbaa !13
  br label %326

326:                                              ; preds = %320, %314
  br label %327

327:                                              ; preds = %326, %307
  %328 = load ptr, ptr @plyr, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.player_s, ptr %328, i32 0, i32 26
  store ptr @.str.8, ptr %329, align 8, !tbaa !24
  br label %330

330:                                              ; preds = %327, %289
  br label %331

331:                                              ; preds = %330
  %332 = load i32, ptr %4, align 4, !tbaa !13
  %333 = add nsw i32 %332, 1
  store i32 %333, ptr %4, align 4, !tbaa !13
  br label %286, !llvm.loop !34

334:                                              ; preds = %286
  %335 = load ptr, ptr %3, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.event_t, ptr %335, i32 0, i32 1
  %337 = load i32, ptr %336, align 4, !tbaa !12
  %338 = trunc i32 %337 to i8
  %339 = call i32 @cht_CheckCheat(ptr noundef getelementptr inbounds ([7 x %struct.cheatseq_t], ptr @cheat_powerup, i64 0, i64 6), i8 noundef signext %338)
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %344

341:                                              ; preds = %334
  %342 = load ptr, ptr @plyr, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.player_s, ptr %342, i32 0, i32 26
  store ptr @.str.9, ptr %343, align 8, !tbaa !24
  br label %394

344:                                              ; preds = %334
  %345 = load ptr, ptr %3, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.event_t, ptr %345, i32 0, i32 1
  %347 = load i32, ptr %346, align 4, !tbaa !12
  %348 = trunc i32 %347 to i8
  %349 = call i32 @cht_CheckCheat(ptr noundef @cheat_choppers, i8 noundef signext %348)
  %350 = icmp ne i32 %349, 0
  br i1 %350, label %351, label %360

351:                                              ; preds = %344
  %352 = load ptr, ptr @plyr, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.player_s, ptr %352, i32 0, i32 16
  %354 = getelementptr inbounds [9 x i32], ptr %353, i64 0, i64 7
  store i32 1, ptr %354, align 4, !tbaa !13
  %355 = load ptr, ptr @plyr, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.player_s, ptr %355, i32 0, i32 10
  %357 = getelementptr inbounds [6 x i32], ptr %356, i64 0, i64 0
  store i32 1, ptr %357, align 8, !tbaa !13
  %358 = load ptr, ptr @plyr, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.player_s, ptr %358, i32 0, i32 26
  store ptr @.str.10, ptr %359, align 8, !tbaa !24
  br label %393

360:                                              ; preds = %344
  %361 = load ptr, ptr %3, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.event_t, ptr %361, i32 0, i32 1
  %363 = load i32, ptr %362, align 4, !tbaa !12
  %364 = trunc i32 %363 to i8
  %365 = call i32 @cht_CheckCheat(ptr noundef @cheat_mypos, i8 noundef signext %364)
  %366 = icmp ne i32 %365, 0
  br i1 %366, label %367, label %392

367:                                              ; preds = %360
  %368 = load i32, ptr @consoleplayer, align 4, !tbaa !13
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %369
  %371 = getelementptr inbounds %struct.player_s, ptr %370, i32 0, i32 0
  %372 = load ptr, ptr %371, align 16, !tbaa !18
  %373 = getelementptr inbounds %struct.mobj_s, ptr %372, i32 0, i32 6
  %374 = load i32, ptr %373, align 8, !tbaa !35
  %375 = load i32, ptr @consoleplayer, align 4, !tbaa !13
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %376
  %378 = getelementptr inbounds %struct.player_s, ptr %377, i32 0, i32 0
  %379 = load ptr, ptr %378, align 16, !tbaa !18
  %380 = getelementptr inbounds %struct.mobj_s, ptr %379, i32 0, i32 1
  %381 = load i32, ptr %380, align 8, !tbaa !36
  %382 = load i32, ptr @consoleplayer, align 4, !tbaa !13
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %383
  %385 = getelementptr inbounds %struct.player_s, ptr %384, i32 0, i32 0
  %386 = load ptr, ptr %385, align 16, !tbaa !18
  %387 = getelementptr inbounds %struct.mobj_s, ptr %386, i32 0, i32 2
  %388 = load i32, ptr %387, align 4, !tbaa !37
  %389 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef @ST_Responder.buf, ptr noundef @.str.11, i32 noundef %374, i32 noundef %381, i32 noundef %388) #4
  %390 = load ptr, ptr @plyr, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.player_s, ptr %390, i32 0, i32 26
  store ptr @ST_Responder.buf, ptr %391, align 8, !tbaa !24
  br label %392

392:                                              ; preds = %367, %360
  br label %393

393:                                              ; preds = %392, %351
  br label %394

394:                                              ; preds = %393, %341
  br label %395

395:                                              ; preds = %394, %33
  %396 = load ptr, ptr %3, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.event_t, ptr %396, i32 0, i32 1
  %398 = load i32, ptr %397, align 4, !tbaa !12
  %399 = trunc i32 %398 to i8
  %400 = call i32 @cht_CheckCheat(ptr noundef @cheat_clev, i8 noundef signext %399)
  %401 = icmp ne i32 %400, 0
  br i1 %401, label %402, label %483

402:                                              ; preds = %395
  call void @llvm.lifetime.start.p0(i64 3, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %403 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 0
  call void @cht_GetParam(ptr noundef @cheat_clev, ptr noundef %403)
  %404 = load i32, ptr @gamemode, align 4, !tbaa !13
  %405 = icmp eq i32 %404, 2
  br i1 %405, label %406, label %417

406:                                              ; preds = %402
  store i32 0, ptr %8, align 4, !tbaa !13
  %407 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 0
  %408 = load i8, ptr %407, align 1, !tbaa !33
  %409 = sext i8 %408 to i32
  %410 = sub nsw i32 %409, 48
  %411 = mul nsw i32 %410, 10
  %412 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 1
  %413 = load i8, ptr %412, align 1, !tbaa !33
  %414 = sext i8 %413 to i32
  %415 = add nsw i32 %411, %414
  %416 = sub nsw i32 %415, 48
  store i32 %416, ptr %9, align 4, !tbaa !13
  br label %426

417:                                              ; preds = %402
  %418 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 0
  %419 = load i8, ptr %418, align 1, !tbaa !33
  %420 = sext i8 %419 to i32
  %421 = sub nsw i32 %420, 48
  store i32 %421, ptr %8, align 4, !tbaa !13
  %422 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 1
  %423 = load i8, ptr %422, align 1, !tbaa !33
  %424 = sext i8 %423 to i32
  %425 = sub nsw i32 %424, 48
  store i32 %425, ptr %9, align 4, !tbaa !13
  br label %426

426:                                              ; preds = %417, %406
  %427 = load i32, ptr %8, align 4, !tbaa !13
  %428 = icmp slt i32 %427, 1
  br i1 %428, label %429, label %430

429:                                              ; preds = %426
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

430:                                              ; preds = %426
  %431 = load i32, ptr %9, align 4, !tbaa !13
  %432 = icmp slt i32 %431, 1
  br i1 %432, label %433, label %434

433:                                              ; preds = %430
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

434:                                              ; preds = %430
  %435 = load i32, ptr @gamemode, align 4, !tbaa !13
  %436 = icmp eq i32 %435, 3
  br i1 %436, label %437, label %444

437:                                              ; preds = %434
  %438 = load i32, ptr %8, align 4, !tbaa !13
  %439 = icmp sgt i32 %438, 4
  br i1 %439, label %443, label %440

440:                                              ; preds = %437
  %441 = load i32, ptr %9, align 4, !tbaa !13
  %442 = icmp sgt i32 %441, 9
  br i1 %442, label %443, label %444

443:                                              ; preds = %440, %437
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

444:                                              ; preds = %440, %434
  %445 = load i32, ptr @gamemode, align 4, !tbaa !13
  %446 = icmp eq i32 %445, 1
  br i1 %446, label %447, label %454

447:                                              ; preds = %444
  %448 = load i32, ptr %8, align 4, !tbaa !13
  %449 = icmp sgt i32 %448, 3
  br i1 %449, label %453, label %450

450:                                              ; preds = %447
  %451 = load i32, ptr %9, align 4, !tbaa !13
  %452 = icmp sgt i32 %451, 9
  br i1 %452, label %453, label %454

453:                                              ; preds = %450, %447
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

454:                                              ; preds = %450, %444
  %455 = load i32, ptr @gamemode, align 4, !tbaa !13
  %456 = icmp eq i32 %455, 0
  br i1 %456, label %457, label %464

457:                                              ; preds = %454
  %458 = load i32, ptr %8, align 4, !tbaa !13
  %459 = icmp sgt i32 %458, 1
  br i1 %459, label %463, label %460

460:                                              ; preds = %457
  %461 = load i32, ptr %9, align 4, !tbaa !13
  %462 = icmp sgt i32 %461, 9
  br i1 %462, label %463, label %464

463:                                              ; preds = %460, %457
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

464:                                              ; preds = %460, %454
  %465 = load i32, ptr @gamemode, align 4, !tbaa !13
  %466 = icmp eq i32 %465, 2
  br i1 %466, label %467, label %474

467:                                              ; preds = %464
  %468 = load i32, ptr %8, align 4, !tbaa !13
  %469 = icmp sgt i32 %468, 1
  br i1 %469, label %473, label %470

470:                                              ; preds = %467
  %471 = load i32, ptr %9, align 4, !tbaa !13
  %472 = icmp sgt i32 %471, 34
  br i1 %472, label %473, label %474

473:                                              ; preds = %470, %467
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %480

474:                                              ; preds = %470, %464
  %475 = load ptr, ptr @plyr, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.player_s, ptr %475, i32 0, i32 26
  store ptr @.str.12, ptr %476, align 8, !tbaa !24
  %477 = load i32, ptr @gameskill, align 4, !tbaa !13
  %478 = load i32, ptr %8, align 4, !tbaa !13
  %479 = load i32, ptr %9, align 4, !tbaa !13
  call void @G_DeferedInitNew(i32 noundef %477, i32 noundef %478, i32 noundef %479)
  store i32 0, ptr %10, align 4
  br label %480

480:                                              ; preds = %474, %473, %463, %453, %443, %433, %429
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 3, ptr %7) #4
  %481 = load i32, ptr %10, align 4
  switch i32 %481, label %486 [
    i32 0, label %482
  ]

482:                                              ; preds = %480
  br label %483

483:                                              ; preds = %482, %395
  br label %484

484:                                              ; preds = %483, %28
  br label %485

485:                                              ; preds = %484, %27
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %486

486:                                              ; preds = %485, %480
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %487 = load i32, ptr %2, align 4
  ret i32 %487
}

declare i32 @cht_CheckCheat(ptr noundef, i8 noundef signext) #2

declare void @cht_GetParam(ptr noundef, ptr noundef) #2

declare void @S_ChangeMusic(i32 noundef, i32 noundef) #2

declare i32 @P_GivePower(ptr noundef, i32 noundef) #2

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

declare void @G_DeferedInitNew(i32 noundef, i32 noundef, i32 noundef) #2

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 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 200}
!15 = !{!"player_s", !6, i64 0, !11, i64 8, !16, i64 12, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !7, i64 48, !7, i64 72, !11, i64 96, !7, i64 100, !11, i64 116, !11, i64 120, !7, i64 124, !7, i64 160, !7, i64 176, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !6, i64 224, !11, i64 232, !11, i64 236, !6, i64 240, !11, i64 248, !11, i64 252, !11, i64 256, !7, i64 264, !11, 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}
!18 = !{!15, !6, i64 0}
!19 = !{!20, !11, i64 164}
!20 = !{!"mobj_s", !21, i64 0, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !6, i64 176, !11, i64 184, !11, i64 188, !6, i64 192, !11, i64 200, !22, i64 204, !6, i64 216}
!21 = !{!"thinker_s", !6, i64 0, !6, i64 8, !7, i64 16}
!22 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !17, i64 8}
!23 = !{!15, !11, i64 36}
!24 = !{!15, !6, i64 224}
!25 = !{!15, !11, i64 40}
!26 = !{!15, !11, i64 44}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !28}
!35 = !{!20, !11, i64 56}
!36 = !{!20, !11, i64 24}
!37 = !{!20, !11, i64 28}


; 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.cheatseq_t = type { ptr, ptr }
%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 }

@cheat_mus = external dso_local global %struct.cheatseq_t, align 8
@cheat_god = external dso_local global %struct.cheatseq_t, align 8
@cheat_ammo = external dso_local global %struct.cheatseq_t, align 8
@cheat_ammonokey = external dso_local global %struct.cheatseq_t, align 8
@cheat_noclip = external dso_local global %struct.cheatseq_t, align 8
@cheat_commercial_noclip = external dso_local global %struct.cheatseq_t, align 8
@cheat_powerup = external dso_local global [7 x %struct.cheatseq_t], align 16
@cheat_choppers = external dso_local global %struct.cheatseq_t, align 8
@cheat_clev = external dso_local global %struct.cheatseq_t, align 8
@cheat_mypos = external dso_local global %struct.cheatseq_t, align 8
@netgame = external local_unnamed_addr global i32, align 4
@st_gamestate = external hidden local_unnamed_addr global i32, align 4
@st_firsttime = external hidden local_unnamed_addr global i32, align 4
@plyr = external hidden local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@gamemode = external local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@ST_Responder.buf = external hidden global [52 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@players = external local_unnamed_addr global [4 x %struct.player_s], align 16
@consoleplayer = external local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@gameskill = external local_unnamed_addr global i32, align 4

; 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: nounwind uwtable
define dso_local noundef i32 @ST_Responder(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = alloca [3 x i8], align 1
  %3 = alloca [3 x i8], align 1
  %4 = load i32, ptr %0, align 4, !tbaa !5
  switch i32 %4, label %.thread [
    i32 1, label %5
    i32 0, label %13
  ]

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !10
  %8 = and i32 %7, -65536
  %9 = icmp eq i32 %8, 1634533376
  br i1 %9, label %10, label %.thread

10:                                               ; preds = %5
  switch i32 %7, label %.thread [
    i32 1634559232, label %11
    i32 1634564096, label %12
  ]

11:                                               ; preds = %10
  store i32 0, ptr @st_gamestate, align 4, !tbaa !11
  store i32 1, ptr @st_firsttime, align 4, !tbaa !11
  br label %.thread

12:                                               ; preds = %10
  store i32 1, ptr @st_gamestate, align 4, !tbaa !11
  br label %.thread

13:                                               ; preds = %1
  %14 = load i32, ptr @netgame, align 4, !tbaa !11
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %230

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !10
  %18 = trunc i32 %17 to i8
  %19 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_god, i8 noundef signext %18) #5
  %.not68 = icmp eq i32 %19, 0
  br i1 %.not68, label %35, label %20

20:                                               ; preds = %15
  %21 = load ptr, ptr @plyr, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %21, i64 200
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %24 = xor i32 %23, 2
  store i32 %24, ptr %22, align 8, !tbaa !14
  %25 = and i32 %23, 2
  %.not75.not = icmp eq i32 %25, 0
  br i1 %.not75.not, label %26, label %33

26:                                               ; preds = %20
  %27 = load ptr, ptr %21, align 8, !tbaa !18
  %.not76 = icmp eq ptr %27, null
  br i1 %.not76, label %30, label %28

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %27, i64 164
  store i32 100, ptr %29, align 4, !tbaa !19
  br label %30

30:                                               ; preds = %28, %26
  %31 = getelementptr inbounds i8, ptr %21, i64 36
  store i32 100, ptr %31, align 4, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %21, i64 224
  store ptr @.str, ptr %32, align 8, !tbaa !24
  br label %114

33:                                               ; preds = %20
  %34 = getelementptr inbounds i8, ptr %21, i64 224
  store ptr @.str.1, ptr %34, align 8, !tbaa !24
  br label %114

35:                                               ; preds = %15
  %36 = load i32, ptr %16, align 4, !tbaa !10
  %37 = trunc i32 %36 to i8
  %38 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_ammonokey, i8 noundef signext %37) #5
  %.not69 = icmp eq i32 %38, 0
  br i1 %.not69, label %48, label %.preheader93

.preheader93:                                     ; preds = %35
  %39 = load ptr, ptr @plyr, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %39, i64 40
  store i32 200, ptr %40, align 8, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %39, i64 44
  store i32 2, ptr %41, align 4, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %39, i64 124
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %42, align 4, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %39, i64 140
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %43, align 4, !tbaa !11
  %44 = getelementptr inbounds i8, ptr %39, i64 156
  store i32 1, ptr %44, align 4, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %39, i64 176
  %46 = getelementptr inbounds i8, ptr %39, i64 160
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(16) %45, i64 16, i1 false), !tbaa !11
  %47 = getelementptr inbounds i8, ptr %39, i64 224
  store ptr @.str.2, ptr %47, align 8, !tbaa !24
  br label %114

48:                                               ; preds = %35
  %49 = load i32, ptr %16, align 4, !tbaa !10
  %50 = trunc i32 %49 to i8
  %51 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_ammo, i8 noundef signext %50) #5
  %.not70 = icmp eq i32 %51, 0
  br i1 %.not70, label %64, label %.preheader92

.preheader92:                                     ; preds = %48
  %52 = load ptr, ptr @plyr, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %52, i64 40
  store i32 200, ptr %53, align 8, !tbaa !25
  %54 = getelementptr inbounds i8, ptr %52, i64 44
  store i32 2, ptr %54, align 4, !tbaa !26
  %55 = getelementptr inbounds i8, ptr %52, i64 124
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %55, align 4, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %52, i64 140
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %56, align 4, !tbaa !11
  %57 = getelementptr inbounds i8, ptr %52, i64 156
  store i32 1, ptr %57, align 4, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %52, i64 176
  %59 = getelementptr inbounds i8, ptr %52, i64 160
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(16) %58, i64 16, i1 false), !tbaa !11
  %60 = getelementptr inbounds i8, ptr %52, i64 72
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %60, align 4, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %52, i64 88
  store i32 1, ptr %61, align 4, !tbaa !11
  %62 = getelementptr inbounds i8, ptr %52, i64 92
  store i32 1, ptr %62, align 4, !tbaa !11
  %63 = getelementptr inbounds i8, ptr %52, i64 224
  store ptr @.str.3, ptr %63, align 8, !tbaa !24
  br label %114

64:                                               ; preds = %48
  %65 = load i32, ptr %16, align 4, !tbaa !10
  %66 = trunc i32 %65 to i8
  %67 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_mus, i8 noundef signext %66) #5
  %.not71 = icmp eq i32 %67, 0
  br i1 %.not71, label %97, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %2) #5
  %69 = load ptr, ptr @plyr, align 8, !tbaa !12
  %70 = getelementptr inbounds i8, ptr %69, i64 224
  store ptr @.str.4, ptr %70, align 8, !tbaa !24
  call void @cht_GetParam(ptr noundef nonnull @cheat_mus, ptr noundef nonnull %2) #5
  %71 = load i32, ptr @gamemode, align 4, !tbaa !11
  %72 = icmp eq i32 %71, 2
  %73 = load i8, ptr %2, align 1, !tbaa !27
  %74 = sext i8 %73 to i32
  %75 = getelementptr inbounds i8, ptr %2, i64 1
  %76 = load i8, ptr %75, align 1, !tbaa !27
  %77 = sext i8 %76 to i32
  br i1 %72, label %78, label %87

78:                                               ; preds = %68
  %79 = mul nsw i32 %74, 10
  %80 = add nsw i32 %79, %77
  %81 = icmp sgt i32 %80, 563
  br i1 %81, label %82, label %85

82:                                               ; preds = %78
  %83 = load ptr, ptr @plyr, align 8, !tbaa !12
  %84 = getelementptr inbounds i8, ptr %83, i64 224
  store ptr @.str.5, ptr %84, align 8, !tbaa !24
  br label %96

85:                                               ; preds = %78
  %86 = add nsw i32 %80, -496
  call void @S_ChangeMusic(i32 noundef %86, i32 noundef 1) #5
  br label %96

87:                                               ; preds = %68
  %88 = mul nsw i32 %74, 9
  %89 = add nsw i32 %88, %77
  %90 = icmp sgt i32 %89, 521
  br i1 %90, label %91, label %94

91:                                               ; preds = %87
  %92 = load ptr, ptr @plyr, align 8, !tbaa !12
  %93 = getelementptr inbounds i8, ptr %92, i64 224
  store ptr @.str.5, ptr %93, align 8, !tbaa !24
  br label %96

94:                                               ; preds = %87
  %95 = add nsw i32 %89, -489
  call void @S_ChangeMusic(i32 noundef %95, i32 noundef 1) #5
  br label %96

96:                                               ; preds = %91, %94, %82, %85
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %2) #5
  br label %114

97:                                               ; preds = %64
  %98 = load i32, ptr %16, align 4, !tbaa !10
  %99 = trunc i32 %98 to i8
  %100 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_noclip, i8 noundef signext %99) #5
  %.not72 = icmp eq i32 %100, 0
  br i1 %.not72, label %101, label %105

101:                                              ; preds = %97
  %102 = load i32, ptr %16, align 4, !tbaa !10
  %103 = trunc i32 %102 to i8
  %104 = tail call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_commercial_noclip, i8 noundef signext %103) #5
  %.not73 = icmp eq i32 %104, 0
  br i1 %.not73, label %114, label %105

105:                                              ; preds = %101, %97
  %106 = load ptr, ptr @plyr, align 8, !tbaa !12
  %107 = getelementptr inbounds i8, ptr %106, i64 200
  %108 = load i32, ptr %107, align 8, !tbaa !14
  %109 = xor i32 %108, 1
  store i32 %109, ptr %107, align 8, !tbaa !14
  %110 = and i32 %108, 1
  %.not74.not = icmp eq i32 %110, 0
  %111 = getelementptr inbounds i8, ptr %106, i64 224
  br i1 %.not74.not, label %112, label %113

112:                                              ; preds = %105
  store ptr @.str.6, ptr %111, align 8, !tbaa !24
  br label %114

113:                                              ; preds = %105
  store ptr @.str.7, ptr %111, align 8, !tbaa !24
  br label %114

114:                                              ; preds = %.preheader93, %96, %112, %113, %101, %.preheader92, %30, %33
  %115 = load i32, ptr %16, align 4, !tbaa !10
  %116 = trunc i32 %115 to i8
  %117 = call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_powerup, i8 noundef signext %116) #5
  %.not80 = icmp eq i32 %117, 0
  br i1 %.not80, label %128, label %118

118:                                              ; preds = %114
  %119 = load ptr, ptr @plyr, align 8, !tbaa !12
  %120 = getelementptr inbounds i8, ptr %119, i64 48
  %121 = load i32, ptr %120, align 4, !tbaa !11
  %.not81 = icmp eq i32 %121, 0
  br i1 %.not81, label %122, label %124

122:                                              ; preds = %118
  %123 = call i32 @P_GivePower(ptr noundef nonnull %119, i32 noundef 0) #5
  %.pre = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %125

124:                                              ; preds = %118
  store i32 1, ptr %120, align 4, !tbaa !11
  br label %125

125:                                              ; preds = %124, %122
  %126 = phi ptr [ %119, %124 ], [ %.pre, %122 ]
  %127 = getelementptr inbounds i8, ptr %126, i64 224
  store ptr @.str.8, ptr %127, align 8, !tbaa !24
  br label %128

128:                                              ; preds = %114, %125
  %129 = load i32, ptr %16, align 4, !tbaa !10
  %130 = trunc i32 %129 to i8
  %131 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 16), i8 noundef signext %130) #5
  %.not80.1 = icmp eq i32 %131, 0
  br i1 %.not80.1, label %142, label %132

132:                                              ; preds = %128
  %133 = load ptr, ptr @plyr, align 8, !tbaa !12
  %134 = getelementptr inbounds i8, ptr %133, i64 52
  %135 = load i32, ptr %134, align 4, !tbaa !11
  %.not81.1 = icmp eq i32 %135, 0
  br i1 %.not81.1, label %137, label %136

136:                                              ; preds = %132
  store i32 0, ptr %134, align 4, !tbaa !11
  br label %139

137:                                              ; preds = %132
  %138 = call i32 @P_GivePower(ptr noundef nonnull %133, i32 noundef 1) #5
  %.pre107 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %139

139:                                              ; preds = %137, %136
  %140 = phi ptr [ %.pre107, %137 ], [ %133, %136 ]
  %141 = getelementptr inbounds i8, ptr %140, i64 224
  store ptr @.str.8, ptr %141, align 8, !tbaa !24
  br label %142

142:                                              ; preds = %139, %128
  %143 = load i32, ptr %16, align 4, !tbaa !10
  %144 = trunc i32 %143 to i8
  %145 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 32), i8 noundef signext %144) #5
  %.not80.2 = icmp eq i32 %145, 0
  br i1 %.not80.2, label %156, label %146

146:                                              ; preds = %142
  %147 = load ptr, ptr @plyr, align 8, !tbaa !12
  %148 = getelementptr inbounds i8, ptr %147, i64 56
  %149 = load i32, ptr %148, align 4, !tbaa !11
  %.not81.2 = icmp eq i32 %149, 0
  br i1 %.not81.2, label %151, label %150

150:                                              ; preds = %146
  store i32 1, ptr %148, align 4, !tbaa !11
  br label %153

151:                                              ; preds = %146
  %152 = call i32 @P_GivePower(ptr noundef nonnull %147, i32 noundef 2) #5
  %.pre108 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %153

153:                                              ; preds = %151, %150
  %154 = phi ptr [ %.pre108, %151 ], [ %147, %150 ]
  %155 = getelementptr inbounds i8, ptr %154, i64 224
  store ptr @.str.8, ptr %155, align 8, !tbaa !24
  br label %156

156:                                              ; preds = %153, %142
  %157 = load i32, ptr %16, align 4, !tbaa !10
  %158 = trunc i32 %157 to i8
  %159 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 48), i8 noundef signext %158) #5
  %.not80.3 = icmp eq i32 %159, 0
  br i1 %.not80.3, label %170, label %160

160:                                              ; preds = %156
  %161 = load ptr, ptr @plyr, align 8, !tbaa !12
  %162 = getelementptr inbounds i8, ptr %161, i64 60
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %.not81.3 = icmp eq i32 %163, 0
  br i1 %.not81.3, label %165, label %164

164:                                              ; preds = %160
  store i32 1, ptr %162, align 4, !tbaa !11
  br label %167

165:                                              ; preds = %160
  %166 = call i32 @P_GivePower(ptr noundef nonnull %161, i32 noundef 3) #5
  %.pre109 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %167

167:                                              ; preds = %165, %164
  %168 = phi ptr [ %.pre109, %165 ], [ %161, %164 ]
  %169 = getelementptr inbounds i8, ptr %168, i64 224
  store ptr @.str.8, ptr %169, align 8, !tbaa !24
  br label %170

170:                                              ; preds = %167, %156
  %171 = load i32, ptr %16, align 4, !tbaa !10
  %172 = trunc i32 %171 to i8
  %173 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 64), i8 noundef signext %172) #5
  %.not80.4 = icmp eq i32 %173, 0
  br i1 %.not80.4, label %184, label %174

174:                                              ; preds = %170
  %175 = load ptr, ptr @plyr, align 8, !tbaa !12
  %176 = getelementptr inbounds i8, ptr %175, i64 64
  %177 = load i32, ptr %176, align 4, !tbaa !11
  %.not81.4 = icmp eq i32 %177, 0
  br i1 %.not81.4, label %179, label %178

178:                                              ; preds = %174
  store i32 1, ptr %176, align 4, !tbaa !11
  br label %181

179:                                              ; preds = %174
  %180 = call i32 @P_GivePower(ptr noundef nonnull %175, i32 noundef 4) #5
  %.pre110 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %181

181:                                              ; preds = %179, %178
  %182 = phi ptr [ %.pre110, %179 ], [ %175, %178 ]
  %183 = getelementptr inbounds i8, ptr %182, i64 224
  store ptr @.str.8, ptr %183, align 8, !tbaa !24
  br label %184

184:                                              ; preds = %181, %170
  %185 = load i32, ptr %16, align 4, !tbaa !10
  %186 = trunc i32 %185 to i8
  %187 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 80), i8 noundef signext %186) #5
  %.not80.5 = icmp eq i32 %187, 0
  br i1 %.not80.5, label %198, label %188

188:                                              ; preds = %184
  %189 = load ptr, ptr @plyr, align 8, !tbaa !12
  %190 = getelementptr inbounds i8, ptr %189, i64 68
  %191 = load i32, ptr %190, align 4, !tbaa !11
  %.not81.5 = icmp eq i32 %191, 0
  br i1 %.not81.5, label %193, label %192

192:                                              ; preds = %188
  store i32 1, ptr %190, align 4, !tbaa !11
  br label %195

193:                                              ; preds = %188
  %194 = call i32 @P_GivePower(ptr noundef nonnull %189, i32 noundef 5) #5
  %.pre111 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %195

195:                                              ; preds = %193, %192
  %196 = phi ptr [ %.pre111, %193 ], [ %189, %192 ]
  %197 = getelementptr inbounds i8, ptr %196, i64 224
  store ptr @.str.8, ptr %197, align 8, !tbaa !24
  br label %198

198:                                              ; preds = %195, %184
  %199 = load i32, ptr %16, align 4, !tbaa !10
  %200 = trunc i32 %199 to i8
  %201 = call i32 @cht_CheckCheat(ptr noundef nonnull getelementptr inbounds (i8, ptr @cheat_powerup, i64 96), i8 noundef signext %200) #5
  %.not77 = icmp eq i32 %201, 0
  br i1 %.not77, label %204, label %202

202:                                              ; preds = %198
  %203 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %.sink.split

204:                                              ; preds = %198
  %205 = load i32, ptr %16, align 4, !tbaa !10
  %206 = trunc i32 %205 to i8
  %207 = call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_choppers, i8 noundef signext %206) #5
  %.not78 = icmp eq i32 %207, 0
  br i1 %.not78, label %212, label %208

208:                                              ; preds = %204
  %209 = load ptr, ptr @plyr, align 8, !tbaa !12
  %210 = getelementptr inbounds i8, ptr %209, i64 152
  store i32 1, ptr %210, align 4, !tbaa !11
  %211 = getelementptr inbounds i8, ptr %209, i64 48
  store i32 1, ptr %211, align 8, !tbaa !11
  br label %.sink.split

212:                                              ; preds = %204
  %213 = load i32, ptr %16, align 4, !tbaa !10
  %214 = trunc i32 %213 to i8
  %215 = call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_mypos, i8 noundef signext %214) #5
  %.not79 = icmp eq i32 %215, 0
  br i1 %.not79, label %230, label %216

216:                                              ; preds = %212
  %217 = load i32, ptr @consoleplayer, align 4, !tbaa !11
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [4 x %struct.player_s], ptr @players, i64 0, i64 %218
  %220 = load ptr, ptr %219, align 16, !tbaa !18
  %221 = getelementptr inbounds i8, ptr %220, i64 56
  %222 = load i32, ptr %221, align 8, !tbaa !28
  %223 = getelementptr inbounds i8, ptr %220, i64 24
  %224 = load i32, ptr %223, align 8, !tbaa !29
  %225 = getelementptr inbounds i8, ptr %220, i64 28
  %226 = load i32, ptr %225, align 4, !tbaa !30
  %227 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) @ST_Responder.buf, ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %222, i32 noundef %224, i32 noundef %226) #5
  %228 = load ptr, ptr @plyr, align 8, !tbaa !12
  br label %.sink.split

.sink.split:                                      ; preds = %208, %216, %202
  %.sink112 = phi ptr [ %203, %202 ], [ %228, %216 ], [ %209, %208 ]
  %.str.9.sink = phi ptr [ @.str.9, %202 ], [ @ST_Responder.buf, %216 ], [ @.str.10, %208 ]
  %229 = getelementptr inbounds i8, ptr %.sink112, i64 224
  store ptr %.str.9.sink, ptr %229, align 8, !tbaa !24
  br label %230

230:                                              ; preds = %.sink.split, %212, %13
  %231 = getelementptr inbounds i8, ptr %0, i64 4
  %232 = load i32, ptr %231, align 4, !tbaa !10
  %233 = trunc i32 %232 to i8
  %234 = call i32 @cht_CheckCheat(ptr noundef nonnull @cheat_clev, i8 noundef signext %233) #5
  %.not83 = icmp eq i32 %234, 0
  br i1 %.not83, label %.thread, label %235

235:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %3) #5
  call void @cht_GetParam(ptr noundef nonnull @cheat_clev, ptr noundef nonnull %3) #5
  %236 = load i32, ptr @gamemode, align 4, !tbaa !11
  %237 = icmp eq i32 %236, 2
  br i1 %237, label %.thread85, label %238

238:                                              ; preds = %235
  %239 = load i8, ptr %3, align 1, !tbaa !27
  %240 = sext i8 %239 to i32
  %241 = add nsw i32 %240, -48
  %242 = getelementptr inbounds i8, ptr %3, i64 1
  %243 = load i8, ptr %242, align 1, !tbaa !27
  %244 = sext i8 %243 to i32
  %.062 = add nsw i32 %244, -48
  %245 = icmp slt i8 %239, 49
  %246 = icmp slt i8 %243, 49
  %or.cond84 = select i1 %245, i1 true, i1 %246
  br i1 %or.cond84, label %.thread85, label %247

247:                                              ; preds = %238
  switch i32 %236, label %.critedge [
    i32 3, label %248
    i32 1, label %251
    i32 0, label %254
  ]

248:                                              ; preds = %247
  %249 = icmp ugt i32 %241, 4
  %250 = icmp ugt i8 %243, 57
  %or.cond = select i1 %249, i1 true, i1 %250
  br i1 %or.cond, label %.thread85, label %.critedge

251:                                              ; preds = %247
  %252 = icmp ugt i32 %241, 3
  %253 = icmp ugt i8 %243, 57
  %or.cond3 = select i1 %252, i1 true, i1 %253
  br i1 %or.cond3, label %.thread85, label %.critedge

254:                                              ; preds = %247
  %255 = icmp ne i32 %241, 1
  %256 = icmp ugt i8 %243, 57
  %or.cond5 = select i1 %255, i1 true, i1 %256
  br i1 %or.cond5, label %.thread85, label %.critedge

.critedge:                                        ; preds = %247, %248, %251, %254
  %257 = load ptr, ptr @plyr, align 8, !tbaa !12
  %258 = getelementptr inbounds i8, ptr %257, i64 224
  store ptr @.str.12, ptr %258, align 8, !tbaa !24
  %259 = load i32, ptr @gameskill, align 4, !tbaa !11
  call void @G_DeferedInitNew(i32 noundef %259, i32 noundef %241, i32 noundef %.062) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #5
  br label %.thread

.thread85:                                        ; preds = %235, %254, %251, %248, %238
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #5
  br label %.thread

.thread:                                          ; preds = %1, %5, %12, %11, %10, %230, %.critedge, %.thread85
  ret i32 0
}

declare i32 @cht_CheckCheat(ptr noundef, i8 noundef signext) local_unnamed_addr #2

declare void @cht_GetParam(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @S_ChangeMusic(i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @P_GivePower(ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare void @G_DeferedInitNew(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; 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) #4

attributes #0 = { mustprogress 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 = { "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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!15, !7, i64 200}
!15 = !{!"player_s", !13, i64 0, !7, i64 8, !16, i64 12, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !8, i64 48, !8, i64 72, !7, i64 96, !8, i64 100, !7, i64 116, !7, i64 120, !8, i64 124, !8, i64 160, !8, i64 176, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !13, i64 224, !7, i64 232, !7, i64 236, !13, i64 240, !7, i64 248, !7, i64 252, !7, i64 256, !8, i64 264, !7, i64 312}
!16 = !{!"", !8, i64 0, !8, i64 1, !17, i64 2, !17, i64 4, !8, i64 6, !8, i64 7}
!17 = !{!"short", !8, i64 0}
!18 = !{!15, !13, i64 0}
!19 = !{!20, !7, i64 164}
!20 = !{!"mobj_s", !21, i64 0, !7, i64 24, !7, i64 28, !7, i64 32, !13, i64 40, !13, i64 48, !7, i64 56, !7, i64 60, !7, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !13, i64 136, !7, i64 144, !13, i64 152, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !13, i64 176, !7, i64 184, !7, i64 188, !13, i64 192, !7, i64 200, !22, i64 204, !13, i64 216}
!21 = !{!"thinker_s", !13, i64 0, !13, i64 8, !8, i64 16}
!22 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !17, i64 8}
!23 = !{!15, !7, i64 36}
!24 = !{!15, !13, i64 224}
!25 = !{!15, !7, i64 40}
!26 = !{!15, !7, i64 44}
!27 = !{!8, !8, i64 0}
!28 = !{!20, !7, i64 56}
!29 = !{!20, !7, i64 24}
!30 = !{!20, !7, i64 28}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass