// File: /workspace/github_cpp_makefile_star2_O2/mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::MmcState_Mmc1State::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
::PROTOBUF_NAMESPACE_ID::uint8* MmcState_Mmc1State::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Rnes.MmcState.Mmc1State)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 controlReg = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_controlreg(), target);
  }

  // optional uint32 chr0Bank = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_chr0bank(), target);
  }

  // optional uint32 chr1Bank = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_chr1bank(), target);
  }

  // optional uint32 prgBank = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_prgbank(), target);
  }

  // optional uint32 shiftRegister = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_shiftregister(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Rnes.MmcState.Mmc1State)
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %r15d
testb $0x1, %r15b
je 0x2225d
movq %rbx, %rdi
callq 0x2682a
movl 0x18(%r14), %edi
movb $0x8, (%rax)
leaq 0x1(%rax), %rsi
callq 0x28e5c
movq %rax, %rsi
testb $0x2, %r15b
je 0x2227e
movq %rbx, %rdi
callq 0x2682a
movl 0x1c(%r14), %edi
movb $0x10, (%rax)
leaq 0x1(%rax), %rsi
callq 0x28e5c
movq %rax, %rsi
testb $0x4, %r15b
je 0x2229f
movq %rbx, %rdi
callq 0x2682a
movl 0x20(%r14), %edi
movb $0x18, (%rax)
leaq 0x1(%rax), %rsi
callq 0x28e5c
movq %rax, %rsi
testb $0x8, %r15b
je 0x222c0
movq %rbx, %rdi
callq 0x2682a
movl 0x24(%r14), %edi
movb $0x20, (%rax)
leaq 0x1(%rax), %rsi
callq 0x28e5c
movq %rax, %rsi
testb $0x10, %r15b
je 0x222e1
movq %rbx, %rdi
callq 0x2682a
movl 0x28(%r14), %edi
movb $0x28, (%rax)
leaq 0x1(%rax), %rsi
callq 0x28e5c
movq %rax, %rsi
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x222f9
movq %rsi, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %rdi
addq $0x8, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xb260
nop