// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/llex.c
// Function: read_long_string
static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) {
  int line = ls->linenumber;  /* initial line (for error message) */
  save_and_next(ls);  /* skip 2nd '[' */
  if (currIsNewline(ls))  /* string starts with a newline? */
    inclinenumber(ls);  /* skip it */
  for (;;) {
    switch (ls->current) {
      case EOZ: {  /* error */
        const char *what = (seminfo ? "string" : "comment");
        const char *msg = luaO_pushfstring(ls->L,
                     "unfinished long %s (starting at line %d)", what, line);
        lexerror(ls, msg, TK_EOS);
        break;  /* to avoid warnings */
      }
      case ']': {
        if (skip_sep(ls) == sep) {
          save_and_next(ls);  /* skip 2nd ']' */
          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 %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %esi
movl 0x4(%rdi), %ebp
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x18610
callq 0x14598
jmp 0x1861f
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0xd, %eax
je 0x1862b
cmpl $0xa, %eax
jne 0x1869a
movq %rbx, %rdi
callq 0x184df
jmp 0x1869a
cmpl $0xa, %esi
jne 0x18662
movq %rbx, %rdi
movl $0xa, %esi
callq 0x18472
movq %rbx, %rdi
callq 0x184df
testq %r14, %r14
jne 0x1869a
movq 0x48(%rbx), %rax
movq $0x0, 0x8(%rax)
jmp 0x1869a
cmpl $-0x1, %esi
je 0x1871f
testq %r14, %r14
je 0x18678
movq %rbx, %rdi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x18689
callq 0x14598
jmp 0x18698
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl (%rbx), %esi
cmpl $0xc, %esi
jle 0x18635
cmpl $0xd, %esi
je 0x1863a
cmpl $0x5d, %esi
jne 0x1866b
movq %rbx, %rdi
callq 0x18560
cmpl %r15d, %eax
jne 0x1869a
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x186d3
callq 0x14598
jmp 0x186e2
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
testq %r14, %r14
je 0x18714
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 0x179a0
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
leaq 0xb272(%rip), %rax      # 0x2399b
leaq 0xc5f0(%rip), %rdx      # 0x24d20
cmoveq %rax, %rdx
movq 0x38(%rbx), %rdi
leaq 0xb264(%rip), %rsi      # 0x239a3
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc391
movq %rbx, %rdi
movq %rax, %rsi
movl $0x121, %edx            # imm = 0x121
callq 0x17917