// File: /workspace/github_cpp_makefile_star2_O2/mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::PpuState::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
const char* PpuState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // optional uint64 cycle = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_cycle(&has_bits);
          cycle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint64 frame = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_frame(&has_bits);
          frame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated uint32 regs = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_regs(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_regs(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .Rnes.PpuState.SpriteState spriteRam = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_spriteram(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else goto handle_unusual;
        continue;
      // optional uint32 vramToggle = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_vramtoggle(&has_bits);
          vramtoggle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 vramFineXScroll = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
          _Internal::set_has_vramfinexscroll(&has_bits);
          vramfinexscroll_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 vramCurrentAddr = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          _Internal::set_has_vramcurrentaddr(&has_bits);
          vramcurrentaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 vramTempAddr = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
          _Internal::set_has_vramtempaddr(&has_bits);
          vramtempaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 vramMachineAddr = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
          _Internal::set_has_vrammachineaddr(&has_bits);
          vrammachineaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 vramReadLatch = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
          _Internal::set_has_vramreadlatch(&has_bits);
          vramreadlatch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 scrollingMachineState = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
          _Internal::set_has_scrollingmachinestate(&has_bits);
          scrollingmachinestate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 xScrollOrigin = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
          _Internal::set_has_xscrollorigin(&has_bits);
          xscrollorigin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint32 yScrollOrigin = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) {
          _Internal::set_has_yscrollorigin(&has_bits);
          yscrollorigin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r15
movq %rsi, (%r15)
leaq 0x8(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x28(%rdi), %rax
movq %rax, -0x50(%rbp)
leaq 0x18(%rdi), %rax
movq %rax, -0x48(%rbp)
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x26780
testb %al, %al
jne 0x21481
movq -0x30(%rbp), %rdi
leaq -0x34(%rbp), %rsi
xorl %edx, %edx
callq 0x2678d
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x214a1
movl -0x34(%rbp), %r12d
movl %r12d, %ecx
shrl $0x3, %ecx
decl %ecx
cmpl $0xc, %ecx
ja 0x2142d
leaq 0xaa34(%rip), %rdx      # 0x2bc64
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpb $0x8, %r12b
jne 0x2142d
orl $0x1, %r13d
movq %r15, %rdi
callq 0x267fe
movq %rax, 0x40(%rbx)
jmp 0x21403
cmpb $0x60, %r12b
jne 0x2142d
orl $0x200, %r13d           # imm = 0x200
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x6c(%rbx)
jmp 0x21403
cmpb $0x28, %r12b
jne 0x2142d
orl $0x4, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x50(%rbx)
jmp 0x21403
cmpb $0x68, %r12b
jne 0x2142d
orl $0x400, %r13d           # imm = 0x400
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x70(%rbx)
jmp 0x21403
cmpb $0x50, %r12b
jne 0x2142d
orl $0x80, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x64(%rbx)
jmp 0x21403
cmpb $0x18, %r12b
jne 0x21413
decq %rax
incq %rax
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x267d2
movq %rbx, %rdi
movl %eax, %esi
callq 0x1419a
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x214a1
cmpq %rax, (%r14)
jbe 0x211e5
cmpb $0x18, (%rax)
je 0x212e6
jmp 0x211e5
cmpb $0x22, %r12b
jne 0x2142d
decq %rax
incq %rax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
callq 0x141ba
movq -0x30(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x27164
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x214a1
cmpq %rax, (%r14)
jbe 0x211e5
cmpb $0x22, (%rax)
je 0x2132c
jmp 0x211e5
cmpb $0x40, %r12b
jne 0x2142d
orl $0x20, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x5c(%rbx)
jmp 0x21403
cmpb $0x10, %r12b
jne 0x2142d
orl $0x2, %r13d
movq %r15, %rdi
callq 0x267fe
movq %rax, 0x48(%rbx)
jmp 0x21403
cmpb $0x30, %r12b
jne 0x2142d
orl $0x8, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x54(%rbx)
jmp 0x21403
cmpb $0x38, %r12b
jne 0x2142d
orl $0x10, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x58(%rbx)
jmp 0x21403
cmpb $0x58, %r12b
jne 0x2142d
orl $0x100, %r13d           # imm = 0x100
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x68(%rbx)
jmp 0x21403
cmpb $0x48, %r12b
jne 0x2142d
orl $0x40, %r13d
movq %r15, %rdi
callq 0x267d2
movl %eax, 0x60(%rbx)
cmpq $0x0, -0x30(%rbp)
jne 0x211e5
jmp 0x214a1
movzbl %r12b, %ecx
cmpl $0x1a, %ecx
jne 0x2142d
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xb7c0
jmp 0x21460
testq %r12, %r12
je 0x21498
movl %r12d, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0x21498
movq -0x40(%rbp), %rcx
movq (%rcx), %rsi
testb $0x1, %sil
je 0x2146f
andq $-0x2, %rsi
addq $0x8, %rsi
movq %r12, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0xb300
movq %rax, -0x30(%rbp)
testq %rax, %rax
jne 0x211e5
jmp 0x214a1
movq -0x40(%rbp), %rdi
callq 0x28ff8
movq %rax, %rsi
movq -0x30(%rbp), %rax
jmp 0x21452
movq -0x30(%rbp), %rax
orl %r13d, 0x10(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %r12d
movl %r12d, 0x50(%r14)
jmp 0x21485
xorl %eax, %eax
jmp 0x21485
nop