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

  cached_has_bits = _has_bits_[0];
  // optional string saveDate = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_savedate().data(), static_cast<int>(this->_internal_savedate().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "Rnes.SaveState.saveDate");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_savedate(), target);
  }

  // optional uint64 gameTime = 2;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->_internal_gametime(), target);
  }

  // optional .Rnes.DmaState dma = 7;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::dma(this), target, stream);
  }

  // optional .Rnes.CpuState cpu = 8;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        8, _Internal::cpu(this), target, stream);
  }

  // optional .Rnes.ApuState apu = 9;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::apu(this), target, stream);
  }

  // optional .Rnes.PpuState ppu = 10;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::ppu(this), target, stream);
  }

  // optional .Rnes.ControllerState controller = 11;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        11, _Internal::controller(this), target, stream);
  }

  // optional .Rnes.CpuMemoryState cpuMem = 12;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        12, _Internal::cpumem(this), target, stream);
  }

  // optional .Rnes.VideoMemoryState vidMem = 13;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        13, _Internal::vidmem(this), target, stream);
  }

  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.SaveState)
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x10(%rdi), %r12d
testb $0x1, %r12b
je 0x31078
movq 0x18(%r14), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
leaq 0x5e4b(%rip), %rcx      # 0x36ea2
movl $0x1, %edx
callq 0xb190
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rcx
callq 0x32c94
movq %rax, %r15
btl $0x8, %r12d
jae 0x310e6
cmpq %r15, (%rbx)
jbe 0x31457
movq 0x58(%r14), %rcx
movb $0x10, (%r15)
cmpq $0x7f, %rcx
ja 0x310a0
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x310e6
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movq %rcx, %rax
shrq $0x7, %rax
cmpq $0x3fff, %rcx           # imm = 0x3FFF
ja 0x310c2
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x310e6
addq $0x3, %r15
movq %rax, %rcx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrq $0x7, %rax
incq %r15
cmpq $0x3fff, %rcx           # imm = 0x3FFF
ja 0x310c6
movb %al, -0x1(%r15)
testb $0x2, %r12b
je 0x3115d
cmpq %r15, (%rbx)
jbe 0x3146a
movq 0x20(%r14), %rdi
movb $0x3a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x3110f
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x3114f
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x3112e
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x3114f
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31132
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2fdde
movq %rax, %r15
testb $0x4, %r12b
je 0x311d4
cmpq %r15, (%rbx)
jbe 0x3147d
movq 0x28(%r14), %rdi
movb $0x42, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x31186
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x311c6
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x311a5
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x311c6
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x311a9
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x24ec0
movq %rax, %r15
testb $0x8, %r12b
je 0x3124b
cmpq %r15, (%rbx)
jbe 0x31490
movq 0x30(%r14), %rdi
movb $0x4a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x311fd
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x3123d
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x3121c
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x3123d
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31220
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x287f4
movq %rax, %r15
testb $0x10, %r12b
je 0x312c2
cmpq %r15, (%rbx)
jbe 0x314a3
movq 0x38(%r14), %rdi
movb $0x52, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x31274
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x312b4
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31293
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x312b4
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31297
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2a99c
movq %rax, %r15
testb $0x20, %r12b
je 0x31339
cmpq %r15, (%rbx)
jbe 0x314b6
movq 0x40(%r14), %rdi
movb $0x5a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x312eb
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x3132b
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x3130a
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x3132b
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x3130e
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e304
movq %rax, %r15
testb $0x40, %r12b
je 0x313b0
cmpq %r15, (%rbx)
jbe 0x314c9
movq 0x48(%r14), %rdi
movb $0x62, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x31362
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x313a2
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31381
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x313a2
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x31385
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2ea9a
movq %rax, %r15
testb %r12b, %r12b
jns 0x31426
cmpq %r15, (%rbx)
jbe 0x314dc
movq 0x50(%r14), %rdi
movb $0x6a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x313d8
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x31418
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x313f7
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x31418
addq $0x3, %r15
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%r15)
shrl $0x7, %eax
incq %r15
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x313fb
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2f3d6
movq %rax, %r15
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x3143c
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %rdi
addq $0x8, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb230
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x31088
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x310f5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x3116c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x311e3
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x3125a
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x312d1
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x31348
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb750
movq %rax, %r15
jmp 0x313be
nop