// File: 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
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x190(%rbp)
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl $0x0, -0x1a4(%rbp)
addq $0x10, %rax
movq %rax, -0x180(%rbp)
movl $0x0, -0x184(%rbp)
movq -0x180(%rbp), %rax
movslq -0x184(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x53397
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x5f2c0
movq -0x1b0(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x44040
movl %eax, %ecx
movq -0x198(%rbp), %rax
movl $0x1, -0x12c(%rbp)
movl %ecx, -0x130(%rbp)
movq %rax, -0x138(%rbp)
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0xf4(%rbp)
movl $0x0, -0xf8(%rbp)
movq %rax, -0x100(%rbp)
movl -0xf4(%rbp), %edi
movl -0xf8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0x100(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x138(%rbp)
movl -0x130(%rbp), %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0xa4(%rbp)
movq %rax, -0xb0(%rbp)
movl -0xa4(%rbp), %edi
movq -0xb0(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x198(%rbp)
movl -0x1a4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5347a
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x5f2c0
movq -0x1b0(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x44060
movl %eax, %ecx
movq -0x198(%rbp), %rax
movl $0x2, -0x13c(%rbp)
movl %ecx, -0x140(%rbp)
movq %rax, -0x148(%rbp)
movl -0x13c(%rbp), %ecx
movq -0x148(%rbp), %rax
movl %ecx, -0xe4(%rbp)
movl $0x0, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movl -0xe4(%rbp), %edi
movl -0xe8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xf0(%rbp), %rax
movl %ecx, -0x24(%rbp)
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x148(%rbp)
movl -0x140(%rbp), %ecx
movq -0x148(%rbp), %rax
movl %ecx, -0x94(%rbp)
movq %rax, -0xa0(%rbp)
movl -0x94(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x198(%rbp)
movl -0x1a4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x5355d
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x5f2c0
movq -0x1b0(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x44080
movl %eax, %ecx
movq -0x198(%rbp), %rax
movl $0x3, -0x14c(%rbp)
movl %ecx, -0x150(%rbp)
movq %rax, -0x158(%rbp)
movl -0x14c(%rbp), %ecx
movq -0x158(%rbp), %rax
movl %ecx, -0xd4(%rbp)
movl $0x0, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movl -0xd4(%rbp), %edi
movl -0xd8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xe0(%rbp), %rax
movl %ecx, -0x34(%rbp)
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x158(%rbp)
movl -0x150(%rbp), %ecx
movq -0x158(%rbp), %rax
movl %ecx, -0x84(%rbp)
movq %rax, -0x90(%rbp)
movl -0x84(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x198(%rbp)
movl -0x1a4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x53634
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x5f2c0
movq -0x1b0(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x440a0
movl %eax, %ecx
movq -0x198(%rbp), %rax
movl $0x4, -0x15c(%rbp)
movl %ecx, -0x160(%rbp)
movq %rax, -0x168(%rbp)
movl -0x15c(%rbp), %ecx
movq -0x168(%rbp), %rax
movl %ecx, -0xc4(%rbp)
movl $0x0, -0xc8(%rbp)
movq %rax, -0xd0(%rbp)
movl -0xc4(%rbp), %edi
movl -0xc8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movl %ecx, -0x44(%rbp)
movq %rax, -0x50(%rbp)
movl -0x44(%rbp), %edi
movq -0x50(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x168(%rbp)
movl -0x160(%rbp), %ecx
movq -0x168(%rbp), %rax
movl %ecx, -0x74(%rbp)
movq %rax, -0x80(%rbp)
movl -0x74(%rbp), %edi
movq -0x80(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x198(%rbp)
movl -0x1a4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x5370b
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x5f2c0
movq -0x1b0(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x440c0
movl %eax, %ecx
movq -0x198(%rbp), %rax
movl $0x5, -0x16c(%rbp)
movl %ecx, -0x170(%rbp)
movq %rax, -0x178(%rbp)
movl -0x16c(%rbp), %ecx
movq -0x178(%rbp), %rax
movl %ecx, -0xb4(%rbp)
movl $0x0, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movl -0xb4(%rbp), %edi
movl -0xb8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xc0(%rbp), %rax
movl %ecx, -0x54(%rbp)
movq %rax, -0x60(%rbp)
movl -0x54(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x178(%rbp)
movl -0x170(%rbp), %ecx
movq -0x178(%rbp), %rax
movl %ecx, -0x64(%rbp)
movq %rax, -0x70(%rbp)
movl -0x64(%rbp), %edi
movq -0x70(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x198(%rbp)
movq -0x1b0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x537d3
movq -0x1b0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x118(%rbp)
movq 0x3e82b(%rip), %rax     # 0x91f80
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x537a5
movq -0x1b8(%rbp), %rdi
callq 0x66310
addq $0x8, %rax
movq %rax, -0x110(%rbp)
jmp 0x537b2
callq *-0x120(%rbp)
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
movq -0x198(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
callq 0xe3b0
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw %cs:(%rax,%rax)