; LLVM IR from VTIvanov20/eight-ball-pool :: src/hud.ll (ZN3HUD4DrawEv)

; 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.Color = type { i8, i8, i8, i8 }
%struct.Vector2 = type { float, float }
%class.HUD = type <{ %"class.DrawableManager::Drawable.base", i32, %struct.TableState, i8, i8, [2 x i8] }>
%"class.DrawableManager::Drawable.base" = type <{ ptr, i32 }>
%struct.TableState = type { i32, i32, i8, i32, i32 }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3HUD4DrawEv(ptr noundef nonnull align 8 dereferenceable(38) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.Color, align 1
  %4 = alloca %struct.Color, align 1
  %5 = alloca %struct.Color, align 1
  %6 = alloca %struct.Color, align 1
  %7 = alloca %struct.Color, align 1
  %8 = alloca %struct.Color, align 1
  %9 = alloca %struct.Color, align 1
  %10 = alloca %struct.Color, align 1
  %11 = alloca %struct.Color, align 1
  %12 = alloca %struct.Vector2, align 4
  %13 = alloca %struct.Color, align 1
  %14 = alloca %struct.Vector2, align 4
  %15 = alloca %struct.Vector2, align 4
  %16 = alloca %struct.Vector2, align 4
  %17 = alloca %struct.Color, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  %19 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 4
  %20 = load i8, ptr %19, align 1, !tbaa !9, !range !16, !noundef !17
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %51

22:                                               ; preds = %1
  %23 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %24 = getelementptr inbounds %struct.TableState, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !18
  switch i32 %25, label %50 [
    i32 -1, label %26
    i32 0, label %38
    i32 1, label %44
  ]

26:                                               ; preds = %22
  %27 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 3
  %28 = load i8, ptr %27, align 4, !tbaa !19, !range !16, !noundef !17
  %29 = trunc i8 %28 to i1
  %30 = zext i1 %29 to i32
  %31 = add nsw i32 %30, 1
  %32 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str, i32 noundef %31)
  %33 = getelementptr inbounds %struct.Color, ptr %3, i32 0, i32 0
  store i8 -1, ptr %33, align 1, !tbaa !20
  %34 = getelementptr inbounds %struct.Color, ptr %3, i32 0, i32 1
  store i8 -1, ptr %34, align 1, !tbaa !22
  %35 = getelementptr inbounds %struct.Color, ptr %3, i32 0, i32 2
  store i8 -1, ptr %35, align 1, !tbaa !23
  %36 = getelementptr inbounds %struct.Color, ptr %3, i32 0, i32 3
  store i8 -1, ptr %36, align 1, !tbaa !24
  %37 = load i32, ptr %3, align 1
  call void @DrawText(ptr noundef %32, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 %37)
  br label %50

38:                                               ; preds = %22
  %39 = getelementptr inbounds %struct.Color, ptr %4, i32 0, i32 0
  store i8 -1, ptr %39, align 1, !tbaa !20
  %40 = getelementptr inbounds %struct.Color, ptr %4, i32 0, i32 1
  store i8 -1, ptr %40, align 1, !tbaa !22
  %41 = getelementptr inbounds %struct.Color, ptr %4, i32 0, i32 2
  store i8 -1, ptr %41, align 1, !tbaa !23
  %42 = getelementptr inbounds %struct.Color, ptr %4, i32 0, i32 3
  store i8 -1, ptr %42, align 1, !tbaa !24
  %43 = load i32, ptr %4, align 1
  call void @DrawText(ptr noundef @.str.1, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 %43)
  br label %50

44:                                               ; preds = %22
  %45 = getelementptr inbounds %struct.Color, ptr %5, i32 0, i32 0
  store i8 -1, ptr %45, align 1, !tbaa !20
  %46 = getelementptr inbounds %struct.Color, ptr %5, i32 0, i32 1
  store i8 -1, ptr %46, align 1, !tbaa !22
  %47 = getelementptr inbounds %struct.Color, ptr %5, i32 0, i32 2
  store i8 -1, ptr %47, align 1, !tbaa !23
  %48 = getelementptr inbounds %struct.Color, ptr %5, i32 0, i32 3
  store i8 -1, ptr %48, align 1, !tbaa !24
  %49 = load i32, ptr %5, align 1
  call void @DrawText(ptr noundef @.str.2, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 %49)
  br label %50

50:                                               ; preds = %44, %38, %26, %22
  br label %150

51:                                               ; preds = %1
  %52 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %53 = getelementptr inbounds %struct.TableState, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !25
  switch i32 %54, label %79 [
    i32 -1, label %55
    i32 0, label %67
    i32 1, label %73
  ]

55:                                               ; preds = %51
  %56 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 3
  %57 = load i8, ptr %56, align 4, !tbaa !19, !range !16, !noundef !17
  %58 = trunc i8 %57 to i1
  %59 = zext i1 %58 to i32
  %60 = add nsw i32 %59, 1
  %61 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.3, i32 noundef %60)
  %62 = getelementptr inbounds %struct.Color, ptr %6, i32 0, i32 0
  store i8 -1, ptr %62, align 1, !tbaa !20
  %63 = getelementptr inbounds %struct.Color, ptr %6, i32 0, i32 1
  store i8 -1, ptr %63, align 1, !tbaa !22
  %64 = getelementptr inbounds %struct.Color, ptr %6, i32 0, i32 2
  store i8 -1, ptr %64, align 1, !tbaa !23
  %65 = getelementptr inbounds %struct.Color, ptr %6, i32 0, i32 3
  store i8 -1, ptr %65, align 1, !tbaa !24
  %66 = load i32, ptr %6, align 1
  call void @DrawText(ptr noundef %61, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 %66)
  br label %79

67:                                               ; preds = %51
  %68 = getelementptr inbounds %struct.Color, ptr %7, i32 0, i32 0
  store i8 -1, ptr %68, align 1, !tbaa !20
  %69 = getelementptr inbounds %struct.Color, ptr %7, i32 0, i32 1
  store i8 -1, ptr %69, align 1, !tbaa !22
  %70 = getelementptr inbounds %struct.Color, ptr %7, i32 0, i32 2
  store i8 -1, ptr %70, align 1, !tbaa !23
  %71 = getelementptr inbounds %struct.Color, ptr %7, i32 0, i32 3
  store i8 -1, ptr %71, align 1, !tbaa !24
  %72 = load i32, ptr %7, align 1
  call void @DrawText(ptr noundef @.str.4, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 %72)
  br label %79

73:                                               ; preds = %51
  %74 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 0
  store i8 -1, ptr %74, align 1, !tbaa !20
  %75 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 1
  store i8 -1, ptr %75, align 1, !tbaa !22
  %76 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 2
  store i8 -1, ptr %76, align 1, !tbaa !23
  %77 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 3
  store i8 -1, ptr %77, align 1, !tbaa !24
  %78 = load i32, ptr %8, align 1
  call void @DrawText(ptr noundef @.str.5, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 %78)
  br label %79

79:                                               ; preds = %73, %67, %55, %51
  %80 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %81 = getelementptr inbounds %struct.TableState, ptr %80, i32 0, i32 2
  %82 = load i8, ptr %81, align 8, !tbaa !26, !range !16, !noundef !17
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %120

84:                                               ; preds = %79
  %85 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %86 = getelementptr inbounds %struct.TableState, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !25
  switch i32 %87, label %112 [
    i32 -1, label %88
    i32 0, label %100
    i32 1, label %106
  ]

88:                                               ; preds = %84
  %89 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 3
  %90 = load i8, ptr %89, align 4, !tbaa !19, !range !16, !noundef !17
  %91 = trunc i8 %90 to i1
  %92 = zext i1 %91 to i32
  %93 = add nsw i32 %92, 1
  %94 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.6, i32 noundef %93)
  %95 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 0
  store i8 -1, ptr %95, align 1, !tbaa !20
  %96 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 1
  store i8 -1, ptr %96, align 1, !tbaa !22
  %97 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 2
  store i8 -1, ptr %97, align 1, !tbaa !23
  %98 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 3
  store i8 -1, ptr %98, align 1, !tbaa !24
  %99 = load i32, ptr %9, align 1
  call void @DrawText(ptr noundef %94, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 %99)
  br label %112

100:                                              ; preds = %84
  %101 = getelementptr inbounds %struct.Color, ptr %10, i32 0, i32 0
  store i8 -1, ptr %101, align 1, !tbaa !20
  %102 = getelementptr inbounds %struct.Color, ptr %10, i32 0, i32 1
  store i8 -1, ptr %102, align 1, !tbaa !22
  %103 = getelementptr inbounds %struct.Color, ptr %10, i32 0, i32 2
  store i8 -1, ptr %103, align 1, !tbaa !23
  %104 = getelementptr inbounds %struct.Color, ptr %10, i32 0, i32 3
  store i8 -1, ptr %104, align 1, !tbaa !24
  %105 = load i32, ptr %10, align 1
  call void @DrawText(ptr noundef @.str.7, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 %105)
  br label %112

106:                                              ; preds = %84
  %107 = getelementptr inbounds %struct.Color, ptr %11, i32 0, i32 0
  store i8 -1, ptr %107, align 1, !tbaa !20
  %108 = getelementptr inbounds %struct.Color, ptr %11, i32 0, i32 1
  store i8 -1, ptr %108, align 1, !tbaa !22
  %109 = getelementptr inbounds %struct.Color, ptr %11, i32 0, i32 2
  store i8 -1, ptr %109, align 1, !tbaa !23
  %110 = getelementptr inbounds %struct.Color, ptr %11, i32 0, i32 3
  store i8 -1, ptr %110, align 1, !tbaa !24
  %111 = load i32, ptr %11, align 1
  call void @DrawText(ptr noundef @.str.8, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 %111)
  br label %112

112:                                              ; preds = %106, %100, %88, %84
  %113 = call <2 x float> @GetMousePosition()
  store <2 x float> %113, ptr %12, align 4
  %114 = getelementptr inbounds %struct.Color, ptr %13, i32 0, i32 0
  store i8 -1, ptr %114, align 1, !tbaa !20
  %115 = getelementptr inbounds %struct.Color, ptr %13, i32 0, i32 1
  store i8 -1, ptr %115, align 1, !tbaa !22
  %116 = getelementptr inbounds %struct.Color, ptr %13, i32 0, i32 2
  store i8 -1, ptr %116, align 1, !tbaa !23
  %117 = getelementptr inbounds %struct.Color, ptr %13, i32 0, i32 3
  store i8 -1, ptr %117, align 1, !tbaa !24
  %118 = load <2 x float>, ptr %12, align 4
  %119 = load i32, ptr %13, align 1
  call void @DrawCircleV(<2 x float> %118, float noundef 2.500000e+01, i32 %119)
  br label %120

120:                                              ; preds = %112, %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %121 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %122 = getelementptr inbounds %struct.TableState, ptr %121, i32 0, i32 2
  %123 = load i8, ptr %122, align 8, !tbaa !26, !range !16, !noundef !17
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %128

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %126 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  store float 1.000000e+01, ptr %126, align 4, !tbaa !27
  %127 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  store float 7.250000e+01, ptr %127, align 4, !tbaa !30
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %15, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %131

128:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %129 = getelementptr inbounds %struct.Vector2, ptr %16, i32 0, i32 0
  store float 1.000000e+01, ptr %129, align 4, !tbaa !27
  %130 = getelementptr inbounds %struct.Vector2, ptr %16, i32 0, i32 1
  store float 5.000000e+01, ptr %130, align 4, !tbaa !30
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %131

131:                                              ; preds = %128, %125
  %132 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %133 = getelementptr inbounds %struct.TableState, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !33
  %135 = getelementptr inbounds %class.HUD, ptr %18, i32 0, i32 2
  %136 = getelementptr inbounds %struct.TableState, ptr %135, i32 0, i32 4
  %137 = load i32, ptr %136, align 8, !tbaa !34
  %138 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.9, i32 noundef %134, i32 noundef %137)
  %139 = getelementptr inbounds %struct.Vector2, ptr %14, i32 0, i32 0
  %140 = load float, ptr %139, align 4, !tbaa !27
  %141 = fptosi float %140 to i32
  %142 = getelementptr inbounds %struct.Vector2, ptr %14, i32 0, i32 1
  %143 = load float, ptr %142, align 4, !tbaa !30
  %144 = fptosi float %143 to i32
  %145 = getelementptr inbounds %struct.Color, ptr %17, i32 0, i32 0
  store i8 -1, ptr %145, align 1, !tbaa !20
  %146 = getelementptr inbounds %struct.Color, ptr %17, i32 0, i32 1
  store i8 -1, ptr %146, align 1, !tbaa !22
  %147 = getelementptr inbounds %struct.Color, ptr %17, i32 0, i32 2
  store i8 -1, ptr %147, align 1, !tbaa !23
  %148 = getelementptr inbounds %struct.Color, ptr %17, i32 0, i32 3
  store i8 -1, ptr %148, align 1, !tbaa !24
  %149 = load i32, ptr %17, align 1
  call void @DrawText(ptr noundef %138, i32 noundef %141, i32 noundef %144, i32 noundef 12, i32 %149)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %150

150:                                              ; preds = %131, %50
  ret void
}

declare void @DrawText(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32) #1

declare ptr @TextFormat(ptr noundef, ...) #1

declare void @DrawCircleV(<2 x float>, float noundef, i32) #1

declare <2 x float> @GetMousePosition() #1

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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++ TBAA"}
!9 = !{!10, !15, i64 37}
!10 = !{!"_ZTS3HUD", !11, i64 0, !12, i64 12, !13, i64 16, !15, i64 36, !15, i64 37}
!11 = !{!"_ZTSN15DrawableManager8DrawableE", !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS10TableState", !14, i64 0, !14, i64 4, !15, i64 8, !12, i64 12, !12, i64 16}
!14 = !{!"_ZTS4Turn", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !14, i64 20}
!19 = !{!10, !15, i64 36}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS5Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!22 = !{!21, !7, i64 1}
!23 = !{!21, !7, i64 2}
!24 = !{!21, !7, i64 3}
!25 = !{!10, !14, i64 16}
!26 = !{!10, !15, i64 24}
!27 = !{!28, !29, i64 0}
!28 = !{!"_ZTS7Vector2", !29, i64 0, !29, i64 4}
!29 = !{!"float", !7, i64 0}
!30 = !{!28, !29, i64 4}
!31 = !{i64 0, i64 4, !32, i64 4, i64 4, !32}
!32 = !{!29, !29, i64 0}
!33 = !{!10, !12, i64 28}
!34 = !{!10, !12, i64 32}


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

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3HUD4DrawEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(38) %0) unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 37
  %3 = load i8, ptr %2, align 1, !tbaa !5, !range !14, !noundef !15
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %15

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 20
  %7 = load i32, ptr %6, align 4, !tbaa !16
  switch i32 %7, label %47 [
    i32 -1, label %8
    i32 0, label %13
    i32 1, label %14
  ]

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 36
  %10 = load i8, ptr %9, align 4, !tbaa !17, !range !14, !noundef !15
  %narrow48 = add nuw nsw i8 %10, 1
  %11 = zext nneg i8 %narrow48 to i32
  %12 = tail call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str, i32 noundef %11)
  tail call void @DrawText(ptr noundef %12, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 -1)
  br label %47

13:                                               ; preds = %5
  tail call void @DrawText(ptr noundef nonnull @.str.1, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 -1)
  br label %47

14:                                               ; preds = %5
  tail call void @DrawText(ptr noundef nonnull @.str.2, i32 noundef 10, i32 noundef 10, i32 noundef 50, i32 -1)
  br label %47

15:                                               ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !18
  switch i32 %17, label %25 [
    i32 -1, label %18
    i32 0, label %23
    i32 1, label %24
  ]

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %0, i64 36
  %20 = load i8, ptr %19, align 4, !tbaa !17, !range !14, !noundef !15
  %narrow = add nuw nsw i8 %20, 1
  %21 = zext nneg i8 %narrow to i32
  %22 = tail call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.3, i32 noundef %21)
  tail call void @DrawText(ptr noundef %22, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 -1)
  br label %25

23:                                               ; preds = %15
  tail call void @DrawText(ptr noundef nonnull @.str.4, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 -1)
  br label %25

24:                                               ; preds = %15
  tail call void @DrawText(ptr noundef nonnull @.str.5, i32 noundef 10, i32 noundef 10, i32 noundef 30, i32 -1)
  br label %25

25:                                               ; preds = %24, %23, %18, %15
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load i8, ptr %26, align 8, !tbaa !19, !range !14, !noundef !15
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %29, label %41

29:                                               ; preds = %25
  %30 = load i32, ptr %16, align 8, !tbaa !18
  switch i32 %30, label %38 [
    i32 -1, label %31
    i32 0, label %36
    i32 1, label %37
  ]

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %0, i64 36
  %33 = load i8, ptr %32, align 4, !tbaa !17, !range !14, !noundef !15
  %narrow47 = add nuw nsw i8 %33, 1
  %34 = zext nneg i8 %narrow47 to i32
  %35 = tail call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.6, i32 noundef %34)
  tail call void @DrawText(ptr noundef %35, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 -1)
  br label %38

36:                                               ; preds = %29
  tail call void @DrawText(ptr noundef nonnull @.str.7, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 -1)
  br label %38

37:                                               ; preds = %29
  tail call void @DrawText(ptr noundef nonnull @.str.8, i32 noundef 10, i32 noundef 45, i32 noundef 20, i32 -1)
  br label %38

38:                                               ; preds = %37, %36, %31, %29
  %39 = tail call <2 x float> @GetMousePosition()
  tail call void @DrawCircleV(<2 x float> %39, float noundef 2.500000e+01, i32 -1)
  %.pre = load i8, ptr %26, align 8, !tbaa !19, !range !14
  %.pre49 = trunc nuw i8 %.pre to i1
  %40 = select i1 %.pre49, i32 72, i32 50
  br label %41

41:                                               ; preds = %38, %25
  %.pre-phi = phi i32 [ %40, %38 ], [ 50, %25 ]
  %42 = getelementptr inbounds i8, ptr %0, i64 28
  %43 = load i32, ptr %42, align 4, !tbaa !20
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = load i32, ptr %44, align 8, !tbaa !21
  %46 = tail call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.9, i32 noundef %43, i32 noundef %45)
  tail call void @DrawText(ptr noundef %46, i32 noundef 10, i32 noundef %.pre-phi, i32 noundef 12, i32 -1)
  br label %47

47:                                               ; preds = %5, %8, %13, %14, %41
  ret void
}

declare void @DrawText(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32) local_unnamed_addr #1

declare ptr @TextFormat(ptr noundef, ...) local_unnamed_addr #1

declare void @DrawCircleV(<2 x float>, float noundef, i32) local_unnamed_addr #1

declare <2 x float> @GetMousePosition() local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 37}
!6 = !{!"_ZTS3HUD", !7, i64 0, !8, i64 12, !11, i64 16, !13, i64 36, !13, i64 37}
!7 = !{!"_ZTSN15DrawableManager8DrawableE", !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS10TableState", !12, i64 0, !12, i64 4, !13, i64 8, !8, i64 12, !8, i64 16}
!12 = !{!"_ZTS4Turn", !9, i64 0}
!13 = !{!"bool", !9, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !12, i64 20}
!17 = !{!6, !13, i64 36}
!18 = !{!6, !12, i64 16}
!19 = !{!6, !13, i64 24}
!20 = !{!6, !8, i64 28}
!21 = !{!6, !8, i64 32}


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