// File: /workspace/github_cpp_makefile_star2_O1/istellartech[P]OpenTsiolkovsky/src/../lib/picojson.h
// Function: bool picojson::_parse_codepoint<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::istreambuf_iterator<char, std::char_traits<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, picojson::input<std::istreambuf_iterator<char, std::char_traits<char>>>&)
inline bool _parse_codepoint(String& out, input<Iter>& in) {
    int uni_ch;
    if ((uni_ch = _parse_quadhex(in)) == -1) {
      return false;
    }
    if (0xd800 <= uni_ch && uni_ch <= 0xdfff) {
      if (0xdc00 <= uni_ch) {
	// a second 16-bit of a surrogate pair appeared
	return false;
      }
      // first 16-bit of surrogate pair, get the next one
      if (in.getc() != '\\' || in.getc() != 'u') {
	in.ungetc();
	return false;
      }
      int second = _parse_quadhex(in);
      if (! (0xdc00 <= second && second <= 0xdfff)) {
	return false;
      }
      uni_ch = ((uni_ch - 0xd800) << 10) | ((second - 0xdc00) & 0x3ff);
      uni_ch += 0x10000;
    }
    if (uni_ch < 0x80) {
      out.push_back(uni_ch);
    } else {
      if (uni_ch < 0x800) {
	out.push_back(0xc0 | (uni_ch >> 6));
      } else {
	if (uni_ch < 0x10000) {
	  out.push_back(0xe0 | (uni_ch >> 12));
	} else {
	  out.push_back(0xf0 | (uni_ch >> 18));
	  out.push_back(0x80 | ((uni_ch >> 12) & 0x3f));
	}
	out.push_back(0x80 | ((uni_ch >> 6) & 0x3f));
      }
      out.push_back(0x80 | (uni_ch & 0x3f));
    }
    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
movl $0x4, %r15d
movq %r14, %rdi
callq 0x18864
cmpl $-0x1, %eax
je 0x18e6c
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x18e5b
leal -0x41(%rax), %ecx
cmpl $0x5, %ecx
ja 0x18e4e
addl $-0x37, %eax
jmp 0x18e59
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x18e67
addl $-0x57, %eax
movl %eax, %ecx
shll $0x4, %ebp
addl %ecx, %ebp
decl %r15d
jne 0x18e2c
jmp 0x18e71
movb $0x0, 0x20(%r14)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %ebp
je 0x18ef5
movl %ebp, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
jne 0x18f2e
cmpl $0xdbff, %ebp           # imm = 0xDBFF
jg 0x18ef5
movq %r14, %rdi
callq 0x18864
cmpl $0x5c, %eax
jne 0x18ef0
movq %r14, %rdi
callq 0x18864
cmpl $0x75, %eax
jne 0x18ef0
xorl %r15d, %r15d
movl $0x4, %r12d
movq %r14, %rdi
callq 0x18864
cmpl $-0x1, %eax
je 0x18f01
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x18ee2
leal -0x41(%rax), %ecx
cmpl $0x5, %ecx
ja 0x18ed5
addl $-0x37, %eax
jmp 0x18ee0
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x18efc
addl $-0x57, %eax
movl %eax, %ecx
shll $0x4, %r15d
addl %ecx, %r15d
decl %r12d
jne 0x18eb3
jmp 0x18f07
movb $0x0, 0x20(%r14)
xorl %eax, %eax
jmp 0x18fa1
movb $0x0, 0x20(%r14)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
andl $0xfffffc00, %eax       # imm = 0xFFFFFC00
movl %ebp, %ecx
shll $0xa, %ecx
andl $0x3ff, %r15d           # imm = 0x3FF
addl %r15d, %ecx
addl $0xfca10000, %ecx       # imm = 0xFCA10000
cmpl $0xdc00, %eax           # imm = 0xDC00
cmovel %ecx, %ebp
jne 0x18ef5
cmpl $0x7f, %ebp
jle 0x18f93
movl %ebp, %eax
cmpl $0x7ff, %ebp            # imm = 0x7FF
jg 0x18f44
shrl $0x6, %eax
orb $-0x40, %al
jmp 0x18f80
cmpl $0xffff, %ebp           # imm = 0xFFFF
jg 0x18f53
shrl $0xc, %eax
orb $-0x20, %al
jmp 0x18f6c
shrl $0x12, %eax
orb $-0x10, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5330
movl %ebp, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5330
movl %ebp, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5330
andb $0x3f, %bpl
orb $-0x80, %bpl
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x5330
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq