// File: mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::PpuState::ByteSizeLong() const
size_t PpuState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Rnes.PpuState)
  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;

  // repeated uint32 regs = 3;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->regs_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_regs_size());
    total_size += data_size;
  }

  // repeated .Rnes.PpuState.SpriteState spriteRam = 4;
  total_size += 1UL * this->_internal_spriteram_size();
  for (const auto& msg : this->spriteram_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional uint64 cycle = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
          this->_internal_cycle());
    }

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

    // optional uint32 vramToggle = 5;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vramtoggle());
    }

    // optional uint32 vramFineXScroll = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vramfinexscroll());
    }

    // optional uint32 vramCurrentAddr = 7;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vramcurrentaddr());
    }

    // optional uint32 vramTempAddr = 8;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vramtempaddr());
    }

    // optional uint32 vramMachineAddr = 9;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vrammachineaddr());
    }

    // optional uint32 vramReadLatch = 10;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_vramreadlatch());
    }

  }
  if (cached_has_bits & 0x00000700u) {
    // optional uint32 scrollingMachineState = 11;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_scrollingmachinestate());
    }

    // optional uint32 xScrollOrigin = 12;
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_xscrollorigin());
    }

    // optional uint32 yScrollOrigin = 13;
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_yscrollorigin());
    }

  }
  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
subq $0x80, %rsp
movq %rdi, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
addq $0x18, %rdi
callq 0xe1e0
movq -0x78(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0x25970
movl %eax, %edi
callq 0x60a10
movq -0x78(%rbp), %rdi
shlq $0x0, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x259c0
movl %eax, %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq -0x38(%rbp), %rcx
movq %rcx, -0x38(%rbp)
addq $0x28, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x61380
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x613c0
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x61420
testb $0x1, %al
jne 0x5178e
jmp 0x517b7
leaq -0x58(%rbp), %rdi
callq 0x61450
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x61470
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x614a0
jmp 0x5177b
movq -0x78(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x51927
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x51811
movq -0x78(%rbp), %rdi
callq 0x25930
movq %rax, %rdi
callq 0x5f330
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x51839
movq -0x78(%rbp), %rdi
callq 0x25950
movq %rax, %rdi
callq 0x5f330
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x51860
movq -0x78(%rbp), %rdi
callq 0x25c90
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x51887
movq -0x78(%rbp), %rdi
callq 0x25cb0
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x518ae
movq -0x78(%rbp), %rdi
callq 0x25cd0
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x518d5
movq -0x78(%rbp), %rdi
callq 0x25cf0
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x518fc
movq -0x78(%rbp), %rdi
callq 0x25d10
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x51925
movq -0x78(%rbp), %rdi
callq 0x25d30
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x51927
movl -0x3c(%rbp), %eax
andl $0x700, %eax            # imm = 0x700
cmpl $0x0, %eax
je 0x519b1
movl -0x3c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5195d
movq -0x78(%rbp), %rdi
callq 0x25d50
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x51986
movq -0x78(%rbp), %rdi
callq 0x25d70
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x519af
movq -0x78(%rbp), %rdi
callq 0x25d90
movl %eax, %edi
callq 0x5f310
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x519b1
movq -0x78(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x519f3
movq -0x78(%rbp), %rdx
movq %rdx, %rdi
addq $0x8, %rdi
movq -0x38(%rbp), %rsi
addq $0x14, %rdx
callq 0xec20
movq %rax, -0x28(%rbp)
jmp 0x51a13
movq -0x38(%rbp), %rdi
callq 0x5f350
movq -0x78(%rbp), %rdi
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %esi
callq 0x50150
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq