// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
callq 0xb120
movl 0x18(%rbx), %r14d
addq %rax, %r14
movslq 0x30(%rbx), %r15
addq %r15, %r14
movq 0x38(%rbx), %rax
leaq 0x8(%rax), %r12
testq %rax, %rax
cmoveq %rax, %r12
testq %r15, %r15
je 0x2b106
shlq $0x3, %r15
xorl %r13d, %r13d
movq (%r12,%r13), %rdi
callq 0x29c24
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
addq $0x8, %r13
cmpq %r13, %r15
jne 0x2b0df
movl 0x10(%rbx), %eax
testb %al, %al
je 0x2b1f7
testb $0x1, %al
je 0x2b130
movq 0x40(%rbx), %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x2, %al
je 0x2b14f
movq 0x48(%rbx), %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x4, %al
je 0x2b16b
movl 0x50(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x8, %al
je 0x2b187
movl 0x54(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x10, %al
je 0x2b1a3
movl 0x58(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x20, %al
je 0x2b1bf
movl 0x5c(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x40, %al
je 0x2b1db
movl 0x60(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb %al, %al
jns 0x2b1f7
movl 0x64(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testl $0x700, %eax            # imm = 0x700
je 0x2b258
btl $0x8, %eax
jae 0x2b21c
movl 0x68(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
btl $0x9, %eax
jae 0x2b23a
movl 0x6c(%rbx), %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
btl $0xa, %eax
jae 0x2b258
movl 0x70(%rbx), %eax
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x1, 0x8(%rbx)
jne 0x2b274
movl %r14d, 0x14(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
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 %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb920
nop