// File: /workspace/github_cpp_makefile_star2_O2/mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::ApuState::ByteSizeLong() const
size_t ApuState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Rnes.ApuState)
  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 reg = 1;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->reg_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_reg_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .Rnes.PulseState pulseA = 20;
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *pulsea_);
    }

    // optional .Rnes.PulseState pulseB = 21;
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *pulseb_);
    }

    // optional .Rnes.TriangleState triangle = 22;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *triangle_);
    }

    // optional .Rnes.NoiseState noise = 23;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *noise_);
    }

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

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

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

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

  }
  if (cached_has_bits & 0x00003f00u) {
    // optional uint32 step = 6;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_step());
    }

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

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

    // optional float clksPerSample = 9;
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 + 4;
    }

    // optional float currentSampleClk = 10;
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 + 4;
    }

    // optional uint32 nextSampleCountdown = 11;
    if (cached_has_bits & 0x00002000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_nextsamplecountdown());
    }

  }
  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
addq $0x18, %rdi
callq 0xb130
movl 0x10(%rbx), %r15d
movl 0x18(%rbx), %r14d
addq %rax, %r14
testb %r15b, %r15b
je 0x20551
testb $0x1, %r15b
je 0x20498
movq 0x28(%rbx), %rdi
callq 0x26f20
addq %rax, %r14
addq $0x2, %r14
testb $0x2, %r15b
je 0x204ae
movq 0x30(%rbx), %rdi
callq 0x26f20
addq %rax, %r14
addq $0x2, %r14
testb $0x4, %r15b
je 0x204c4
movq 0x38(%rbx), %rdi
callq 0x26f40
addq %rax, %r14
addq $0x2, %r14
testb $0x8, %r15b
je 0x204da
movq 0x40(%rbx), %rdi
callq 0x26f60
addq %rax, %r14
addq $0x2, %r14
testb $0x10, %r15b
je 0x204f8
movl 0x48(%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 $0x20, %r15b
je 0x20516
movl 0x4c(%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 $0x40, %r15b
je 0x20534
movl 0x50(%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 %r15b, %r15b
jns 0x20551
movl 0x54(%rbx), %eax
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testw $0x3f00, %r15w          # imm = 0x3F00
je 0x205f3
btl $0x8, %r15d
jae 0x2057c
movl 0x58(%rbx), %eax
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
btl $0x9, %r15d
jae 0x2059b
movl 0x5c(%rbx), %eax
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
btl $0xa, %r15d
jae 0x205ba
movl 0x60(%rbx), %eax
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
leaq 0x5(%r14), %rax
btl $0xb, %r15d
cmovaeq %r14, %rax
leaq 0x5(%rax), %r14
btl $0xc, %r15d
cmovaeq %rax, %r14
btl $0xd, %r15d
jae 0x205f3
movl 0x6c(%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 0x2060b
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 0xb900