// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: addquoted
static void addquoted (lua_State *L, luaL_Buffer *b, int arg) {
  size_t l;
  const char *s = luaL_checklstring(L, arg, &l);
  luaL_addchar(b, '"');
  while (l--) {
    switch (*s) {
      case '"': case '\\': case '\n': {
        luaL_addchar(b, '\\');
        luaL_addchar(b, *s);
        break;
      }
      case '\r': {
        luaL_addlstring(b, "\\r", 2);
        break;
      }
      case '\0': {
        luaL_addlstring(b, "\\000", 4);
        break;
      }
      default: {
        luaL_addchar(b, *s);
        break;
      }
    }
    s++;
  }
  luaL_addchar(b, '"');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x1abe0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x29(%rbp)
jb 0x2897a
movq -0x10(%rbp), %rdi
callq 0x1b680
cmpq $0x0, %rax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movb $0x22, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x28b17
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x28aa0
jmp 0x289be
movl -0x30(%rbp), %eax
subl $0xa, %eax
je 0x289ee
jmp 0x289c8
movl -0x30(%rbp), %eax
subl $0xd, %eax
je 0x28a89
jmp 0x289d6
movl -0x30(%rbp), %eax
subl $0x22, %eax
je 0x289ee
jmp 0x289e0
movl -0x30(%rbp), %eax
subl $0x5c, %eax
jne 0x28ab7
jmp 0x289ee
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x31(%rbp)
jb 0x28a21
movq -0x10(%rbp), %rdi
callq 0x1b680
cmpq $0x0, %rax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movb $0x5c, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x32(%rbp)
jb 0x28a6b
movq -0x10(%rbp), %rdi
callq 0x1b680
cmpq $0x0, %rax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movq -0x28(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
jmp 0x28b06
movq -0x10(%rbp), %rdi
leaq 0x45bb(%rip), %rsi      # 0x2d04f
movl $0x2, %edx
callq 0x1b570
jmp 0x28b06
movq -0x10(%rbp), %rdi
leaq 0x45a7(%rip), %rsi      # 0x2d052
movl $0x4, %edx
callq 0x1b570
jmp 0x28b06
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x33(%rbp)
jb 0x28aea
movq -0x10(%rbp), %rdi
callq 0x1b680
cmpq $0x0, %rax
setne %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
movq -0x28(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x28991
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x34(%rbp)
jb 0x28b4a
movq -0x10(%rbp), %rdi
callq 0x1b680
cmpq $0x0, %rax
setne %al
movb %al, -0x34(%rbp)
movb -0x34(%rbp), %al
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movb $0x22, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)