// File: /workspace/github_c_makefile_star2_O0/winton[P]redis_parse/hiredis/sds.c
// Function: sdscatrepr
sds sdscatrepr(sds s, char *p, size_t len) {
    s = sdscatlen(s,"\"",1);
    if (s == NULL) return NULL;

    while(len--) {
        switch(*p) {
        case '\\':
        case '"':
            s = sdscatprintf(s,"\\%c",*p);
            break;
        case '\n': s = sdscatlen(s,"\\n",2); break;
        case '\r': s = sdscatlen(s,"\\r",2); break;
        case '\t': s = sdscatlen(s,"\\t",2); break;
        case '\a': s = sdscatlen(s,"\\a",2); break;
        case '\b': s = sdscatlen(s,"\\b",2); break;
        default:
            if (isprint(*p))
                s = sdscatprintf(s,"%c",*p);
            else
                s = sdscatprintf(s,"\\x%02x",(unsigned char)*p);
            break;
        }
        p++;
        if (s == NULL) return NULL;
    }
    return sdscatlen(s,"\"",1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x31eb(%rip), %rsi      # 0xa48a
movl $0x1, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x72c1
movq $0x0, -0x8(%rbp)
jmp 0x7484
jmp 0x72c3
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x746b
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x7, %eax
je 0x73b5
jmp 0x72f1
movl -0x24(%rbp), %eax
subl $0x8, %eax
je 0x73d0
jmp 0x72ff
movl -0x24(%rbp), %eax
subl $0x9, %eax
je 0x7397
jmp 0x730d
movl -0x24(%rbp), %eax
subl $0xa, %eax
je 0x735b
jmp 0x7317
movl -0x24(%rbp), %eax
subl $0xd, %eax
je 0x7379
jmp 0x7321
movl -0x24(%rbp), %eax
subl $0x22, %eax
je 0x7339
jmp 0x732b
movl -0x24(%rbp), %eax
subl $0x5c, %eax
jne 0x73eb
jmp 0x7339
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl (%rax), %edx
leaq 0x3239(%rip), %rsi      # 0xa584
movb $0x0, %al
callq 0x2140
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x10(%rbp), %rdi
leaq 0x3222(%rip), %rsi      # 0xa588
movl $0x2, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x10(%rbp), %rdi
leaq 0x3207(%rip), %rsi      # 0xa58b
movl $0x2, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x10(%rbp), %rdi
leaq 0x31ec(%rip), %rsi      # 0xa58e
movl $0x2, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x10(%rbp), %rdi
leaq 0x31d1(%rip), %rsi      # 0xa591
movl $0x2, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x10(%rbp), %rdi
leaq 0x31b9(%rip), %rsi      # 0xa594
movl $0x2, %edx
callq 0x23a0
movq %rax, -0x10(%rbp)
jmp 0x7449
callq 0x2450
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x742a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl (%rax), %edx
leaq 0x3168(%rip), %rsi      # 0xa585
movb $0x0, %al
callq 0x2140
movq %rax, -0x10(%rbp)
jmp 0x7447
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl (%rax), %edx
leaq 0x315b(%rip), %rsi      # 0xa597
movb $0x0, %al
callq 0x2140
movq %rax, -0x10(%rbp)
jmp 0x7449
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x7466
movq $0x0, -0x8(%rbp)
jmp 0x7484
jmp 0x72c3
movq -0x10(%rbp), %rdi
leaq 0x3014(%rip), %rsi      # 0xa48a
movl $0x1, %edx
callq 0x23a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop