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

@sbar = external hidden global ptr, align 8
@faceback = external hidden global ptr, align 8
@consoleplayer = external global i32, align 4
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@tallnum = external hidden global [10 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@shortnum = external hidden global [10 x ptr], align 16
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@tallpercent = external hidden global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@keys = external hidden global [6 x ptr], align 16
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@armsbg = external hidden global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@arms = external hidden global [6 x [2 x ptr]], align 16
@.str.19 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [10 x i8], align 1
@faces = external hidden global [42 x ptr], align 16
@.str.22 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ST_loadGraphics() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [9 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 9, ptr %4) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %25, %0
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = icmp slt i32 %6, 10
  br i1 %7, label %8, label %28

8:                                                ; preds = %5
  %9 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %9, ptr noundef @.str.13, i32 noundef %10) #4
  %12 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %13 = call ptr @W_CacheLumpName(ptr noundef %12, i32 noundef 1)
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [10 x ptr], ptr @tallnum, i64 0, i64 %15
  store ptr %13, ptr %16, align 8, !tbaa !9
  %17 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %17, ptr noundef @.str.14, i32 noundef %18) #4
  %20 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %21 = call ptr @W_CacheLumpName(ptr noundef %20, i32 noundef 1)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [10 x ptr], ptr @shortnum, i64 0, i64 %23
  store ptr %21, ptr %24, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %8
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %1, align 4, !tbaa !5
  br label %5, !llvm.loop !11

28:                                               ; preds = %5
  %29 = call ptr @W_CacheLumpName(ptr noundef @.str.15, i32 noundef 1)
  store ptr %29, ptr @tallpercent, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %42, %28
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 6
  br i1 %32, label %33, label %45

33:                                               ; preds = %30
  %34 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %34, ptr noundef @.str.16, i32 noundef %35) #4
  %37 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %38 = call ptr @W_CacheLumpName(ptr noundef %37, i32 noundef 1)
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [6 x ptr], ptr @keys, i64 0, i64 %40
  store ptr %38, ptr %41, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %33
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %1, align 4, !tbaa !5
  br label %30, !llvm.loop !13

45:                                               ; preds = %30
  %46 = call ptr @W_CacheLumpName(ptr noundef @.str.17, i32 noundef 1)
  store ptr %46, ptr @armsbg, align 8, !tbaa !9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %70, %45
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 6
  br i1 %49, label %50, label %73

50:                                               ; preds = %47
  %51 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = add nsw i32 %52, 2
  %54 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %51, ptr noundef @.str.18, i32 noundef %53) #4
  %55 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %56 = call ptr @W_CacheLumpName(ptr noundef %55, i32 noundef 1)
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [6 x [2 x ptr]], ptr @arms, i64 0, i64 %58
  %60 = getelementptr inbounds [2 x ptr], ptr %59, i64 0, i64 0
  store ptr %56, ptr %60, align 16, !tbaa !9
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = add nsw i32 %61, 2
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [10 x ptr], ptr @shortnum, i64 0, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [6 x [2 x ptr]], ptr @arms, i64 0, i64 %67
  %69 = getelementptr inbounds [2 x ptr], ptr %68, i64 0, i64 1
  store ptr %65, ptr %69, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %50
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %1, align 4, !tbaa !5
  br label %47, !llvm.loop !14

73:                                               ; preds = %47
  %74 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %75 = load i32, ptr @consoleplayer, align 4, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %74, ptr noundef @.str.19, i32 noundef %75) #4
  %77 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %78 = call ptr @W_CacheLumpName(ptr noundef %77, i32 noundef 1)
  store ptr %78, ptr @faceback, align 8, !tbaa !9
  %79 = call ptr @W_CacheLumpName(ptr noundef @.str.20, i32 noundef 1)
  store ptr %79, ptr @sbar, align 8, !tbaa !9
  store i32 0, ptr %3, align 4, !tbaa !5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %147, %73
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = icmp slt i32 %81, 5
  br i1 %82, label %83, label %150

83:                                               ; preds = %80
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %98, %83
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 3
  br i1 %86, label %87, label %101

87:                                               ; preds = %84
  %88 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %89 = load i32, ptr %1, align 4, !tbaa !5
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %88, ptr noundef @.str.21, i32 noundef %89, i32 noundef %90) #4
  %92 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %93 = call ptr @W_CacheLumpName(ptr noundef %92, i32 noundef 1)
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %3, align 4, !tbaa !5
  %96 = sext i32 %94 to i64
  %97 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %96
  store ptr %93, ptr %97, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %87
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %2, align 4, !tbaa !5
  br label %84, !llvm.loop !15

101:                                              ; preds = %84
  %102 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %103 = load i32, ptr %1, align 4, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %102, ptr noundef @.str.22, i32 noundef %103) #4
  %105 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %106 = call ptr @W_CacheLumpName(ptr noundef %105, i32 noundef 1)
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %3, align 4, !tbaa !5
  %109 = sext i32 %107 to i64
  %110 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %109
  store ptr %106, ptr %110, align 8, !tbaa !9
  %111 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %112 = load i32, ptr %1, align 4, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %111, ptr noundef @.str.23, i32 noundef %112) #4
  %114 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %115 = call ptr @W_CacheLumpName(ptr noundef %114, i32 noundef 1)
  %116 = load i32, ptr %3, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %3, align 4, !tbaa !5
  %118 = sext i32 %116 to i64
  %119 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %118
  store ptr %115, ptr %119, align 8, !tbaa !9
  %120 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %120, ptr noundef @.str.24, i32 noundef %121) #4
  %123 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %124 = call ptr @W_CacheLumpName(ptr noundef %123, i32 noundef 1)
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %3, align 4, !tbaa !5
  %127 = sext i32 %125 to i64
  %128 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %127
  store ptr %124, ptr %128, align 8, !tbaa !9
  %129 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %130 = load i32, ptr %1, align 4, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %129, ptr noundef @.str.25, i32 noundef %130) #4
  %132 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %133 = call ptr @W_CacheLumpName(ptr noundef %132, i32 noundef 1)
  %134 = load i32, ptr %3, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %3, align 4, !tbaa !5
  %136 = sext i32 %134 to i64
  %137 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %136
  store ptr %133, ptr %137, align 8, !tbaa !9
  %138 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %139 = load i32, ptr %1, align 4, !tbaa !5
  %140 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %138, ptr noundef @.str.26, i32 noundef %139) #4
  %141 = getelementptr inbounds [9 x i8], ptr %4, i64 0, i64 0
  %142 = call ptr @W_CacheLumpName(ptr noundef %141, i32 noundef 1)
  %143 = load i32, ptr %3, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %3, align 4, !tbaa !5
  %145 = sext i32 %143 to i64
  %146 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %145
  store ptr %142, ptr %146, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %101
  %148 = load i32, ptr %1, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %1, align 4, !tbaa !5
  br label %80, !llvm.loop !16

150:                                              ; preds = %80
  %151 = call ptr @W_CacheLumpName(ptr noundef @.str.27, i32 noundef 1)
  %152 = load i32, ptr %3, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %3, align 4, !tbaa !5
  %154 = sext i32 %152 to i64
  %155 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %154
  store ptr %151, ptr %155, align 8, !tbaa !9
  %156 = call ptr @W_CacheLumpName(ptr noundef @.str.28, i32 noundef 1)
  %157 = load i32, ptr %3, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %3, align 4, !tbaa !5
  %159 = sext i32 %157 to i64
  %160 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %159
  store ptr %156, ptr %160, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 9, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

@sbar = external hidden local_unnamed_addr global ptr, align 8
@faceback = external hidden local_unnamed_addr global ptr, align 8
@consoleplayer = external local_unnamed_addr global i32, align 4
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@tallnum = external hidden local_unnamed_addr global [10 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@shortnum = external hidden local_unnamed_addr global [10 x ptr], align 16
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@tallpercent = external hidden local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@keys = external hidden local_unnamed_addr global [6 x ptr], align 16
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@armsbg = external hidden local_unnamed_addr global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@arms = external hidden local_unnamed_addr global [6 x [2 x ptr]], align 16
@.str.19 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [10 x i8], align 1
@faces = external hidden local_unnamed_addr global [42 x ptr], align 16
@.str.22 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ST_loadGraphics() local_unnamed_addr #2 {
  %1 = alloca [9 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %1) #4
  %2 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 0) #4
  %3 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %3, ptr @tallnum, align 16, !tbaa !5
  %4 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 0) #4
  %5 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %5, ptr @shortnum, align 16, !tbaa !5
  %6 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 1) #4
  %7 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %7, ptr getelementptr inbounds (i8, ptr @tallnum, i64 8), align 8, !tbaa !5
  %8 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 1) #4
  %9 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %9, ptr getelementptr inbounds (i8, ptr @shortnum, i64 8), align 8, !tbaa !5
  %10 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 2) #4
  %11 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %11, ptr getelementptr inbounds (i8, ptr @tallnum, i64 16), align 16, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 2) #4
  %13 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %13, ptr getelementptr inbounds (i8, ptr @shortnum, i64 16), align 16, !tbaa !5
  %14 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 3) #4
  %15 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %15, ptr getelementptr inbounds (i8, ptr @tallnum, i64 24), align 8, !tbaa !5
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 3) #4
  %17 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %17, ptr getelementptr inbounds (i8, ptr @shortnum, i64 24), align 8, !tbaa !5
  %18 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 4) #4
  %19 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %19, ptr getelementptr inbounds (i8, ptr @tallnum, i64 32), align 16, !tbaa !5
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 4) #4
  %21 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %21, ptr getelementptr inbounds (i8, ptr @shortnum, i64 32), align 16, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 5) #4
  %23 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %23, ptr getelementptr inbounds (i8, ptr @tallnum, i64 40), align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 5) #4
  %25 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %25, ptr getelementptr inbounds (i8, ptr @shortnum, i64 40), align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 6) #4
  %27 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %27, ptr getelementptr inbounds (i8, ptr @tallnum, i64 48), align 16, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 6) #4
  %29 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %29, ptr getelementptr inbounds (i8, ptr @shortnum, i64 48), align 16, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 7) #4
  %31 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %31, ptr getelementptr inbounds (i8, ptr @tallnum, i64 56), align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 7) #4
  %33 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %33, ptr getelementptr inbounds (i8, ptr @shortnum, i64 56), align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 8) #4
  %35 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %35, ptr getelementptr inbounds (i8, ptr @tallnum, i64 64), align 16, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 8) #4
  %37 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %37, ptr getelementptr inbounds (i8, ptr @shortnum, i64 64), align 16, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 9) #4
  %39 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %39, ptr getelementptr inbounds (i8, ptr @tallnum, i64 72), align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 9) #4
  %41 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %41, ptr getelementptr inbounds (i8, ptr @shortnum, i64 72), align 8, !tbaa !5
  %42 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.15, i32 noundef 1) #4
  store ptr %42, ptr @tallpercent, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 0) #4
  %44 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %44, ptr @keys, align 16, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 1) #4
  %46 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %46, ptr getelementptr inbounds (i8, ptr @keys, i64 8), align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 2) #4
  %48 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %48, ptr getelementptr inbounds (i8, ptr @keys, i64 16), align 16, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 3) #4
  %50 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %50, ptr getelementptr inbounds (i8, ptr @keys, i64 24), align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 4) #4
  %52 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %52, ptr getelementptr inbounds (i8, ptr @keys, i64 32), align 16, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 5) #4
  %54 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %54, ptr getelementptr inbounds (i8, ptr @keys, i64 40), align 8, !tbaa !5
  %55 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.17, i32 noundef 1) #4
  store ptr %55, ptr @armsbg, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 2) #4
  %57 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %57, ptr @arms, align 16, !tbaa !5
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 16), align 16, !tbaa !5
  store ptr %58, ptr getelementptr inbounds (i8, ptr @arms, i64 8), align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 3) #4
  %60 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %60, ptr getelementptr inbounds (i8, ptr @arms, i64 16), align 16, !tbaa !5
  %61 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 24), align 8, !tbaa !5
  store ptr %61, ptr getelementptr inbounds (i8, ptr @arms, i64 24), align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 4) #4
  %63 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %63, ptr getelementptr inbounds (i8, ptr @arms, i64 32), align 16, !tbaa !5
  %64 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 32), align 16, !tbaa !5
  store ptr %64, ptr getelementptr inbounds (i8, ptr @arms, i64 40), align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 5) #4
  %66 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %66, ptr getelementptr inbounds (i8, ptr @arms, i64 48), align 16, !tbaa !5
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 40), align 8, !tbaa !5
  store ptr %67, ptr getelementptr inbounds (i8, ptr @arms, i64 56), align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 6) #4
  %69 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %69, ptr getelementptr inbounds (i8, ptr @arms, i64 64), align 16, !tbaa !5
  %70 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 48), align 16, !tbaa !5
  store ptr %70, ptr getelementptr inbounds (i8, ptr @arms, i64 72), align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 7) #4
  %72 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %72, ptr getelementptr inbounds (i8, ptr @arms, i64 80), align 16, !tbaa !5
  %73 = load ptr, ptr getelementptr inbounds (i8, ptr @shortnum, i64 56), align 8, !tbaa !5
  store ptr %73, ptr getelementptr inbounds (i8, ptr @arms, i64 88), align 8, !tbaa !5
  %74 = load i32, ptr @consoleplayer, align 4, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %74) #4
  %76 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  store ptr %76, ptr @faceback, align 8, !tbaa !5
  %77 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.20, i32 noundef 1) #4
  store ptr %77, ptr @sbar, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %0, %.preheader
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next50, %.preheader ]
  %.343 = phi i32 [ 0, %0 ], [ %112, %.preheader ]
  %78 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %.343, i32 noundef 0) #4
  %79 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %80 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %indvars.iv
  store ptr %79, ptr %80, align 16, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %.343, i32 noundef 1) #4
  %82 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %83 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %indvars.iv.next
  store ptr %82, ptr %83, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %.343, i32 noundef 2) #4
  %85 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %86 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %indvars.iv.next.1
  store ptr %85, ptr %86, align 16, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %.343) #4
  %88 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %89 = shl i64 %indvars.iv, 32
  %sext = ashr exact i64 %89, 32
  %90 = or disjoint i64 %sext, 3
  %91 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %90
  store ptr %88, ptr %91, align 8, !tbaa !5
  %92 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %.343) #4
  %93 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %94 = shl i64 %indvars.iv, 32
  %sext52 = ashr exact i64 %94, 32
  %95 = or disjoint i64 %sext52, 4
  %96 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %95
  store ptr %93, ptr %96, align 16, !tbaa !5
  %97 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.24, i32 noundef %.343) #4
  %98 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %99 = shl i64 %indvars.iv, 32
  %sext53 = ashr exact i64 %99, 32
  %100 = or disjoint i64 %sext53, 5
  %101 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %100
  store ptr %98, ptr %101, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.25, i32 noundef %.343) #4
  %103 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %104 = shl i64 %indvars.iv, 32
  %sext54 = ashr exact i64 %104, 32
  %105 = or disjoint i64 %sext54, 6
  %106 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %105
  store ptr %103, ptr %106, align 16, !tbaa !5
  %107 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %.343) #4
  %108 = call ptr @W_CacheLumpName(ptr noundef nonnull %1, i32 noundef 1) #4
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv, 8
  %109 = shl i64 %indvars.iv, 32
  %sext55 = ashr exact i64 %109, 32
  %110 = or disjoint i64 %sext55, 7
  %111 = getelementptr inbounds [42 x ptr], ptr @faces, i64 0, i64 %110
  store ptr %108, ptr %111, align 8, !tbaa !5
  %112 = add nuw nsw i32 %.343, 1
  %exitcond.not = icmp eq i32 %112, 5
  br i1 %exitcond.not, label %113, label %.preheader, !llvm.loop !11

113:                                              ; preds = %.preheader
  %114 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.27, i32 noundef 1) #4
  store ptr %114, ptr getelementptr inbounds (i8, ptr @faces, i64 320), align 16, !tbaa !5
  %115 = call ptr @W_CacheLumpName(ptr noundef nonnull @.str.28, i32 noundef 1) #4
  store ptr %115, ptr getelementptr inbounds (i8, ptr @faces, i64 328), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %1) #4
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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