; LLVM IR from openai/procgen :: procgen/src/entity.ll (ZN6EntityC2Effffffi)

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

%class.Entity = type { float, float, float, float, float, float, i32, i32, i32, i32, i8, i8, float, float, float, i8, i32, i32, i32, i32, i8, float, i8, i8, i8, float, float, float, float, float, float }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6EntityC2Effffffi(ptr noundef nonnull align 4 dereferenceable(112) %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, i32 noundef %7) unnamed_addr #0 align 2 {
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store float %1, ptr %10, align 4, !tbaa !9
  store float %2, ptr %11, align 4, !tbaa !9
  store float %3, ptr %12, align 4, !tbaa !9
  store float %4, ptr %13, align 4, !tbaa !9
  store float %5, ptr %14, align 4, !tbaa !9
  store float %6, ptr %15, align 4, !tbaa !9
  store i32 %7, ptr %16, align 4, !tbaa !11
  %17 = load ptr, ptr %9, align 8
  %18 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 0
  store float 0.000000e+00, ptr %18, align 4, !tbaa !13
  %19 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 1
  store float 0.000000e+00, ptr %19, align 4, !tbaa !16
  %20 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 2
  store float 0.000000e+00, ptr %20, align 4, !tbaa !17
  %21 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 3
  store float 0.000000e+00, ptr %21, align 4, !tbaa !18
  %22 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 4
  store float 0.000000e+00, ptr %22, align 4, !tbaa !19
  %23 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 5
  store float 0.000000e+00, ptr %23, align 4, !tbaa !20
  %24 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 6
  store i32 0, ptr %24, align 4, !tbaa !21
  %25 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 7
  store i32 0, ptr %25, align 4, !tbaa !22
  %26 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 8
  store i32 0, ptr %26, align 4, !tbaa !23
  %27 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 9
  store i32 0, ptr %27, align 4, !tbaa !24
  %28 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 10
  store i8 0, ptr %28, align 4, !tbaa !25
  %29 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 11
  store i8 0, ptr %29, align 1, !tbaa !26
  %30 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 12
  store float 0.000000e+00, ptr %30, align 4, !tbaa !27
  %31 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 13
  store float 0.000000e+00, ptr %31, align 4, !tbaa !28
  %32 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 14
  store float 0.000000e+00, ptr %32, align 4, !tbaa !29
  %33 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 15
  store i8 0, ptr %33, align 4, !tbaa !30
  %34 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 16
  store i32 0, ptr %34, align 4, !tbaa !31
  %35 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 17
  store i32 0, ptr %35, align 4, !tbaa !32
  %36 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 18
  store i32 0, ptr %36, align 4, !tbaa !33
  %37 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 19
  store i32 0, ptr %37, align 4, !tbaa !34
  %38 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 20
  store i8 0, ptr %38, align 4, !tbaa !35
  %39 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 21
  store float 0.000000e+00, ptr %39, align 4, !tbaa !36
  %40 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 22
  store i8 0, ptr %40, align 4, !tbaa !37
  %41 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 23
  store i8 0, ptr %41, align 1, !tbaa !38
  %42 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 24
  store i8 0, ptr %42, align 2, !tbaa !39
  %43 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 25
  store float 0.000000e+00, ptr %43, align 4, !tbaa !40
  %44 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 26
  store float 0.000000e+00, ptr %44, align 4, !tbaa !41
  %45 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 27
  store float 0.000000e+00, ptr %45, align 4, !tbaa !42
  %46 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 28
  store float 0.000000e+00, ptr %46, align 4, !tbaa !43
  %47 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 29
  store float 0.000000e+00, ptr %47, align 4, !tbaa !44
  %48 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 30
  store float 0.000000e+00, ptr %48, align 4, !tbaa !45
  %49 = load float, ptr %10, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 0
  store float %49, ptr %50, align 4, !tbaa !13
  %51 = load float, ptr %11, align 4, !tbaa !9
  %52 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 1
  store float %51, ptr %52, align 4, !tbaa !16
  %53 = load float, ptr %12, align 4, !tbaa !9
  %54 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 2
  store float %53, ptr %54, align 4, !tbaa !17
  %55 = load float, ptr %13, align 4, !tbaa !9
  %56 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 3
  store float %55, ptr %56, align 4, !tbaa !18
  %57 = load float, ptr %14, align 4, !tbaa !9
  %58 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 4
  store float %57, ptr %58, align 4, !tbaa !19
  %59 = load float, ptr %15, align 4, !tbaa !9
  %60 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 5
  store float %59, ptr %60, align 4, !tbaa !20
  %61 = load i32, ptr %16, align 4, !tbaa !11
  %62 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 6
  store i32 %61, ptr %62, align 4, !tbaa !21
  %63 = load i32, ptr %16, align 4, !tbaa !11
  %64 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 7
  store i32 %63, ptr %64, align 4, !tbaa !22
  %65 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 8
  store i32 0, ptr %65, align 4, !tbaa !23
  %66 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 10
  store i8 0, ptr %66, align 4, !tbaa !25
  %67 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 11
  store i8 0, ptr %67, align 1, !tbaa !26
  %68 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 12
  store float 0.000000e+00, ptr %68, align 4, !tbaa !27
  %69 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 13
  store float 0.000000e+00, ptr %69, align 4, !tbaa !28
  %70 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 15
  store i8 0, ptr %70, align 4, !tbaa !30
  %71 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 14
  store float 0.000000e+00, ptr %71, align 4, !tbaa !29
  %72 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 25
  store float 1.000000e+00, ptr %72, align 4, !tbaa !40
  %73 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 28
  store float 1.000000e+00, ptr %73, align 4, !tbaa !43
  %74 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 29
  store float 1.000000e+00, ptr %74, align 4, !tbaa !44
  %75 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 16
  store i32 -1, ptr %75, align 4, !tbaa !31
  %76 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 17
  store i32 -1, ptr %76, align 4, !tbaa !32
  %77 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 19
  store i32 -1, ptr %77, align 4, !tbaa !34
  %78 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 18
  store i32 0, ptr %78, align 4, !tbaa !33
  %79 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 26
  store float 1.000000e+00, ptr %79, align 4, !tbaa !41
  %80 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 27
  store float -1.000000e+02, ptr %80, align 4, !tbaa !42
  %81 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 21
  store float 1.000000e+00, ptr %81, align 4, !tbaa !36
  %82 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 22
  store i8 0, ptr %82, align 4, !tbaa !37
  %83 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 23
  store i8 0, ptr %83, align 1, !tbaa !38
  %84 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 24
  store i8 1, ptr %84, align 2, !tbaa !39
  %85 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 9
  store i32 0, ptr %85, align 4, !tbaa !24
  %86 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 20
  store i8 0, ptr %86, align 4, !tbaa !35
  %87 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 30
  store float 0.000000e+00, ptr %87, align 4, !tbaa !45
  %88 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 6
  %89 = load i32, ptr %88, align 4, !tbaa !21
  %90 = icmp eq i32 %89, 54
  br i1 %90, label %91, label %94

91:                                               ; preds = %8
  %92 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 28
  store float 0x3FF6666660000000, ptr %92, align 4, !tbaa !43
  %93 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 19
  store i32 4, ptr %93, align 4, !tbaa !34
  br label %102

94:                                               ; preds = %8
  %95 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 6
  %96 = load i32, ptr %95, align 4, !tbaa !21
  %97 = icmp eq i32 %96, 59
  br i1 %97, label %98, label %101

98:                                               ; preds = %94
  %99 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 28
  store float 0x3FF0CCCCC0000000, ptr %99, align 4, !tbaa !43
  %100 = getelementptr inbounds %class.Entity, ptr %17, i32 0, i32 29
  store float 0x3FE99999A0000000, ptr %100, align 4, !tbaa !44
  br label %101

101:                                              ; preds = %98, %94
  br label %102

102:                                              ; preds = %101, %91
  ret void
}

attributes #0 = { mustprogress 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" }

!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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS6Entity", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !15, i64 40, !15, i64 41, !10, i64 44, !10, i64 48, !10, i64 52, !15, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !15, i64 76, !10, i64 80, !15, i64 84, !15, i64 85, !15, i64 86, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !10, i64 4}
!17 = !{!14, !10, i64 8}
!18 = !{!14, !10, i64 12}
!19 = !{!14, !10, i64 16}
!20 = !{!14, !10, i64 20}
!21 = !{!14, !12, i64 24}
!22 = !{!14, !12, i64 28}
!23 = !{!14, !12, i64 32}
!24 = !{!14, !12, i64 36}
!25 = !{!14, !15, i64 40}
!26 = !{!14, !15, i64 41}
!27 = !{!14, !10, i64 44}
!28 = !{!14, !10, i64 48}
!29 = !{!14, !10, i64 52}
!30 = !{!14, !15, i64 56}
!31 = !{!14, !12, i64 60}
!32 = !{!14, !12, i64 64}
!33 = !{!14, !12, i64 68}
!34 = !{!14, !12, i64 72}
!35 = !{!14, !15, i64 76}
!36 = !{!14, !10, i64 80}
!37 = !{!14, !15, i64 84}
!38 = !{!14, !15, i64 85}
!39 = !{!14, !15, i64 86}
!40 = !{!14, !10, i64 88}
!41 = !{!14, !10, i64 92}
!42 = !{!14, !10, i64 96}
!43 = !{!14, !10, i64 100}
!44 = !{!14, !10, i64 104}
!45 = !{!14, !10, i64 108}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @_ZN6EntityC2Effffffi(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(112) %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, i32 noundef %7) unnamed_addr #0 align 2 {
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 20
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = getelementptr inbounds i8, ptr %0, i64 28
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = getelementptr inbounds i8, ptr %0, i64 36
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  %19 = getelementptr inbounds i8, ptr %0, i64 41
  %20 = getelementptr inbounds i8, ptr %0, i64 44
  %21 = getelementptr inbounds i8, ptr %0, i64 60
  %22 = getelementptr inbounds i8, ptr %0, i64 76
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = getelementptr inbounds i8, ptr %0, i64 84
  %25 = getelementptr inbounds i8, ptr %0, i64 85
  %26 = getelementptr inbounds i8, ptr %0, i64 86
  %27 = getelementptr inbounds i8, ptr %0, i64 88
  %28 = getelementptr inbounds i8, ptr %0, i64 100
  %29 = getelementptr inbounds i8, ptr %0, i64 104
  store float %1, ptr %0, align 4, !tbaa !5
  store float %2, ptr %9, align 4, !tbaa !12
  store float %3, ptr %10, align 4, !tbaa !13
  store float %4, ptr %11, align 4, !tbaa !14
  store float %5, ptr %12, align 4, !tbaa !15
  store float %6, ptr %13, align 4, !tbaa !16
  store i32 %7, ptr %14, align 4, !tbaa !17
  store i32 %7, ptr %15, align 4, !tbaa !18
  store i32 0, ptr %16, align 4, !tbaa !19
  store i8 0, ptr %18, align 4, !tbaa !20
  store i8 0, ptr %19, align 1, !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(13) %20, i8 0, i64 13, i1 false)
  store <4 x i32> <i32 -1, i32 -1, i32 0, i32 -1>, ptr %21, align 4, !tbaa !22
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float -1.000000e+02, float 1.000000e+00>, ptr %27, align 4, !tbaa !23
  store float 1.000000e+00, ptr %23, align 4, !tbaa !24
  store i8 0, ptr %24, align 4, !tbaa !25
  store i8 0, ptr %25, align 1, !tbaa !26
  store i8 1, ptr %26, align 2, !tbaa !27
  store i32 0, ptr %17, align 4, !tbaa !28
  store i8 0, ptr %22, align 4, !tbaa !29
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %29, align 4, !tbaa !23
  switch i32 %7, label %33 [
    i32 54, label %30
    i32 59, label %32
  ]

30:                                               ; preds = %8
  %31 = getelementptr inbounds i8, ptr %0, i64 72
  store float 0x3FF6666660000000, ptr %28, align 4, !tbaa !30
  store i32 4, ptr %31, align 4, !tbaa !31
  br label %33

32:                                               ; preds = %8
  store <2 x float> <float 0x3FF0CCCCC0000000, float 0x3FE99999A0000000>, ptr %28, align 4, !tbaa !23
  br label %33

33:                                               ; preds = %8, %32, %30
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 = !{!"_ZTS6Entity", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !11, i64 40, !11, i64 41, !7, i64 44, !7, i64 48, !7, i64 52, !11, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !11, i64 76, !7, i64 80, !11, i64 84, !11, i64 85, !11, i64 86, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 12}
!15 = !{!6, !7, i64 16}
!16 = !{!6, !7, i64 20}
!17 = !{!6, !10, i64 24}
!18 = !{!6, !10, i64 28}
!19 = !{!6, !10, i64 32}
!20 = !{!6, !11, i64 40}
!21 = !{!6, !11, i64 41}
!22 = !{!10, !10, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!6, !7, i64 80}
!25 = !{!6, !11, i64 84}
!26 = !{!6, !11, i64 85}
!27 = !{!6, !11, i64 86}
!28 = !{!6, !10, i64 36}
!29 = !{!6, !11, i64 76}
!30 = !{!6, !7, i64 100}
!31 = !{!6, !10, i64 72}


; Effective O3 passes: DSEPass,EarlyCSEPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass