// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/llex.c
// Function: readutf8esc
static unsigned long readutf8esc (LexState *ls) {
  unsigned long r;
  int i = 4;  /* chars to be removed: '\', 'u', '{', and first digit */
  save_and_next(ls);  /* skip 'u' */
  esccheck(ls, ls->current == '{', "missing '{'");
  r = gethexa(ls);  /* must have at least one digit */
  while ((save_and_next(ls), lisxdigit(ls->current))) {
    i++;
    r = (r << 4) + luaO_hexavalue(ls->current);
    esccheck(ls, r <= 0x10FFFF, "UTF-8 value too large");
  }
  esccheck(ls, ls->current == '}', "missing '}'");
  next(ls);  /* skip '}' */
  luaZ_buffremove(ls->buff, i);  /* remove saved chars from buffer */
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x4, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x24ff0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x260fc
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
jmp 0x2610c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
cmpl $0x7b, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %esi
leaq 0xffbe(%rip), %rdx      # 0x360ed
callq 0x25e30
movq -0x8(%rbp), %rdi
callq 0x25ff0
cltq
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x24ff0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x2618c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x2619c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0xf8f8(%rip), %rax      # 0x35ab0
movzbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x26219
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x10860
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
cmpq $0x10ffff, -0x10(%rbp)  # imm = 0x10FFFF
setbe %al
andb $0x1, %al
movzbl %al, %esi
leaq 0xfeea(%rip), %rdx      # 0x360f9
callq 0x25e30
jmp 0x26143
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
cmpl $0x7d, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %esi
leaq 0xfedc(%rip), %rdx      # 0x3610f
callq 0x25e30
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x26272
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x26282
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movslq -0x14(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)