// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/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 %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %esi
callq 0x622b6
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x62088
callq 0x6008d
jmp 0x62097
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0xd, %eax
je 0x620a3
cmpl $0xa, %eax
jne 0x620ab
movq %rbx, %rdi
callq 0x61f5a
movl (%rbx), %esi
cmpl $0x5a, %esi
jg 0x620e4
cmpl $0xa, %esi
je 0x620bc
cmpl $0xd, %esi
jne 0x62128
movq %rbx, %rdi
movl $0xa, %esi
callq 0x622b6
movq %rbx, %rdi
callq 0x61f5a
testq %r14, %r14
jne 0x620ab
movq 0x48(%rbx), %rax
movq $0x0, 0x8(%rax)
jmp 0x620ab
cmpl $0x5b, %esi
je 0x62100
cmpl $0x5d, %esi
jne 0x62131
movq %rbx, %rdi
callq 0x61fdd
cmpl %r15d, %eax
jne 0x620ab
jmp 0x62193
movq %rbx, %rdi
callq 0x61fdd
cmpl %r15d, %eax
jne 0x620ab
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x622b6
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x62165
callq 0x6008d
jmp 0x62174
cmpl $-0x1, %esi
je 0x621f5
testq %r14, %r14
je 0x6213e
movq %rbx, %rdi
callq 0x622b6
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x6214f
callq 0x6008d
jmp 0x6215e
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x620ab
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
testl %r15d, %r15d
jne 0x620ab
leaq 0x8be7d(%rip), %rsi     # 0xee003
movq %rbx, %rdi
movl $0x5b, %edx
callq 0x62217
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x622b6
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x621ae
callq 0x6008d
jmp 0x621bd
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
testq %r14, %r14
je 0x621ef
movq 0x48(%rbx), %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 %rbx, %rdi
callq 0x62525
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
testq %r14, %r14
leaq 0x8bdec(%rip), %rax     # 0xedfeb
leaq 0x8bdce(%rip), %rsi     # 0xedfd4
cmoveq %rax, %rsi
movq %rbx, %rdi
movl $0x11f, %edx            # imm = 0x11F
callq 0x62217