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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@finesine = external global [10240 x i32], align 16
@onground = external dso_local global i32, align 4
@leveltime = external global i32, align 4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @FixedMul(i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @P_CalcHeight(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.player_s, ptr %6, i32 0, i32 0
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %struct.mobj_s, ptr %8, i32 0, i32 16
  %10 = load i32, ptr %9, align 8, !tbaa !14
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.player_s, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct.mobj_s, ptr %13, i32 0, i32 16
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = call i32 @FixedMul(i32 noundef %10, i32 noundef %15)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.player_s, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.mobj_s, ptr %19, i32 0, i32 17
  %21 = load i32, ptr %20, align 4, !tbaa !18
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.player_s, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.mobj_s, ptr %24, i32 0, i32 17
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = call i32 @FixedMul(i32 noundef %21, i32 noundef %26)
  %28 = add nsw i32 %16, %27
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.player_s, ptr %29, i32 0, i32 6
  store i32 %28, ptr %30, align 8, !tbaa !19
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.player_s, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %32, align 8, !tbaa !19
  %34 = ashr i32 %33, 2
  store i32 %34, ptr %32, align 8, !tbaa !19
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.player_s, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %36, align 8, !tbaa !19
  %38 = icmp sgt i32 %37, 1048576
  br i1 %38, label %39, label %42

39:                                               ; preds = %1
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.player_s, ptr %40, i32 0, i32 6
  store i32 1048576, ptr %41, align 8, !tbaa !19
  br label %42

42:                                               ; preds = %39, %1
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.player_s, ptr %43, i32 0, i32 21
  %45 = load i32, ptr %44, align 8, !tbaa !20
  %46 = and i32 %45, 4
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %51, label %48

48:                                               ; preds = %42
  %49 = load i32, ptr @onground, align 4, !tbaa !21
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %91, label %51

51:                                               ; preds = %48, %42
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.player_s, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.mobj_s, ptr %54, i32 0, i32 3
  %56 = load i32, ptr %55, align 8, !tbaa !22
  %57 = add nsw i32 %56, 2686976
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.player_s, ptr %58, i32 0, i32 3
  store i32 %57, ptr %59, align 4, !tbaa !23
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.player_s, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 4, !tbaa !23
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.player_s, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.mobj_s, ptr %65, i32 0, i32 13
  %67 = load i32, ptr %66, align 4, !tbaa !24
  %68 = sub nsw i32 %67, 262144
  %69 = icmp sgt i32 %62, %68
  br i1 %69, label %70, label %79

70:                                               ; preds = %51
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.player_s, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.mobj_s, ptr %73, i32 0, i32 13
  %75 = load i32, ptr %74, align 4, !tbaa !24
  %76 = sub nsw i32 %75, 262144
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.player_s, ptr %77, i32 0, i32 3
  store i32 %76, ptr %78, align 4, !tbaa !23
  br label %79

79:                                               ; preds = %70, %51
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.player_s, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.mobj_s, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 8, !tbaa !22
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.player_s, ptr %85, i32 0, i32 4
  %87 = load i32, ptr %86, align 8, !tbaa !25
  %88 = add nsw i32 %84, %87
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.player_s, ptr %89, i32 0, i32 3
  store i32 %88, ptr %90, align 4, !tbaa !23
  store i32 1, ptr %5, align 4
  br label %194

91:                                               ; preds = %48
  %92 = load i32, ptr @leveltime, align 4, !tbaa !21
  %93 = mul nsw i32 409, %92
  %94 = and i32 %93, 8191
  store i32 %94, ptr %3, align 4, !tbaa !21
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.player_s, ptr %95, i32 0, i32 6
  %97 = load i32, ptr %96, align 8, !tbaa !19
  %98 = sdiv i32 %97, 2
  %99 = load i32, ptr %3, align 4, !tbaa !21
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !21
  %103 = call i32 @FixedMul(i32 noundef %98, i32 noundef %102)
  store i32 %103, ptr %4, align 4, !tbaa !21
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.player_s, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 8, !tbaa !26
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %160

108:                                              ; preds = %91
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.player_s, ptr %109, i32 0, i32 5
  %111 = load i32, ptr %110, align 4, !tbaa !27
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.player_s, ptr %112, i32 0, i32 4
  %114 = load i32, ptr %113, align 8, !tbaa !25
  %115 = add nsw i32 %114, %111
  store i32 %115, ptr %113, align 8, !tbaa !25
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.player_s, ptr %116, i32 0, i32 4
  %118 = load i32, ptr %117, align 8, !tbaa !25
  %119 = icmp sgt i32 %118, 2686976
  br i1 %119, label %120, label %125

120:                                              ; preds = %108
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.player_s, ptr %121, i32 0, i32 4
  store i32 2686976, ptr %122, align 8, !tbaa !25
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.player_s, ptr %123, i32 0, i32 5
  store i32 0, ptr %124, align 4, !tbaa !27
  br label %125

125:                                              ; preds = %120, %108
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.player_s, ptr %126, i32 0, i32 4
  %128 = load i32, ptr %127, align 8, !tbaa !25
  %129 = icmp slt i32 %128, 1343488
  br i1 %129, label %130, label %141

130:                                              ; preds = %125
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.player_s, ptr %131, i32 0, i32 4
  store i32 1343488, ptr %132, align 8, !tbaa !25
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.player_s, ptr %133, i32 0, i32 5
  %135 = load i32, ptr %134, align 4, !tbaa !27
  %136 = icmp sle i32 %135, 0
  br i1 %136, label %137, label %140

137:                                              ; preds = %130
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.player_s, ptr %138, i32 0, i32 5
  store i32 1, ptr %139, align 4, !tbaa !27
  br label %140

140:                                              ; preds = %137, %130
  br label %141

141:                                              ; preds = %140, %125
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.player_s, ptr %142, i32 0, i32 5
  %144 = load i32, ptr %143, align 4, !tbaa !27
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %159

146:                                              ; preds = %141
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.player_s, ptr %147, i32 0, i32 5
  %149 = load i32, ptr %148, align 4, !tbaa !27
  %150 = add nsw i32 %149, 16384
  store i32 %150, ptr %148, align 4, !tbaa !27
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.player_s, ptr %151, i32 0, i32 5
  %153 = load i32, ptr %152, align 4, !tbaa !27
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %158, label %155

155:                                              ; preds = %146
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.player_s, ptr %156, i32 0, i32 5
  store i32 1, ptr %157, align 4, !tbaa !27
  br label %158

158:                                              ; preds = %155, %146
  br label %159

159:                                              ; preds = %158, %141
  br label %160

160:                                              ; preds = %159, %91
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.player_s, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.mobj_s, ptr %163, i32 0, i32 3
  %165 = load i32, ptr %164, align 8, !tbaa !22
  %166 = load ptr, ptr %2, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.player_s, ptr %166, i32 0, i32 4
  %168 = load i32, ptr %167, align 8, !tbaa !25
  %169 = add nsw i32 %165, %168
  %170 = load i32, ptr %4, align 4, !tbaa !21
  %171 = add nsw i32 %169, %170
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.player_s, ptr %172, i32 0, i32 3
  store i32 %171, ptr %173, align 4, !tbaa !23
  %174 = load ptr, ptr %2, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.player_s, ptr %174, i32 0, i32 3
  %176 = load i32, ptr %175, align 4, !tbaa !23
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.player_s, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.mobj_s, ptr %179, i32 0, i32 13
  %181 = load i32, ptr %180, align 4, !tbaa !24
  %182 = sub nsw i32 %181, 262144
  %183 = icmp sgt i32 %176, %182
  br i1 %183, label %184, label %193

184:                                              ; preds = %160
  %185 = load ptr, ptr %2, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.player_s, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.mobj_s, ptr %187, i32 0, i32 13
  %189 = load i32, ptr %188, align 4, !tbaa !24
  %190 = sub nsw i32 %189, 262144
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.player_s, ptr %191, i32 0, i32 3
  store i32 %190, ptr %192, align 4, !tbaa !23
  br label %193

193:                                              ; preds = %184, %160
  store i32 0, ptr %5, align 4
  br label %194

194:                                              ; preds = %193, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  %195 = load i32, ptr %5, align 4
  switch i32 %195, label %197 [
    i32 0, label %196
    i32 1, label %196
  ]

196:                                              ; preds = %194, %194
  ret void

197:                                              ; preds = %194
  unreachable
}

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

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

attributes #0 = { inlinehint 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !6, i64 0}
!10 = !{!"player_s", !6, i64 0, !11, i64 8, !12, 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}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 1, !13, i64 2, !13, i64 4, !7, i64 6, !7, i64 7}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !11, i64 112}
!15 = !{!"mobj_s", !16, 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, !17, i64 204, !6, i64 216}
!16 = !{!"thinker_s", !6, i64 0, !6, i64 8, !7, i64 16}
!17 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !13, i64 8}
!18 = !{!15, !11, i64 116}
!19 = !{!10, !11, i64 32}
!20 = !{!10, !11, i64 200}
!21 = !{!11, !11, i64 0}
!22 = !{!15, !11, i64 32}
!23 = !{!10, !11, i64 20}
!24 = !{!15, !11, i64 100}
!25 = !{!10, !11, i64 24}
!26 = !{!10, !11, i64 8}
!27 = !{!10, !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"

@finesine = external local_unnamed_addr global [10240 x i32], align 16
@onground = external dso_local local_unnamed_addr global i32, align 4
@leveltime = external local_unnamed_addr global i32, align 4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @FixedMul(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @P_CalcHeight(ptr nocapture noundef %0) local_unnamed_addr #1 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 112
  %4 = load i32, ptr %3, align 8, !tbaa !13
  %5 = tail call i32 @FixedMul(i32 noundef %4, i32 noundef %4)
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 116
  %8 = load i32, ptr %7, align 4, !tbaa !17
  %9 = tail call i32 @FixedMul(i32 noundef %8, i32 noundef %8)
  %10 = add nsw i32 %9, %5
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = ashr i32 %10, 2
  %spec.select = tail call i32 @llvm.smin.i32(i32 %12, i32 1048576)
  store i32 %spec.select, ptr %11, align 8, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %0, i64 200
  %14 = load i32, ptr %13, align 8, !tbaa !19
  %15 = and i32 %14, 4
  %16 = icmp eq i32 %15, 0
  %17 = load i32, ptr @onground, align 4
  %18 = icmp ne i32 %17, 0
  %or.cond = select i1 %16, i1 %18, i1 false
  br i1 %or.cond, label %32, label %19

19:                                               ; preds = %1
  %20 = load ptr, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  %22 = load i32, ptr %21, align 8, !tbaa !20
  %23 = add nsw i32 %22, 2686976
  %24 = getelementptr inbounds i8, ptr %0, i64 20
  %25 = getelementptr inbounds i8, ptr %20, i64 100
  %26 = load i32, ptr %25, align 4, !tbaa !21
  %27 = add nsw i32 %26, -262144
  %spec.store.select = tail call i32 @llvm.smin.i32(i32 %23, i32 %27)
  store i32 %spec.store.select, ptr %24, align 4
  %28 = load i32, ptr %21, align 8, !tbaa !20
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %31 = add nsw i32 %30, %28
  store i32 %31, ptr %24, align 4, !tbaa !23
  br label %69

32:                                               ; preds = %1
  %33 = load i32, ptr @leveltime, align 4, !tbaa !24
  %34 = mul nsw i32 %33, 409
  %35 = and i32 %34, 8191
  %36 = sdiv i32 %spec.select, 2
  %37 = zext nneg i32 %35 to i64
  %38 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !24
  %40 = tail call i32 @FixedMul(i32 noundef %36, i32 noundef %39)
  %41 = getelementptr inbounds i8, ptr %0, i64 8
  %42 = load i32, ptr %41, align 8, !tbaa !25
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %._crit_edge

._crit_edge:                                      ; preds = %32
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 24
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !22
  br label %58

44:                                               ; preds = %32
  %45 = getelementptr inbounds i8, ptr %0, i64 28
  %46 = load i32, ptr %45, align 4, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %0, i64 24
  %48 = load i32, ptr %47, align 8, !tbaa !22
  %49 = add nsw i32 %48, %46
  store i32 %49, ptr %47, align 8, !tbaa !22
  %50 = icmp sgt i32 %49, 2686976
  br i1 %50, label %.thread49, label %51

.thread49:                                        ; preds = %44
  store i32 2686976, ptr %47, align 8, !tbaa !22
  store i32 0, ptr %45, align 4, !tbaa !26
  br label %58

51:                                               ; preds = %44
  %52 = icmp slt i32 %49, 1343488
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  store i32 1343488, ptr %47, align 8, !tbaa !22
  %spec.select51 = tail call i32 @llvm.smax.i32(i32 %46, i32 1)
  br label %.thread47

54:                                               ; preds = %51
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %58, label %.thread47

.thread47:                                        ; preds = %53, %54
  %55 = phi i32 [ %49, %54 ], [ 1343488, %53 ]
  %56 = phi i32 [ %46, %54 ], [ %spec.select51, %53 ]
  %57 = add nsw i32 %56, 16384
  %spec.store.select45 = tail call i32 @llvm.umax.i32(i32 %57, i32 1)
  store i32 %spec.store.select45, ptr %45, align 4
  br label %58

58:                                               ; preds = %._crit_edge, %.thread49, %.thread47, %54
  %59 = phi i32 [ %.pre, %._crit_edge ], [ 2686976, %.thread49 ], [ %55, %.thread47 ], [ %49, %54 ]
  %60 = load ptr, ptr %0, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 32
  %62 = load i32, ptr %61, align 8, !tbaa !20
  %63 = add i32 %62, %40
  %64 = add i32 %63, %59
  %65 = getelementptr inbounds i8, ptr %0, i64 20
  %66 = getelementptr inbounds i8, ptr %60, i64 100
  %67 = load i32, ptr %66, align 4, !tbaa !21
  %68 = add nsw i32 %67, -262144
  %spec.store.select46 = tail call i32 @llvm.smin.i32(i32 %64, i32 %68)
  store i32 %spec.store.select46, ptr %65, align 4
  br label %69

69:                                               ; preds = %58, %19
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #2

attributes #0 = { inlinehint 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass