; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Doom/mc1-doom/src (wi_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.wbstartstruct_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.wbplayerstruct_t] }
%struct.wbplayerstruct_t = type { i32, i32, i32, i32, i32, [4 x i32], i32 }
%struct.anim_t = type { i32, i32, i32, %struct.point_t, i32, i32, [3 x ptr], i32, i32, i32, i32 }
%struct.point_t = type { i32, i32 }

@lnames = external hidden global ptr, align 8
@wbs = external hidden global ptr, align 8
@finished = external hidden global ptr, align 8
@entering = external hidden global ptr, align 8
@gamemode = external global i32, align 4
@NUMANIMS = external hidden global [4 x i32], align 16
@anims = external hidden global [4 x ptr], align 16
@num = external hidden global [10 x ptr], align 16
@wiminus = external hidden global ptr, align 8
@percent = external hidden global ptr, align 8
@colon = external hidden global ptr, align 8
@sucks = external hidden global ptr, align 8
@splat = external hidden global ptr, align 8
@yah = external hidden global [2 x ptr], align 16
@total = external hidden global ptr, align 8
@killers = external hidden global ptr, align 8
@victims = external hidden global ptr, align 8
@p = external hidden global [4 x ptr], align 16
@bstar = external hidden global ptr, align 8
@star = external hidden global ptr, align 8
@kills = external hidden global ptr, align 8
@items = external hidden global ptr, align 8
@secret = external hidden global ptr, align 8
@frags = external hidden global ptr, align 8
@sp_secret = external hidden global ptr, align 8
@time = external hidden global ptr, align 8
@par = external hidden global ptr, align 8
@deathmatch = external global i32, align 4
@netgame = external global i32, align 4
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@bg = external hidden global ptr, align 8
@NUMCMAPS = external hidden global i32, align 4
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [7 x i8], align 1
@bp = external hidden global [4 x ptr], align 16

; 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 void @WI_loadData() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [17 x i8], align 16
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 17, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %5 = load i32, ptr @gamemode, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 2
  br i1 %6, label %7, label %10

7:                                                ; preds = %0
  %8 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %9 = call ptr @strcpy(ptr noundef %8, ptr noundef @.str.1) #5
  br label %16

10:                                               ; preds = %0
  %11 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %12 = load ptr, ptr @wbs, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.wbstartstruct_t, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %11, ptr noundef @.str.2, i32 noundef %14) #5
  br label %16

16:                                               ; preds = %10, %7
  %17 = load i32, ptr @gamemode, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 3
  br i1 %18, label %19, label %28

19:                                               ; preds = %16
  %20 = load ptr, ptr @wbs, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct.wbstartstruct_t, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = icmp eq i32 %22, 3
  br i1 %23, label %24, label %27

24:                                               ; preds = %19
  %25 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %26 = call ptr @strcpy(ptr noundef %25, ptr noundef @.str.1) #5
  br label %27

27:                                               ; preds = %24, %19
  br label %28

28:                                               ; preds = %27, %16
  %29 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %30 = call ptr @W_CacheLumpName(ptr noundef %29, i32 noundef 101)
  store ptr %30, ptr @bg, align 8, !tbaa !9
  %31 = load ptr, ptr @bg, align 8, !tbaa !9
  call void @V_DrawPatchScaled(i32 noundef 0, i32 noundef 0, i32 noundef 1, ptr noundef %31)
  %32 = load i32, ptr @gamemode, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 2
  br i1 %33, label %34, label %66

34:                                               ; preds = %28
  store i32 32, ptr @NUMCMAPS, align 4, !tbaa !5
  %35 = load i32, ptr @NUMCMAPS, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = mul i64 8, %36
  %38 = trunc i64 %37 to i32
  %39 = call ptr @Z_Malloc(i32 noundef %38, i32 noundef 1, ptr noundef null)
  store ptr %39, ptr @lnames, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %62, %34
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = load i32, ptr @NUMCMAPS, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %65

44:                                               ; preds = %40
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp sge i32 %45, 0
  br i1 %46, label %47, label %60

47:                                               ; preds = %44
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = icmp sle i32 %48, 99
  br i1 %49, label %50, label %60

50:                                               ; preds = %47
  %51 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %51, ptr noundef @.str.3, i32 noundef %52) #5
  %54 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %55 = call ptr @W_CacheLumpName(ptr noundef %54, i32 noundef 1)
  %56 = load ptr, ptr @lnames, align 8, !tbaa !9
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  store ptr %55, ptr %59, align 8, !tbaa !9
  br label %61

60:                                               ; preds = %47, %44
  call void (ptr, ...) @I_Error(ptr noundef @.str.4) #6
  unreachable

61:                                               ; preds = %50
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %1, align 4, !tbaa !5
  br label %40, !llvm.loop !13

65:                                               ; preds = %40
  br label %191

66:                                               ; preds = %28
  %67 = call ptr @Z_Malloc(i32 noundef 72, i32 noundef 1, ptr noundef null)
  store ptr %67, ptr @lnames, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %84, %66
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 9
  br i1 %70, label %71, label %87

71:                                               ; preds = %68
  %72 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %73 = load ptr, ptr @wbs, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.wbstartstruct_t, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %72, ptr noundef @.str.5, i32 noundef %75, i32 noundef %76) #5
  %78 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %79 = call ptr @W_CacheLumpName(ptr noundef %78, i32 noundef 1)
  %80 = load ptr, ptr @lnames, align 8, !tbaa !9
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  store ptr %79, ptr %83, align 8, !tbaa !9
  br label %84

84:                                               ; preds = %71
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %1, align 4, !tbaa !5
  br label %68, !llvm.loop !15

87:                                               ; preds = %68
  %88 = call ptr @W_CacheLumpName(ptr noundef @.str.6, i32 noundef 1)
  store ptr %88, ptr @yah, align 16, !tbaa !9
  %89 = call ptr @W_CacheLumpName(ptr noundef @.str.7, i32 noundef 1)
  store ptr %89, ptr getelementptr inbounds ([2 x ptr], ptr @yah, i64 0, i64 1), align 8, !tbaa !9
  %90 = call ptr @W_CacheLumpName(ptr noundef @.str.8, i32 noundef 1)
  store ptr %90, ptr @splat, align 8, !tbaa !9
  %91 = load ptr, ptr @wbs, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.wbstartstruct_t, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 4, !tbaa !11
  %94 = icmp slt i32 %93, 3
  br i1 %94, label %95, label %190

95:                                               ; preds = %87
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %186, %95
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = load ptr, ptr @wbs, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.wbstartstruct_t, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [4 x i32], ptr @NUMANIMS, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = icmp slt i32 %97, %103
  br i1 %104, label %105, label %189

105:                                              ; preds = %96
  %106 = load ptr, ptr @wbs, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.wbstartstruct_t, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 4, !tbaa !11
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [4 x ptr], ptr @anims, i64 0, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %struct.anim_t, ptr %111, i64 %113
  store ptr %114, ptr %4, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %182, %105
  %116 = load i32, ptr %1, align 4, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.anim_t, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !16
  %120 = icmp slt i32 %116, %119
  br i1 %120, label %121, label %185

121:                                              ; preds = %115
  %122 = load ptr, ptr @wbs, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.wbstartstruct_t, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 4, !tbaa !11
  %125 = icmp ne i32 %124, 1
  br i1 %125, label %129, label %126

126:                                              ; preds = %121
  %127 = load i32, ptr %2, align 4, !tbaa !5
  %128 = icmp ne i32 %127, 8
  br i1 %128, label %129, label %168

129:                                              ; preds = %126, %121
  %130 = load ptr, ptr @wbs, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.wbstartstruct_t, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = icmp sge i32 %132, 0
  br i1 %133, label %134, label %166

134:                                              ; preds = %129
  %135 = load ptr, ptr @wbs, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.wbstartstruct_t, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 4, !tbaa !11
  %138 = icmp sle i32 %137, 2
  br i1 %138, label %139, label %166

139:                                              ; preds = %134
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = icmp sge i32 %140, 0
  br i1 %141, label %142, label %166

142:                                              ; preds = %139
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = icmp sle i32 %143, 99
  br i1 %144, label %145, label %166

145:                                              ; preds = %142
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = icmp sge i32 %146, 0
  br i1 %147, label %148, label %166

148:                                              ; preds = %145
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = icmp sle i32 %149, 99
  br i1 %150, label %151, label %166

151:                                              ; preds = %148
  %152 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %153 = load ptr, ptr @wbs, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.wbstartstruct_t, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 4, !tbaa !11
  %156 = load i32, ptr %2, align 4, !tbaa !5
  %157 = load i32, ptr %1, align 4, !tbaa !5
  %158 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %152, ptr noundef @.str.9, i32 noundef %155, i32 noundef %156, i32 noundef %157) #5
  %159 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %160 = call ptr @W_CacheLumpName(ptr noundef %159, i32 noundef 1)
  %161 = load ptr, ptr %4, align 8, !tbaa !9
  %162 = getelementptr inbounds %struct.anim_t, ptr %161, i32 0, i32 6
  %163 = load i32, ptr %1, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [3 x ptr], ptr %162, i64 0, i64 %164
  store ptr %160, ptr %165, align 8, !tbaa !9
  br label %167

166:                                              ; preds = %148, %145, %142, %139, %134, %129
  call void (ptr, ...) @I_Error(ptr noundef @.str.10) #6
  unreachable

167:                                              ; preds = %151
  br label %181

168:                                              ; preds = %126
  %169 = load ptr, ptr getelementptr inbounds ([4 x ptr], ptr @anims, i64 0, i64 1), align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.anim_t, ptr %169, i64 4
  %171 = getelementptr inbounds %struct.anim_t, ptr %170, i32 0, i32 6
  %172 = load i32, ptr %1, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [3 x ptr], ptr %171, i64 0, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = load ptr, ptr %4, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.anim_t, ptr %176, i32 0, i32 6
  %178 = load i32, ptr %1, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [3 x ptr], ptr %177, i64 0, i64 %179
  store ptr %175, ptr %180, align 8, !tbaa !9
  br label %181

181:                                              ; preds = %168, %167
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %1, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %1, align 4, !tbaa !5
  br label %115, !llvm.loop !19

185:                                              ; preds = %115
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %2, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %2, align 4, !tbaa !5
  br label %96, !llvm.loop !20

189:                                              ; preds = %96
  br label %190

190:                                              ; preds = %189, %87
  br label %191

191:                                              ; preds = %190, %65
  %192 = call ptr @W_CacheLumpName(ptr noundef @.str.11, i32 noundef 1)
  store ptr %192, ptr @wiminus, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %205, %191
  %194 = load i32, ptr %1, align 4, !tbaa !5
  %195 = icmp slt i32 %194, 10
  br i1 %195, label %196, label %208

196:                                              ; preds = %193
  %197 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %198 = load i32, ptr %1, align 4, !tbaa !5
  %199 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %197, ptr noundef @.str.12, i32 noundef %198) #5
  %200 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %201 = call ptr @W_CacheLumpName(ptr noundef %200, i32 noundef 1)
  %202 = load i32, ptr %1, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [10 x ptr], ptr @num, i64 0, i64 %203
  store ptr %201, ptr %204, align 8, !tbaa !9
  br label %205

205:                                              ; preds = %196
  %206 = load i32, ptr %1, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %1, align 4, !tbaa !5
  br label %193, !llvm.loop !21

208:                                              ; preds = %193
  %209 = call ptr @W_CacheLumpName(ptr noundef @.str.13, i32 noundef 1)
  store ptr %209, ptr @percent, align 8, !tbaa !9
  %210 = call ptr @W_CacheLumpName(ptr noundef @.str.14, i32 noundef 1)
  store ptr %210, ptr @finished, align 8, !tbaa !9
  %211 = call ptr @W_CacheLumpName(ptr noundef @.str.15, i32 noundef 1)
  store ptr %211, ptr @entering, align 8, !tbaa !9
  %212 = call ptr @W_CacheLumpName(ptr noundef @.str.16, i32 noundef 1)
  store ptr %212, ptr @kills, align 8, !tbaa !9
  %213 = call ptr @W_CacheLumpName(ptr noundef @.str.17, i32 noundef 1)
  store ptr %213, ptr @secret, align 8, !tbaa !9
  %214 = call ptr @W_CacheLumpName(ptr noundef @.str.18, i32 noundef 1)
  store ptr %214, ptr @sp_secret, align 8, !tbaa !9
  %215 = load i32, ptr @netgame, align 4, !tbaa !5
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %222

217:                                              ; preds = %208
  %218 = load i32, ptr @deathmatch, align 4, !tbaa !5
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %222, label %220

220:                                              ; preds = %217
  %221 = call ptr @W_CacheLumpName(ptr noundef @.str.19, i32 noundef 1)
  store ptr %221, ptr @items, align 8, !tbaa !9
  br label %224

222:                                              ; preds = %217, %208
  %223 = call ptr @W_CacheLumpName(ptr noundef @.str.20, i32 noundef 1)
  store ptr %223, ptr @items, align 8, !tbaa !9
  br label %224

224:                                              ; preds = %222, %220
  %225 = call ptr @W_CacheLumpName(ptr noundef @.str.21, i32 noundef 1)
  store ptr %225, ptr @frags, align 8, !tbaa !9
  %226 = call ptr @W_CacheLumpName(ptr noundef @.str.22, i32 noundef 1)
  store ptr %226, ptr @colon, align 8, !tbaa !9
  %227 = call ptr @W_CacheLumpName(ptr noundef @.str.23, i32 noundef 1)
  store ptr %227, ptr @time, align 8, !tbaa !9
  %228 = call ptr @W_CacheLumpName(ptr noundef @.str.24, i32 noundef 1)
  store ptr %228, ptr @sucks, align 8, !tbaa !9
  %229 = call ptr @W_CacheLumpName(ptr noundef @.str.25, i32 noundef 1)
  store ptr %229, ptr @par, align 8, !tbaa !9
  %230 = call ptr @W_CacheLumpName(ptr noundef @.str.26, i32 noundef 1)
  store ptr %230, ptr @killers, align 8, !tbaa !9
  %231 = call ptr @W_CacheLumpName(ptr noundef @.str.27, i32 noundef 1)
  store ptr %231, ptr @victims, align 8, !tbaa !9
  %232 = call ptr @W_CacheLumpName(ptr noundef @.str.28, i32 noundef 1)
  store ptr %232, ptr @total, align 8, !tbaa !9
  %233 = call ptr @W_CacheLumpName(ptr noundef @.str.29, i32 noundef 1)
  store ptr %233, ptr @star, align 8, !tbaa !9
  %234 = call ptr @W_CacheLumpName(ptr noundef @.str.30, i32 noundef 1)
  store ptr %234, ptr @bstar, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %256, %224
  %236 = load i32, ptr %1, align 4, !tbaa !5
  %237 = icmp slt i32 %236, 4
  br i1 %237, label %238, label %259

238:                                              ; preds = %235
  %239 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %240 = load i32, ptr %1, align 4, !tbaa !5
  %241 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %239, ptr noundef @.str.31, i32 noundef %240) #5
  %242 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %243 = call ptr @W_CacheLumpName(ptr noundef %242, i32 noundef 1)
  %244 = load i32, ptr %1, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [4 x ptr], ptr @p, i64 0, i64 %245
  store ptr %243, ptr %246, align 8, !tbaa !9
  %247 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %248 = load i32, ptr %1, align 4, !tbaa !5
  %249 = add nsw i32 %248, 1
  %250 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %247, ptr noundef @.str.32, i32 noundef %249) #5
  %251 = getelementptr inbounds [17 x i8], ptr %3, i64 0, i64 0
  %252 = call ptr @W_CacheLumpName(ptr noundef %251, i32 noundef 1)
  %253 = load i32, ptr %1, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [4 x ptr], ptr @bp, i64 0, i64 %254
  store ptr %252, ptr %255, align 8, !tbaa !9
  br label %256

256:                                              ; preds = %238
  %257 = load i32, ptr %1, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %1, align 4, !tbaa !5
  br label %235, !llvm.loop !22

259:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 17, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

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

declare ptr @W_CacheLumpName(ptr noundef, i32 noundef) #3

declare void @V_DrawPatchScaled(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #3

declare ptr @Z_Malloc(i32 noundef, i32 noundef, ptr noundef) #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !7, i64 40}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !6, i64 8}
!17 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 12, !6, i64 20, !6, i64 24, !7, i64 32, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68}
!18 = !{!"", !6, i64 0, !6, i64 4}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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.anim_t = type { i32, i32, i32, %struct.point_t, i32, i32, [3 x ptr], i32, i32, i32, i32 }
%struct.point_t = type { i32, i32 }

@lnames = external hidden local_unnamed_addr global ptr, align 8
@wbs = external hidden local_unnamed_addr global ptr, align 8
@finished = external hidden local_unnamed_addr global ptr, align 8
@entering = external hidden local_unnamed_addr global ptr, align 8
@gamemode = external local_unnamed_addr global i32, align 4
@NUMANIMS = external hidden local_unnamed_addr global [4 x i32], align 16
@anims = external hidden local_unnamed_addr global [4 x ptr], align 16
@num = external hidden local_unnamed_addr global [10 x ptr], align 16
@wiminus = external hidden local_unnamed_addr global ptr, align 8
@percent = external hidden local_unnamed_addr global ptr, align 8
@colon = external hidden local_unnamed_addr global ptr, align 8
@sucks = external hidden local_unnamed_addr global ptr, align 8
@splat = external hidden local_unnamed_addr global ptr, align 8
@yah = external hidden local_unnamed_addr global [2 x ptr], align 16
@total = external hidden local_unnamed_addr global ptr, align 8
@killers = external hidden local_unnamed_addr global ptr, align 8
@victims = external hidden local_unnamed_addr global ptr, align 8
@p = external hidden local_unnamed_addr global [4 x ptr], align 16
@bstar = external hidden local_unnamed_addr global ptr, align 8
@star = external hidden local_unnamed_addr global ptr, align 8
@kills = external hidden local_unnamed_addr global ptr, align 8
@items = external hidden local_unnamed_addr global ptr, align 8
@secret = external hidden local_unnamed_addr global ptr, align 8
@frags = external hidden local_unnamed_addr global ptr, align 8
@sp_secret = external hidden local_unnamed_addr global ptr, align 8
@time = external hidden local_unnamed_addr global ptr, align 8
@par = external hidden local_unnamed_addr global ptr, align 8
@deathmatch = external local_unnamed_addr global i32, align 4
@netgame = external local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@bg = external hidden local_unnamed_addr global ptr, align 8
@NUMCMAPS = external hidden local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [7 x i8], align 1
@bp = external hidden local_unnamed_addr global [4 x ptr], align 16

; 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 void @WI_loadData() local_unnamed_addr #1 {
  %1 = alloca [17 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 17, ptr nonnull %1) #6
  %2 = load i32, ptr @gamemode, align 4, !tbaa !5
  %3 = icmp eq i32 %2, 2
  br i1 %3, label %.sink.split, label %4

4:                                                ; preds = %0
  %5 = load ptr, ptr @wbs, align 8, !tbaa !9
  %6 = load i32, ptr %5, align 4, !tbaa !11
  %7 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %6) #6
  %.pr = load i32, ptr @gamemode, align 4, !tbaa !5
  %8 = icmp eq i32 %.pr, 3
  br i1 %8, label %9, label %14

9:                                                ; preds = %4
  %10 = load ptr, ptr @wbs, align 8, !tbaa !9
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %12 = icmp eq i32 %11, 3
  br i1 %12, label %.sink.split, label %14

.sink.split:                                      ; preds = %9, %0
  %13 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  br label %14

14:                                               ; preds = %.sink.split, %9, %4
  %15 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 101) #6
  store ptr %15, ptr @bg, align 8, !tbaa !9
  call void @V_DrawPatchScaled(i32 noundef 0, i32 noundef 0, i32 noundef 1, ptr noundef %15) #6
  %16 = load i32, ptr @gamemode, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 2
  br i1 %17, label %18, label %32

18:                                               ; preds = %14
  store i32 32, ptr @NUMCMAPS, align 4, !tbaa !5
  %19 = call ptr @Z_Malloc(i32 noundef 256, i32 noundef 1, ptr noundef null) #6
  store ptr %19, ptr @lnames, align 8, !tbaa !9
  %20 = load i32, ptr @NUMCMAPS, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph68, label %.loopexit

.lr.ph68:                                         ; preds = %18, %22
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %22 ], [ 0, %18 ]
  %exitcond.not = icmp eq i64 %indvars.iv88, 100
  br i1 %exitcond.not, label %31, label %22

22:                                               ; preds = %.lr.ph68
  %23 = trunc nuw nsw i64 %indvars.iv88 to i32
  %24 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %23) #6
  %25 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %26 = load ptr, ptr @lnames, align 8, !tbaa !9
  %27 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv88
  store ptr %25, ptr %27, align 8, !tbaa !9
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %28 = load i32, ptr @NUMCMAPS, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next89, %29
  br i1 %30, label %.lr.ph68, label %.loopexit, !llvm.loop !13

31:                                               ; preds = %.lr.ph68
  call void (ptr, ...) @I_Error(ptr noundef nonnull @.str.4) #7
  unreachable

32:                                               ; preds = %14
  %33 = call ptr @Z_Malloc(i32 noundef 72, i32 noundef 1, ptr noundef null) #6
  store ptr %33, ptr @lnames, align 8, !tbaa !9
  %34 = load ptr, ptr @wbs, align 8, !tbaa !9
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %35, i32 noundef 0) #6
  %37 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %38 = load ptr, ptr @lnames, align 8, !tbaa !9
  store ptr %37, ptr %38, align 8, !tbaa !9
  %39 = load ptr, ptr @wbs, align 8, !tbaa !9
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %40, i32 noundef 1) #6
  %42 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %43 = load ptr, ptr @lnames, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  store ptr %42, ptr %44, align 8, !tbaa !9
  %45 = load ptr, ptr @wbs, align 8, !tbaa !9
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %46, i32 noundef 2) #6
  %48 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %49 = load ptr, ptr @lnames, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store ptr %48, ptr %50, align 8, !tbaa !9
  %51 = load ptr, ptr @wbs, align 8, !tbaa !9
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %52, i32 noundef 3) #6
  %54 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %55 = load ptr, ptr @lnames, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 24
  store ptr %54, ptr %56, align 8, !tbaa !9
  %57 = load ptr, ptr @wbs, align 8, !tbaa !9
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %58, i32 noundef 4) #6
  %60 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %61 = load ptr, ptr @lnames, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 32
  store ptr %60, ptr %62, align 8, !tbaa !9
  %63 = load ptr, ptr @wbs, align 8, !tbaa !9
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %64, i32 noundef 5) #6
  %66 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %67 = load ptr, ptr @lnames, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %67, i64 40
  store ptr %66, ptr %68, align 8, !tbaa !9
  %69 = load ptr, ptr @wbs, align 8, !tbaa !9
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %70, i32 noundef 6) #6
  %72 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %73 = load ptr, ptr @lnames, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %73, i64 48
  store ptr %72, ptr %74, align 8, !tbaa !9
  %75 = load ptr, ptr @wbs, align 8, !tbaa !9
  %76 = load i32, ptr %75, align 4, !tbaa !11
  %77 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %76, i32 noundef 7) #6
  %78 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %79 = load ptr, ptr @lnames, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %79, i64 56
  store ptr %78, ptr %80, align 8, !tbaa !9
  %81 = load ptr, ptr @wbs, align 8, !tbaa !9
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %82, i32 noundef 8) #6
  %84 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %85 = load ptr, ptr @lnames, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %85, i64 64
  store ptr %84, ptr %86, align 8, !tbaa !9
  %87 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.6, i32 noundef 1) #6
  store ptr %87, ptr @yah, align 16, !tbaa !9
  %88 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.7, i32 noundef 1) #6
  store ptr %88, ptr getelementptr inbounds (i8, ptr @yah, i64 8), align 8, !tbaa !9
  %89 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.8, i32 noundef 1) #6
  store ptr %89, ptr @splat, align 8, !tbaa !9
  %90 = load ptr, ptr @wbs, align 8, !tbaa !9
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = icmp slt i32 %91, 3
  br i1 %92, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %32
  %93 = sext i32 %91 to i64
  %94 = getelementptr inbounds [4 x i32], ptr @NUMANIMS, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %.lr.ph65, label %.loopexit

.lr.ph65:                                         ; preds = %.preheader, %._crit_edge
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %._crit_edge ], [ 0, %.preheader ]
  %97 = phi i64 [ %146, %._crit_edge ], [ %93, %.preheader ]
  %98 = getelementptr inbounds [4 x ptr], ptr @anims, i64 0, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.anim_t, ptr %99, i64 %indvars.iv85
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = load i32, ptr %101, align 8, !tbaa !15
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph65
  %104 = getelementptr inbounds i8, ptr %100, i64 32
  %105 = icmp ult i64 %indvars.iv85, 100
  br i1 %105, label %.lr.ph.split, label %.split

.lr.ph.split:                                     ; preds = %.lr.ph
  %.not71 = icmp eq i64 %indvars.iv85, 8
  br i1 %.not71, label %.lr.ph.split.split, label %.lr.ph.split.split.us.preheader

.lr.ph.split.split.us.preheader:                  ; preds = %.lr.ph.split
  %106 = trunc nuw nsw i64 %indvars.iv85 to i32
  br label %.lr.ph.split.split.us

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split.split.us.preheader, %113
  %indvars.iv79 = phi i64 [ 0, %.lr.ph.split.split.us.preheader ], [ %indvars.iv.next80, %113 ]
  %107 = load ptr, ptr @wbs, align 8, !tbaa !9
  %108 = load i32, ptr %107, align 4, !tbaa !11
  %109 = icmp sgt i32 %108, -1
  br i1 %109, label %110, label %.split

110:                                              ; preds = %.lr.ph.split.split.us
  %111 = icmp ult i32 %108, 3
  %112 = icmp ult i64 %indvars.iv79, 100
  %or.cond11.us = and i1 %112, %111
  br i1 %or.cond11.us, label %113, label %.split

113:                                              ; preds = %110
  %114 = trunc nuw nsw i64 %indvars.iv79 to i32
  %115 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %108, i32 noundef %106, i32 noundef %114) #6
  %116 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %117 = getelementptr inbounds [3 x ptr], ptr %104, i64 0, i64 %indvars.iv79
  store ptr %116, ptr %117, align 8, !tbaa !9
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %118 = load i32, ptr %101, align 8, !tbaa !15
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next80, %119
  br i1 %120, label %.lr.ph.split.split.us, label %._crit_edge, !llvm.loop !18

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %140
  %121 = phi i32 [ %141, %140 ], [ %102, %.lr.ph.split ]
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %140 ], [ 0, %.lr.ph.split ]
  %122 = load ptr, ptr @wbs, align 8, !tbaa !9
  %123 = load i32, ptr %122, align 4, !tbaa !11
  %.not72 = icmp eq i32 %123, 1
  br i1 %.not72, label %134, label %124

124:                                              ; preds = %.lr.ph.split.split
  %125 = icmp sgt i32 %123, -1
  br i1 %125, label %126, label %.split

126:                                              ; preds = %124
  %127 = icmp ult i32 %123, 3
  %128 = icmp ult i64 %indvars.iv82, 100
  %or.cond11 = and i1 %128, %127
  br i1 %or.cond11, label %129, label %.split

129:                                              ; preds = %126
  %130 = trunc nuw nsw i64 %indvars.iv82 to i32
  %131 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %123, i32 noundef 8, i32 noundef %130) #6
  %132 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  %133 = getelementptr inbounds [3 x ptr], ptr %104, i64 0, i64 %indvars.iv82
  store ptr %132, ptr %133, align 8, !tbaa !9
  %.pre = load i32, ptr %101, align 8, !tbaa !15
  br label %140

.split:                                           ; preds = %.lr.ph, %110, %.lr.ph.split.split.us, %126, %124
  call void (ptr, ...) @I_Error(ptr noundef nonnull @.str.10) #7
  unreachable

134:                                              ; preds = %.lr.ph.split.split
  %135 = load ptr, ptr getelementptr inbounds (i8, ptr @anims, i64 8), align 8, !tbaa !9
  %136 = getelementptr inbounds i8, ptr %135, i64 320
  %137 = getelementptr inbounds [3 x ptr], ptr %136, i64 0, i64 %indvars.iv82
  %138 = load ptr, ptr %137, align 8, !tbaa !9
  %139 = getelementptr inbounds [3 x ptr], ptr %104, i64 0, i64 %indvars.iv82
  store ptr %138, ptr %139, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %129, %134
  %141 = phi i32 [ %.pre, %129 ], [ %121, %134 ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %142 = sext i32 %141 to i64
  %143 = icmp slt i64 %indvars.iv.next83, %142
  br i1 %143, label %.lr.ph.split.split, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %113, %140, %.lr.ph65
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %144 = load ptr, ptr @wbs, align 8, !tbaa !9
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [4 x i32], ptr @NUMANIMS, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = icmp slt i64 %indvars.iv.next86, %149
  br i1 %150, label %.lr.ph65, label %.loopexit, !llvm.loop !19

.loopexit:                                        ; preds = %._crit_edge, %22, %.preheader, %18, %32
  %151 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.11, i32 noundef 1) #6
  store ptr %151, ptr @wiminus, align 8, !tbaa !9
  %152 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 0) #6
  %153 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %153, ptr @num, align 16, !tbaa !9
  %154 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 1) #6
  %155 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %155, ptr getelementptr inbounds (i8, ptr @num, i64 8), align 8, !tbaa !9
  %156 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 2) #6
  %157 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %157, ptr getelementptr inbounds (i8, ptr @num, i64 16), align 16, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 3) #6
  %159 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %159, ptr getelementptr inbounds (i8, ptr @num, i64 24), align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 4) #6
  %161 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %161, ptr getelementptr inbounds (i8, ptr @num, i64 32), align 16, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 5) #6
  %163 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %163, ptr getelementptr inbounds (i8, ptr @num, i64 40), align 8, !tbaa !9
  %164 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 6) #6
  %165 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %165, ptr getelementptr inbounds (i8, ptr @num, i64 48), align 16, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 7) #6
  %167 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %167, ptr getelementptr inbounds (i8, ptr @num, i64 56), align 8, !tbaa !9
  %168 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 8) #6
  %169 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %169, ptr getelementptr inbounds (i8, ptr @num, i64 64), align 16, !tbaa !9
  %170 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 9) #6
  %171 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %171, ptr getelementptr inbounds (i8, ptr @num, i64 72), align 8, !tbaa !9
  %172 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.13, i32 noundef 1) #6
  store ptr %172, ptr @percent, align 8, !tbaa !9
  %173 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.14, i32 noundef 1) #6
  store ptr %173, ptr @finished, align 8, !tbaa !9
  %174 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.15, i32 noundef 1) #6
  store ptr %174, ptr @entering, align 8, !tbaa !9
  %175 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.16, i32 noundef 1) #6
  store ptr %175, ptr @kills, align 8, !tbaa !9
  %176 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.17, i32 noundef 1) #6
  store ptr %176, ptr @secret, align 8, !tbaa !9
  %177 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.18, i32 noundef 1) #6
  store ptr %177, ptr @sp_secret, align 8, !tbaa !9
  %178 = load i32, ptr @netgame, align 4, !tbaa !5
  %179 = icmp eq i32 %178, 0
  %180 = load i32, ptr @deathmatch, align 4
  %181 = icmp ne i32 %180, 0
  %or.cond13 = select i1 %179, i1 true, i1 %181
  %.str.20..str.19 = select i1 %or.cond13, ptr @.str.20, ptr @.str.19
  %182 = call ptr @W_CacheLumpName(ptr noundef nonnull %.str.20..str.19, i32 noundef 1) #6
  store ptr %182, ptr @items, align 8, !tbaa !9
  %183 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.21, i32 noundef 1) #6
  store ptr %183, ptr @frags, align 8, !tbaa !9
  %184 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.22, i32 noundef 1) #6
  store ptr %184, ptr @colon, align 8, !tbaa !9
  %185 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.23, i32 noundef 1) #6
  store ptr %185, ptr @time, align 8, !tbaa !9
  %186 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.24, i32 noundef 1) #6
  store ptr %186, ptr @sucks, align 8, !tbaa !9
  %187 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.25, i32 noundef 1) #6
  store ptr %187, ptr @par, align 8, !tbaa !9
  %188 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.26, i32 noundef 1) #6
  store ptr %188, ptr @killers, align 8, !tbaa !9
  %189 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.27, i32 noundef 1) #6
  store ptr %189, ptr @victims, align 8, !tbaa !9
  %190 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.28, i32 noundef 1) #6
  store ptr %190, ptr @total, align 8, !tbaa !9
  %191 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.29, i32 noundef 1) #6
  store ptr %191, ptr @star, align 8, !tbaa !9
  %192 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.30, i32 noundef 1) #6
  store ptr %192, ptr @bstar, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef 0) #6
  %194 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %194, ptr @p, align 16, !tbaa !9
  %195 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef 1) #6
  %196 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %196, ptr @bp, align 16, !tbaa !9
  %197 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef 1) #6
  %198 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %198, ptr getelementptr inbounds (i8, ptr @p, i64 8), align 8, !tbaa !9
  %199 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef 2) #6
  %200 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %200, ptr getelementptr inbounds (i8, ptr @bp, i64 8), align 8, !tbaa !9
  %201 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef 2) #6
  %202 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %202, ptr getelementptr inbounds (i8, ptr @p, i64 16), align 16, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef 3) #6
  %204 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %204, ptr getelementptr inbounds (i8, ptr @bp, i64 16), align 16, !tbaa !9
  %205 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef 3) #6
  %206 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %206, ptr getelementptr inbounds (i8, ptr @p, i64 24), align 8, !tbaa !9
  %207 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef 4) #6
  %208 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #6
  store ptr %208, ptr getelementptr inbounds (i8, ptr @bp, i64 24), align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 17, ptr nonnull %1) #6
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) 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 ptr @W_CacheLumpName(ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @V_DrawPatchScaled(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare ptr @Z_Malloc(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !7, i64 40}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 8}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !17, i64 12, !6, i64 20, !6, i64 24, !7, i64 32, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68}
!17 = !{!"", !6, i64 0, !6, i64 4}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass