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

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

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

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

  // optional uint32 envelopeDivider = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_envelopedivider(), target);
  }

  // optional bool resetEnvelopeAndDivider = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_resetenvelopeanddivider(), target);
  }

  // optional uint32 currentSample = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_currentsample(), target);
  }

  // optional uint32 timerDivider = 7;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_timerdivider(), 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.NoiseState)
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %r15d
testb $0x1, %r15b
je 0x26440
cmpq %rsi, (%rbx)
jbe 0x2666f
movl 0x18(%r14), %ecx
movb $0x8, (%rsi)
cmpl $0x7f, %ecx
ja 0x26404
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x26440
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26421
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x26440
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26425
movb %al, -0x1(%rsi)
testb $0x2, %r15b
je 0x264a0
cmpq %rsi, (%rbx)
jbe 0x2667f
movl 0x1c(%r14), %ecx
movb $0x10, (%rsi)
cmpl $0x7f, %ecx
ja 0x26464
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x264a0
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26481
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x264a0
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26485
movb %al, -0x1(%rsi)
testb $0x4, %r15b
je 0x26500
cmpq %rsi, (%rbx)
jbe 0x2668f
movl 0x20(%r14), %ecx
movb $0x18, (%rsi)
cmpl $0x7f, %ecx
ja 0x264c4
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x26500
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x264e1
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x26500
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x264e5
movb %al, -0x1(%rsi)
testb $0x8, %r15b
je 0x26560
cmpq %rsi, (%rbx)
jbe 0x2669f
movl 0x24(%r14), %ecx
movb $0x20, (%rsi)
cmpl $0x7f, %ecx
ja 0x26524
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x26560
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26541
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x26560
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26545
movb %al, -0x1(%rsi)
testb $0x10, %r15b
je 0x2657d
cmpq %rsi, (%rbx)
jbe 0x266af
movb 0x28(%r14), %al
movb $0x28, (%rsi)
movb %al, 0x1(%rsi)
addq $0x2, %rsi
testb $0x20, %r15b
je 0x265dd
cmpq %rsi, (%rbx)
jbe 0x266bf
movl 0x2c(%r14), %ecx
movb $0x30, (%rsi)
cmpl $0x7f, %ecx
ja 0x265a1
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x265dd
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x265be
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x265dd
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x265c2
movb %al, -0x1(%rsi)
testb $0x40, %r15b
je 0x2663d
cmpq %rsi, (%rbx)
jbe 0x266cf
movl 0x30(%r14), %ecx
movb $0x38, (%rsi)
cmpl $0x7f, %ecx
ja 0x26601
movb %cl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x2663d
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %ecx, %eax
shrl $0x7, %eax
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2661e
movb %al, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x2663d
addq $0x3, %rsi
movl %eax, %ecx
movl %ecx, %edx
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrl $0x7, %eax
incq %rsi
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x26622
movb %al, -0x1(%rsi)
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x26655
movq %rsi, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %rdi
addq $0x8, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa230
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x263ef
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x2644f
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x264af
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x2650f
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x2656f
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x2658c
movq %rbx, %rdi
callq 0xa750
movq %rax, %rsi
jmp 0x265ec
nop