// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::SaveState::ByteSizeLong() const
size_t SaveState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Rnes.SaveState)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string saveDate = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_savedate());
    }

    // optional .Rnes.DmaState dma = 7;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *dma_);
    }

    // optional .Rnes.CpuState cpu = 8;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *cpu_);
    }

    // optional .Rnes.ApuState apu = 9;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *apu_);
    }

    // optional .Rnes.PpuState ppu = 10;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *ppu_);
    }

    // optional .Rnes.ControllerState controller = 11;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *controller_);
    }

    // optional .Rnes.CpuMemoryState cpuMem = 12;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *cpumem_);
    }

    // optional .Rnes.VideoMemoryState vidMem = 13;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *vidmem_);
    }

  }
  // optional uint64 gameTime = 2;
  if (cached_has_bits & 0x00000100u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
        this->_internal_gametime());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %r15d
testb %r15b, %r15b
je 0x30131
testb $0x1, %r15b
jne 0x30139
xorl %r14d, %r14d
jmp 0x30159
xorl %r14d, %r14d
jmp 0x30269
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
leaq (%rax,%rcx), %r14
incq %r14
testb $0x2, %r15b
je 0x30180
movq 0x20(%rbx), %rdi
callq 0x2eb8c
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x4, %r15b
je 0x301a7
movq 0x28(%rbx), %rdi
callq 0x241f0
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x8, %r15b
je 0x301ce
movq 0x30(%rbx), %rdi
callq 0x27e66
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x10, %r15b
je 0x301f5
movq 0x38(%rbx), %rdi
callq 0x29e7c
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x20, %r15b
je 0x3021c
movq 0x40(%rbx), %rdi
callq 0x2d098
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x40, %r15b
je 0x30243
movq 0x48(%rbx), %rdi
callq 0x2d780
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb %r15b, %r15b
jns 0x30269
movq 0x50(%rbx), %rdi
callq 0x2e0ce
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
btl $0x8, %r15d
jae 0x3028b
movq 0x58(%rbx), %rax
orq $0x1, %rax
bsrq %rax, %rax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x1, 0x8(%rbx)
jne 0x302a3
movl %r14d, 0x14(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rbx), %rdi
addq $0x14, %rbx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa920