// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/llex.c
// Function: read_long_string
static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) {
  int cont = 0;
  (void)(cont);  /* avoid warnings when `cont' is not used */
  save_and_next(ls);  /* skip 2nd `[' */
  if (currIsNewline(ls))  /* string starts with a newline? */
    inclinenumber(ls);  /* skip it */
  for (;;) {
    switch (ls->current) {
      case EOZ:
        luaX_lexerror(ls, (seminfo) ? "unfinished long string" :
                                   "unfinished long comment", TK_EOS);
        break;  /* to avoid warnings */
#if defined(LUA_COMPAT_LSTR)
      case '[': {
        if (skip_sep(ls) == sep) {
          save_and_next(ls);  /* skip 2nd `[' */
          cont++;
#if LUA_COMPAT_LSTR == 1
          if (sep == 0)
            luaX_lexerror(ls, "nesting of [[...]] is deprecated", '[');
#endif
        }
        break;
      }
#endif
      case ']': {
        if (skip_sep(ls) == sep) {
          save_and_next(ls);  /* skip 2nd `]' */
#if defined(LUA_COMPAT_LSTR) && LUA_COMPAT_LSTR == 2
          cont--;
          if (sep == 0 && cont >= 0) break;
#endif
          goto endloop;
        }
        break;
      }
      case '\n':
      case '\r': {
        save(ls, '\n');
        inclinenumber(ls);
        if (!seminfo) luaZ_resetbuffer(ls->buff);  /* avoid wasting space */
        break;
      }
      default: {
        if (seminfo) save_and_next(ls);
        else next(ls);
      }
    }
  } endloop:
  if (seminfo)
    seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + (2 + sep),
                                     luaZ_bufflen(ls->buff) - 2*(2 + sep));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
callq 0x13978
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x13b46
callq 0x106d8
jmp 0x13b55
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
cmpl $0xd, %eax
je 0x13b62
cmpl $0xa, %eax
jne 0x13b6a
movq %r14, %rdi
callq 0x13a0e
testq %rbx, %rbx
leaq 0x8775(%rip), %rax      # 0x1c2e9
leaq 0x8757(%rip), %r12      # 0x1c2d2
cmoveq %rax, %r12
leaq 0x877b(%rip), %r13      # 0x1c301
movl (%r14), %esi
cmpl $0xc, %esi
jle 0x13bb3
cmpl $0xd, %esi
je 0x13bbd
cmpl $0x5b, %esi
je 0x13be5
cmpl $0x5d, %esi
jne 0x13c23
movq %r14, %rdi
callq 0x13a97
cmpl %r15d, %eax
jne 0x13b86
jmp 0x13c88
cmpl $-0x1, %esi
je 0x13c0e
cmpl $0xa, %esi
jne 0x13c23
movq %r14, %rdi
movl $0xa, %esi
callq 0x13978
movq %r14, %rdi
callq 0x13a0e
testq %rbx, %rbx
jne 0x13b86
movq 0x48(%r14), %rax
movq $0x0, 0x8(%rax)
jmp 0x13b86
movq %r14, %rdi
callq 0x13a97
cmpl %r15d, %eax
jne 0x13b86
movl (%r14), %esi
movq %r14, %rdi
callq 0x13978
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x13c58
callq 0x106d8
jmp 0x13c67
movq %r14, %rdi
movq %r12, %rsi
movl $0x11f, %edx            # imm = 0x11F
callq 0x12fda
jmp 0x13b86
testq %rbx, %rbx
je 0x13c30
movq %r14, %rdi
callq 0x13978
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x13c41
callq 0x106d8
jmp 0x13c50
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
jmp 0x13b86
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
testl %r15d, %r15d
jne 0x13b86
movq %r14, %rdi
movq %r13, %rsi
movl $0x5b, %edx
callq 0x12fda
jmp 0x13b86
movl (%r14), %esi
movq %r14, %rdi
callq 0x13978
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x13ca4
callq 0x106d8
jmp 0x13cb3
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x13ce6
movq 0x48(%r14), %rax
movl %r15d, %ecx
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rcx, %rsi
addq $0x2, %rsi
leal 0x4(,%r15,2), %eax
subq %rax, %rdx
movq %r14, %rdi
callq 0x1308d
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq