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

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

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

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

  // optional uint32 xCoord = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_xcoord(), 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.PpuState.SpriteState)
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x150(%rbp)
movq %rsi, -0x158(%rbp)
movq %rdx, -0x160(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x170(%rbp)
movl $0x0, -0x164(%rbp)
addq $0x10, %rax
movq %rax, -0x140(%rbp)
movl $0x0, -0x144(%rbp)
movq -0x140(%rbp), %rax
movslq -0x144(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x164(%rbp)
movl -0x164(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4f357
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x5f2c0
movq -0x170(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0x25c10
movl %eax, %ecx
movq -0x158(%rbp), %rax
movl $0x1, -0xfc(%rbp)
movl %ecx, -0x100(%rbp)
movq %rax, -0x108(%rbp)
movl -0xfc(%rbp), %ecx
movq -0x108(%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, -0x14(%rbp)
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x108(%rbp)
movl -0x100(%rbp), %ecx
movq -0x108(%rbp), %rax
movl %ecx, -0x84(%rbp)
movq %rax, -0x90(%rbp)
movl -0x84(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x158(%rbp)
movl -0x164(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4f42e
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x5f2c0
movq -0x170(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0x25c30
movl %eax, %ecx
movq -0x158(%rbp), %rax
movl $0x2, -0x10c(%rbp)
movl %ecx, -0x110(%rbp)
movq %rax, -0x118(%rbp)
movl -0x10c(%rbp), %ecx
movq -0x118(%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, -0x24(%rbp)
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x118(%rbp)
movl -0x110(%rbp), %ecx
movq -0x118(%rbp), %rax
movl %ecx, -0x74(%rbp)
movq %rax, -0x80(%rbp)
movl -0x74(%rbp), %edi
movq -0x80(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x158(%rbp)
movl -0x164(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4f505
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x5f2c0
movq -0x170(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0x25c50
movl %eax, %ecx
movq -0x158(%rbp), %rax
movl $0x3, -0x11c(%rbp)
movl %ecx, -0x120(%rbp)
movq %rax, -0x128(%rbp)
movl -0x11c(%rbp), %ecx
movq -0x128(%rbp), %rax
movl %ecx, -0xa4(%rbp)
movl $0x0, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movl -0xa4(%rbp), %edi
movl -0xa8(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, -0x34(%rbp)
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x128(%rbp)
movl -0x120(%rbp), %ecx
movq -0x128(%rbp), %rax
movl %ecx, -0x64(%rbp)
movq %rax, -0x70(%rbp)
movl -0x64(%rbp), %edi
movq -0x70(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x158(%rbp)
movl -0x164(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4f5dc
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x5f2c0
movq -0x170(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0x25c70
movl %eax, %ecx
movq -0x158(%rbp), %rax
movl $0x4, -0x12c(%rbp)
movl %ecx, -0x130(%rbp)
movq %rax, -0x138(%rbp)
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movl -0x94(%rbp), %edi
movl -0x98(%rbp), %esi
callq 0x65ca0
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movl %ecx, -0x44(%rbp)
movq %rax, -0x50(%rbp)
movl -0x44(%rbp), %edi
movq -0x50(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x138(%rbp)
movl -0x130(%rbp), %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x54(%rbp)
movq %rax, -0x60(%rbp)
movl -0x54(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x65cc0
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x4f6a4
movq -0x170(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xe8(%rbp)
movq 0x4295a(%rip), %rax     # 0x91f80
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x4f676
movq -0x178(%rbp), %rdi
callq 0x66310
addq $0x8, %rax
movq %rax, -0xe0(%rbp)
jmp 0x4f683
callq *-0xf0(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x160(%rbp), %rdx
callq 0xe3b0
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)