// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%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 0x25356
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 0x25366
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)
movq -0x8(%rbp), %rax
cmpl $0xa, (%rax)
je 0x25381
movq -0x8(%rbp), %rax
cmpl $0xd, (%rax)
jne 0x2538a
movq -0x8(%rbp), %rdi
callq 0x250c0
jmp 0x2538c
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
subl $-0x1, %eax
je 0x253c5
jmp 0x2539c
movl -0x30(%rbp), %eax
subl $0xa, %eax
je 0x25490
jmp 0x253aa
movl -0x30(%rbp), %eax
subl $0xd, %eax
je 0x25490
jmp 0x253b8
movl -0x30(%rbp), %eax
subl $0x5d, %eax
je 0x25416
jmp 0x254c3
movq -0x10(%rbp), %rdx
leaq 0x10ca7(%rip), %rax     # 0x36077
leaq 0x12247(%rip), %rcx     # 0x3761e
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x20(%rbp), %rdx
movl -0x18(%rbp), %ecx
leaq 0x10c86(%rip), %rsi     # 0x3607f
movb $0x0, %al
callq 0x114b0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x121, %edx            # imm = 0x121
callq 0x243c0
movq -0x8(%rbp), %rdi
callq 0x251d0
cmpl -0x14(%rbp), %eax
jne 0x2548b
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 0x2546d
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, -0x34(%rbp)
jmp 0x2547d
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x25588
jmp 0x25583
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0x24ff0
movq -0x8(%rbp), %rdi
callq 0x250c0
cmpq $0x0, -0x10(%rbp)
jne 0x254be
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x25583
cmpq $0x0, -0x10(%rbp)
je 0x2552e
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 0x25513
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, -0x38(%rbp)
jmp 0x25523
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x25581
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x25568
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, -0x3c(%rbp)
jmp 0x25578
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1f490
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x25583
jmp 0x2538c
cmpq $0x0, -0x10(%rbp)
je 0x255d1
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
addl $0x2, %eax
cltq
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
movl -0x14(%rbp), %eax
addl $0x2, %eax
shll %eax
cltq
subq %rax, %rdx
callq 0x24450
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)