// File: /workspace/github_cpp_makefile_star2_O3/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 0x2fc98
movq 0x18(%r14), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
leaq 0x622b(%rip), %rcx      # 0x35ea2
movl $0x1, %edx
callq 0xa190
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rcx
callq 0x31864
movq %rax, %r15
btl $0x8, %r12d
jae 0x2fd06
cmpq %r15, (%rbx)
jbe 0x30077
movq 0x58(%r14), %rcx
movb $0x10, (%r15)
cmpq $0x7f, %rcx
ja 0x2fcc0
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2fd06
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movq %rcx, %rax
shrq $0x7, %rax
cmpq $0x3fff, %rcx           # imm = 0x3FFF
ja 0x2fce2
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2fd06
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 0x2fce6
movb %al, -0x1(%r15)
testb $0x2, %r12b
je 0x2fd7d
cmpq %r15, (%rbx)
jbe 0x3008a
movq 0x20(%r14), %rdi
movb $0x3a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2fd2f
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2fd6f
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2fd4e
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2fd6f
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 0x2fd52
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2ea38
movq %rax, %r15
testb $0x4, %r12b
je 0x2fdf4
cmpq %r15, (%rbx)
jbe 0x3009d
movq 0x28(%r14), %rdi
movb $0x42, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2fda6
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2fde6
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2fdc5
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2fde6
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 0x2fdc9
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x23e92
movq %rax, %r15
testb $0x8, %r12b
je 0x2fe6b
cmpq %r15, (%rbx)
jbe 0x300b0
movq 0x30(%r14), %rdi
movb $0x4a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2fe1d
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2fe5d
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2fe3c
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2fe5d
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 0x2fe40
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x27714
movq %rax, %r15
testb $0x10, %r12b
je 0x2fee2
cmpq %r15, (%rbx)
jbe 0x300c3
movq 0x38(%r14), %rdi
movb $0x52, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2fe94
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2fed4
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2feb3
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2fed4
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 0x2feb7
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2977c
movq %rax, %r15
testb $0x20, %r12b
je 0x2ff59
cmpq %r15, (%rbx)
jbe 0x300d6
movq 0x40(%r14), %rdi
movb $0x5a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2ff0b
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2ff4b
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2ff2a
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2ff4b
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 0x2ff2e
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cf72
movq %rax, %r15
testb $0x40, %r12b
je 0x2ffd0
cmpq %r15, (%rbx)
jbe 0x300e9
movq 0x48(%r14), %rdi
movb $0x62, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2ff82
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x2ffc2
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2ffa1
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x2ffc2
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 0x2ffa5
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2d702
movq %rax, %r15
testb %r12b, %r12b
jns 0x30046
cmpq %r15, (%rbx)
jbe 0x300fc
movq 0x50(%r14), %rdi
movb $0x6a, (%r15)
movl 0x14(%rdi), %ecx
cmpl $0x7f, %ecx
ja 0x2fff8
movb %cl, 0x1(%r15)
addq $0x2, %r15
jmp 0x30038
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%r15)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x30017
movb %al, 0x2(%r15)
addq $0x3, %r15
jmp 0x30038
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 0x3001b
movb %al, -0x1(%r15)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e036
movq %rax, %r15
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x3005c
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 0xa230
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fca8
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fd15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fd8c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fe03
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fe7a
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2fef1
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2ff68
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa750
movq %rax, %r15
jmp 0x2ffde
nop