// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/sds.c
// Function: sdscatfmt
sds sdscatfmt(sds s, char const *fmt, ...) {
    struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
    size_t initlen = sdslen(s);
    const char *f = fmt;
    int i;
    va_list ap;

    va_start(ap,fmt);
    f = fmt;    /* Next format specifier byte to process. */
    i = initlen; /* Position of the next byte to write to dest str. */
    while(*f) {
        char next, *str;
        int l;
        long long num;
        unsigned long long unum;

        /* Make sure there is always space for at least 1 char. */
        if (sh->free == 0) {
            s = sdsMakeRoomFor(s,1);
            sh = (void*) (s-(sizeof(struct sdshdr)));
        }

        switch(*f) {
        case '%':
            next = *(f+1);
            f++;
            switch(next) {
            case 's':
            case 'S':
                str = va_arg(ap,char*);
                l = (next == 's') ? strlen(str) : sdslen(str);
                if (sh->free < l) {
                    s = sdsMakeRoomFor(s,l);
                    sh = (void*) (s-(sizeof(struct sdshdr)));
                }
                memcpy(s+i,str,l);
                sh->len += l;
                sh->free -= l;
                i += l;
                break;
            case 'i':
            case 'I':
                if (next == 'i')
                    num = va_arg(ap,int);
                else
                    num = va_arg(ap,long long);
                {
                    char buf[SDS_LLSTR_SIZE];
                    l = sdsll2str(buf,num);
                    if (sh->free < l) {
                        s = sdsMakeRoomFor(s,l);
                        sh = (void*) (s-(sizeof(struct sdshdr)));
                    }
                    memcpy(s+i,buf,l);
                    sh->len += l;
                    sh->free -= l;
                    i += l;
                }
                break;
            case 'u':
            case 'U':
            case 'T':
                if (next == 'u')
                    unum = va_arg(ap,unsigned int);
                else if(next == 'U')
                    unum = va_arg(ap,unsigned long long);
                else
                    unum = (unsigned long long)va_arg(ap,size_t);
                {
                    char buf[SDS_LLSTR_SIZE];
                    l = sdsull2str(buf,unum);
                    if (sh->free < l) {
                        s = sdsMakeRoomFor(s,l);
                        sh = (void*) (s-(sizeof(struct sdshdr)));
                    }
                    memcpy(s+i,buf,l);
                    sh->len += l;
                    sh->free -= l;
                    i += l;
                }
                break;
            default: /* Handle %% and generally %<unknown>. */
                s[i++] = next;
                sh->len += 1;
                sh->free -= 1;
                break;
            }
            break;
        default:
            s[i++] = *f;
            sh->len += 1;
            sh->free -= 1;
            break;
        }
        f++;
    }
    va_end(ap);

    /* Add null-term */
    s[i] = '\0';
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
testb %al, %al
je 0x7a07
movaps %xmm0, -0x130(%rbp)
movaps %xmm1, -0x120(%rbp)
movaps %xmm2, -0x110(%rbp)
movaps %xmm3, -0x100(%rbp)
movaps %xmm4, -0xf0(%rbp)
movaps %xmm5, -0xe0(%rbp)
movaps %xmm6, -0xd0(%rbp)
movaps %xmm7, -0xc0(%rbp)
movq %r9, -0x138(%rbp)
movq %r8, -0x140(%rbp)
movq %rcx, -0x148(%rbp)
movq %rdx, -0x150(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6ee0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x50(%rbp), %rax
leaq -0x160(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x7fd9
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x7ab4
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x31d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movb (%rax), %al
subb $0x25, %al
jne 0x7f95
jmp 0x7ac4
movq -0x28(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x51(%rbp)
movq -0x28(%rbp), %rax
incq %rax
movq %rax, -0x28(%rbp)
movsbl -0x51(%rbp), %eax
movl %eax, -0x164(%rbp)
subl $0x49, %eax
je 0x7c45
jmp 0x7aee
movl -0x164(%rbp), %eax
subl $0x53, %eax
je 0x7b41
jmp 0x7afb
movl -0x164(%rbp), %eax
addl $-0x54, %eax
subl $0x2, %eax
jb 0x7d9b
jmp 0x7b0f
movl -0x164(%rbp), %eax
subl $0x69, %eax
je 0x7c45
jmp 0x7b20
movl -0x164(%rbp), %eax
subl $0x73, %eax
je 0x7b41
jmp 0x7b2d
movl -0x164(%rbp), %eax
subl $0x75, %eax
je 0x7d9b
jmp 0x7f63
leaq -0x50(%rbp), %rax
movq %rax, -0x170(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x168(%rbp)
cmpl $0x28, %eax
ja 0x7b7c
movq -0x170(%rbp), %rcx
movl -0x168(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x178(%rbp)
jmp 0x7b99
movq -0x170(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movsbl -0x51(%rbp), %eax
cmpl $0x73, %eax
jne 0x7bc2
movq -0x60(%rbp), %rdi
callq 0x3140
movq %rax, -0x180(%rbp)
jmp 0x7bd2
movq -0x60(%rbp), %rdi
callq 0x6ee0
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x64(%rbp), %eax
jge 0x7c05
movq -0x8(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x31d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
movq -0x60(%rbp), %rsi
movslq -0x64(%rbp), %rdx
callq 0x32f0
movl -0x64(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x64(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x64(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x7f93
movsbl -0x51(%rbp), %eax
cmpl $0x69, %eax
jne 0x7cb6
leaq -0x50(%rbp), %rax
movq %rax, -0x190(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x184(%rbp)
cmpl $0x28, %eax
ja 0x7c89
movq -0x190(%rbp), %rcx
movl -0x184(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x198(%rbp)
jmp 0x7ca6
movq -0x190(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x7d1c
leaq -0x50(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x19c(%rbp)
cmpl $0x28, %eax
ja 0x7cf1
movq -0x1a8(%rbp), %rcx
movl -0x19c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1b0(%rbp)
jmp 0x7d0e
movq -0x1a8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x3060
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x64(%rbp), %eax
jge 0x7d58
movq -0x8(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x31d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
leaq -0x90(%rbp), %rsi
movslq -0x64(%rbp), %rdx
callq 0x32f0
movl -0x64(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x64(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x64(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x7f93
movsbl -0x51(%rbp), %eax
cmpl $0x75, %eax
jne 0x7e0e
leaq -0x50(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x1b4(%rbp)
cmpl $0x28, %eax
ja 0x7ddf
movq -0x1c0(%rbp), %rcx
movl -0x1b4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1c8(%rbp)
jmp 0x7dfc
movq -0x1c0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x78(%rbp)
jmp 0x7ee7
movsbl -0x51(%rbp), %eax
cmpl $0x55, %eax
jne 0x7e7f
leaq -0x50(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x1cc(%rbp)
cmpl $0x28, %eax
ja 0x7e52
movq -0x1d8(%rbp), %rcx
movl -0x1cc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1e0(%rbp)
jmp 0x7e6f
movq -0x1d8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x7ee5
leaq -0x50(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x1e4(%rbp)
cmpl $0x28, %eax
ja 0x7eba
movq -0x1f0(%rbp), %rcx
movl -0x1e4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1f8(%rbp)
jmp 0x7ed7
movq -0x1f0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x7ee7
leaq -0xb0(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3510
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x64(%rbp), %eax
jge 0x7f23
movq -0x8(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x31d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
leaq -0xb0(%rbp), %rsi
movslq -0x64(%rbp), %rdx
callq 0x32f0
movl -0x64(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x64(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x64(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x7f93
movb -0x51(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x7fc8
movq -0x28(%rbp), %rax
movb (%rax), %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x7a7f
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nopw %cs:(%rax,%rax)