// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
callq 0x12005
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x121d8
callq 0xf294
jmp 0x121e7
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
cmpl $0xd, %eax
je 0x121f4
cmpl $0xa, %eax
jne 0x121fc
movq %r14, %rdi
callq 0x1209b
testq %rbx, %rbx
leaq 0x80a3(%rip), %rax      # 0x1a2a9
leaq 0x8085(%rip), %r12      # 0x1a292
cmoveq %rax, %r12
pushq $0xa
popq %rbp
pushq $0x5b
popq %r13
movl (%r14), %esi
cmpl $0x5d, %esi
je 0x122b3
cmpl $0xa, %esi
je 0x1224a
cmpl $0xd, %esi
je 0x1224a
cmpl $0x5b, %esi
je 0x1226c
cmpl $-0x1, %esi
jne 0x12295
movq %r14, %rdi
movq %r12, %rsi
movl $0x11f, %edx            # imm = 0x11F
callq 0x116c8
jmp 0x12218
movq %r14, %rdi
movl %ebp, %esi
callq 0x12005
movq %r14, %rdi
callq 0x1209b
testq %rbx, %rbx
jne 0x12218
movq 0x48(%r14), %rax
andq $0x0, 0x8(%rax)
jmp 0x12218
movq %r14, %rdi
callq 0x12121
cmpl %r15d, %eax
jne 0x12218
movl (%r14), %esi
movq %r14, %rdi
callq 0x12005
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x122dd
callq 0xf294
jmp 0x122ec
testq %rbx, %rbx
je 0x122a2
movq %r14, %rdi
callq 0x12005
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x122c6
callq 0xf294
jmp 0x122d5
movq %r14, %rdi
callq 0x12121
cmpl %r15d, %eax
jne 0x12218
jmp 0x1230f
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
jmp 0x12218
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
testl %r15d, %r15d
jne 0x12218
movq %r14, %rdi
leaq 0x7fbf(%rip), %rsi      # 0x1a2c1
movl %r13d, %edx
callq 0x116c8
jmp 0x12218
movl (%r14), %esi
movq %r14, %rdi
callq 0x12005
movq 0x40(%r14), %rdi
subq $0x1, (%rdi)
jae 0x1232b
callq 0xf294
jmp 0x1233a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x1236d
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 0x11777
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq