LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/canvas.c
// Function: drawLine
void drawLine(canvas *canvas, int x1, int y1, int x2, int y2, int color) {
    int dx = abs(x2-x1);
    int dy = abs(y2-y1);
    int sx = (x1 < x2) ? 1 : -1;
    int sy = (y1 < y2) ? 1 : -1;
    int err = dx-dy, e2;

    while(1) {
        drawPixel(canvas,x1,y1,color);
        if (x1 == x2 && y1 == y2) break;
        e2 = err*2;
        if (e2 > -dy) {
            err -= dy;
            x1 += sx;
        }
        if (e2 < dx) {
            err += dx;
            y1 += sy;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %ebx, %ebx
movl %r8d, %r11d
subl %edx, %r11d
setg %bl
xorl %r14d, %r14d
movl %ecx, %r10d
subl %esi, %r10d
setg %r14b
movl %r10d, %eax
negl %eax
cmovsl %r10d, %eax
movl %r11d, %r10d
negl %r10d
cmovsl %r11d, %r10d
leal -0x1(,%r14,2), %r11d
leal -0x1(,%rbx,2), %ebx
movl %eax, %r14d
subl %r10d, %r14d
movl %r10d, %ebp
negl %ebp
testl %esi, %esi
js 0x2722
testl %edx, %edx
js 0x2722
movl (%rdi), %r15d
cmpl %esi, %r15d
jle 0x2722
cmpl %edx, 0x4(%rdi)
jle 0x2722
movq 0x8(%rdi), %r12
imull %edx, %r15d
movl %esi, %r13d
addq %r15, %r13
movb %r9b, (%r12,%r13)
cmpl %r8d, %edx
jne 0x272b
cmpl %ecx, %esi
je 0x276e
leal (%r14,%r14), %r15d
cmpl %ebp, %r15d
movl $0x0, %r12d
cmovgl %r10d, %r12d
movl $0x0, %r13d
cmovgl %r11d, %r13d
subl %r12d, %r14d
addl %r13d, %esi
cmpl %eax, %r15d
movl $0x0, %r15d
cmovll %ebx, %r15d
movl $0x0, %r12d
cmovll %eax, %r12d
addl %r15d, %edx
addl %r14d, %r12d
movl %r12d, %r14d
jmp 0x26fb
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_SetValuestring
CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
{
    char *copy = NULL;
    /* if object's type is not cJSON_String or is cJSON_IsReference, it should not set valuestring */
    if (!(object->type & cJSON_String) || (object->type & cJSON_IsReference))
    {
        return NULL;
    }
    if (strlen(valuestring) <= strlen(object->valuestring))
    {
        strcpy(object->valuestring, valuestring);
        return object->valuestring;
    }
    copy = (char*) cJSON_strdup((const unsigned char*)valuestring, &global_hooks);
    if (copy == NULL)
    {
        return NULL;
    }
    if (object->valuestring != NULL)
    {
        cJSON_free(object->valuestring);
    }
    object->valuestring = copy;

    return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x110, %eax            # imm = 0x110
andl 0x18(%rdi), %eax
cmpl $0x10, %eax
jne 0x2c07
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2100
movq %rax, %r12
movq 0x20(%rbx), %r14
movq %r14, %rdi
callq 0x2100
cmpq %rax, %r12
jbe 0x2bd9
testq %r15, %r15
je 0x2bea
movq %r15, %rdi
callq 0x2100
movq %rax, %r12
incq %r12
movq %r12, %rdi
callq *0x1267f(%rip)          # 0x15240
testq %rax, %rax
je 0x2bea
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
jmp 0x2bed
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movq 0x20(%rbx), %r14
jmp 0x2c0a
xorl %r14d, %r14d
testq %r14, %r14
je 0x2c07
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2c01
callq *0x12647(%rip)          # 0x15248
movq %r14, 0x20(%rbx)
jmp 0x2c0a
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_PrintPreallocated
CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
{
    printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };

    if ((length < 0) || (buffer == NULL))
    {
        return false;
    }

    p.buffer = (unsigned char*)buffer;
    p.length = (size_t)length;
    p.offset = 0;
    p.noalloc = true;
    p.format = format;
    p.hooks = global_hooks;

    return print_value(item, &p);
}

// Assembly:
subq $0x48, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testl %edx, %edx
sets %r8b
testq %rsi, %rsi
sete %r9b
xorl %eax, %eax
orb %r8b, %r9b
jne 0x392c
movq %rsp, %rax
movq %rsi, (%rax)
movl %edx, %edx
movq %rdx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movl $0x1, 0x20(%rax)
movl %ecx, 0x24(%rax)
movups 0x1192b(%rip), %xmm0    # 0x15240
movups %xmm0, 0x28(%rax)
movq 0x11930(%rip), %rcx     # 0x15250
movq %rcx, 0x38(%rax)
movq %rax, %rsi
callq 0x33a5
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_CreateBool
CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = boolean ? cJSON_True : cJSON_False;
    }

    return item;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x40, %edi
callq *0x11353(%rip)          # 0x15240
testq %rax, %rax
je 0x3f12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
cmpl $0x1, %ebx
movl $0x2, %ecx
sbbl $0x0, %ecx
movl %ecx, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_InsertItemInArray
CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem)
{
    cJSON *after_inserted = NULL;

    if (which < 0)
    {
        return false;
    }

    after_inserted = get_array_item(array, (size_t)which);
    if (after_inserted == NULL)
    {
        return add_item_to_array(array, newitem);
    }

    newitem->next = after_inserted;
    newitem->prev = after_inserted->prev;
    after_inserted->prev = newitem;
    if (after_inserted == array->child)
    {
        array->child = newitem;
    }
    else
    {
        newitem->prev->next = newitem;
    }
    return true;
}

// Assembly:
testl %esi, %esi
js 0x4404
testq %rdi, %rdi
je 0x4407
movl %esi, %ecx
leaq 0x10(%rdi), %rax
movq (%rax), %rax
addq $-0x1, %rcx
setb %sil
testq %rax, %rax
je 0x4409
testb %sil, %sil
jne 0x43ed
jmp 0x4409
xorl %eax, %eax
retq
xorl %eax, %eax
testq %rax, %rax
je 0x442c
movq %rax, (%rdx)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq %rdx, 0x8(%rax)
cmpq 0x10(%rdi), %rax
je 0x4434
movq 0x8(%rdx), %rax
movq %rdx, (%rax)
jmp 0x4438
movq %rdx, %rsi
jmp 0x3a56
movq %rdx, 0x10(%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: replace_item_in_object
static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJSON_bool case_sensitive)
{
    if ((replacement == NULL) || (string == NULL))
    {
        return false;
    }

    /* replace the name in the replacement */
    if (!(replacement->type & cJSON_StringIsConst) && (replacement->string != NULL))
    {
        cJSON_free(replacement->string);
    }
    replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks);
    replacement->type &= ~cJSON_StringIsConst;

    return cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x451f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testb $0x2, 0x19(%rdx)
jne 0x453d
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x453d
callq *0x10d0b(%rip)          # 0x15248
movq %r15, %rdi
callq 0x2100
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0x10cec(%rip)          # 0x15240
testq %rax, %rax
je 0x456c
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21d0
jmp 0x456f
xorl %r12d, %r12d
movq %r12, 0x38(%rbx)
andb $-0x3, 0x19(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x3980
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x443e
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_CreateIntArray
CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if ((count < 0) || (numbers == NULL))
    {
        return NULL;
    }

    a = cJSON_CreateArray();

    for(i = 0; a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateNumber(numbers[i]);
        if (!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p, n);
        }
        p = n;
    }

    if (a && a->child) {
        a->child->prev = n;
    }

    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
sets %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x4738
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0x10bcf(%rip)          # 0x15240
movq %rax, %rbx
testq %rax, %rax
je 0x4697
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, (%rbx)
movl $0x20, 0x18(%rbx)
testq %rbx, %rbx
sete %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x471a
movl %ebp, %r15d
movl $0x1, %r12d
xorl %r13d, %r13d
movl -0x4(%r14,%r12,4), %ebp
movl $0x40, %edi
callq *0x10b7e(%rip)          # 0x15240
testq %rax, %rax
je 0x4730
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm1, 0x30(%rax)
movups %xmm1, 0x20(%rax)
movups %xmm1, (%rax)
movl $0x8, 0x18(%rax)
movsd %xmm0, 0x30(%rax)
movl %ebp, 0x28(%rax)
cmpq $0x1, %r12
jne 0x46fb
movq %rax, 0x10(%rbx)
jmp 0x4703
movq %rax, (%r13)
movq %r13, 0x8(%rax)
testq %rbx, %rbx
je 0x471c
leaq 0x1(%r12), %rcx
movq %rax, %r13
cmpq %r15, %r12
movq %rcx, %r12
jb 0x46b2
jmp 0x471c
xorl %eax, %eax
testq %rbx, %rbx
je 0x473a
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x473a
movq %rax, 0x8(%rcx)
jmp 0x473a
movq %rbx, %rdi
callq 0x2ad2
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/cJSON.c
// Function: cJSON_CreateStringArray
CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if ((count < 0) || (strings == NULL))
    {
        return NULL;
    }

    a = cJSON_CreateArray();

    for (i = 0; a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateString(strings[i]);
        if(!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p,n);
        }
        p = n;
    }

    if (a && a->child) {
        a->child->prev = n;
    }
    
    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
sets %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x4aa0
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0x10834(%rip)          # 0x15240
movq %rax, %rbx
testq %rax, %rax
je 0x4a2d
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movl $0x20, 0x18(%rbx)
testq %rbx, %rbx
sete %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x4a82
movl %ebp, %r15d
movl $0x1, %r12d
xorl %r13d, %r13d
movq -0x8(%r14,%r12,8), %rdi
callq 0x405f
testq %rax, %rax
je 0x4a98
cmpq $0x1, %r12
jne 0x4a63
movq %rax, 0x10(%rbx)
jmp 0x4a6b
movq %rax, (%r13)
movq %r13, 0x8(%rax)
testq %rbx, %rbx
je 0x4a84
leaq 0x1(%r12), %rcx
movq %rax, %r13
cmpq %r15, %r12
movq %rcx, %r12
jb 0x4a48
jmp 0x4a84
xorl %eax, %eax
testq %rbx, %rbx
je 0x4aa2
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x4aa2
movq %rax, 0x8(%rcx)
jmp 0x4aa2
movq %rbx, %rdi
callq 0x2ad2
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/sds.c
// Function: sdsrange
void sdsrange(sds s, ssize_t start, ssize_t end) {
    size_t newlen, len = sdslen(s);

    if (len == 0) return;
    if (start < 0) {
        start = len+start;
        if (start < 0) start = 0;
    }
    if (end < 0) {
        end = len+end;
        if (end < 0) end = 0;
    }
    newlen = (start > end) ? 0 : (end-start)+1;
    if (newlen != 0) {
        if (start >= (ssize_t)len) {
            newlen = 0;
        } else if (end >= (ssize_t)len) {
            end = len-1;
            newlen = (start > end) ? 0 : (end-start)+1;
        }
    } else {
        start = 0;
    }
    if (start && newlen) memmove(s, s+start, newlen);
    s[newlen] = 0;
    sdssetlen(s,newlen);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x6e68
leaq 0x7525(%rip), %rdi      # 0xe368
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x6e6a
movq -0x11(%rbx), %rax
jmp 0x6e6a
movzwl -0x5(%rbx), %eax
jmp 0x6e6a
movl -0x9(%rbx), %eax
jmp 0x6e6a
movzbl -0x3(%rbx), %eax
jmp 0x6e6a
xorl %eax, %eax
testq %rax, %rax
je 0x6f32
leaq (%rax,%rsi), %rcx
xorl %r14d, %r14d
testq %rcx, %rcx
cmovleq %r14, %rcx
testq %rsi, %rsi
cmovnsq %rsi, %rcx
leaq (%rax,%rdx), %rdi
testq %rdi, %rdi
cmovleq %r14, %rdi
testq %rdx, %rdx
cmovnsq %rdx, %rdi
movq %rdi, %rdx
subq %rcx, %rdx
leaq 0x1(%rdx), %rdx
cmovbq %r14, %rdx
movl $0x0, %esi
testq %rdx, %rdx
je 0x6ed8
movq %rax, %r14
subq %rcx, %r14
jle 0x6ec4
cmpq %rax, %rdi
jge 0x6ec9
movq %rdx, %r14
jmp 0x6ed5
xorl %r14d, %r14d
jmp 0x6ed5
decq %rax
xorl %edx, %edx
cmpq %rax, %rcx
cmovgq %rdx, %r14
movq %rcx, %rsi
testq %rsi, %rsi
je 0x6ef0
testq %r14, %r14
je 0x6ef0
addq %rbx, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2400
movb $0x0, (%rbx,%r14)
movzbl -0x1(%rbx), %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x6f32
leaq 0x7474(%rip), %rcx      # 0xe37c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shlb $0x3, %r14b
movb %r14b, -0x1(%rbx)
jmp 0x6f32
movq %r14, -0x11(%rbx)
jmp 0x6f32
movw %r14w, -0x5(%rbx)
jmp 0x6f32
movl %r14d, -0x9(%rbx)
jmp 0x6f32
movb %r14b, -0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: xmalloc
void *xmalloc(size_t size) {
    void *p = malloc(size);
    if (p == NULL) {
        printf("Out of memory: malloc(%zu)", size);
        exit(1);
    }
    return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2470
testq %rax, %rax
je 0x7980
popq %rbx
retq
leaq 0x6f25(%rip), %rdi      # 0xe8ac
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: xrealloc
void *xrealloc(void *ptr, size_t size) {
    void *p = realloc(ptr,size);
    if (p == NULL) {
        printf("Out of memory: realloc(%zu)", size);
        exit(1);
    }
    return p;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x2478
testq %rax, %rax
je 0x79ab
popq %rbx
retq
leaq 0x6f15(%rip), %rdi      # 0xe8c7
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: priceChangeToEmoji
const char *priceChangeToEmoji(double change) {
    int emoidx = 0;
    static const char *emoset[] = {"⚰️","🔴","🟢","🚀"};
    /* Note: ordering of the followign if statements is important. */
    if (change < 0) emoidx = 1;
    if (change < -8) emoidx = 0;
    if (change >= 0) emoidx = 2;
    if (change > 8) emoidx = 3;
    return emoset[emoidx];
}

// Assembly:
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movsd 0x6a27(%rip), %xmm3     # 0xe6b0
movapd %xmm0, %xmm4
cmpnltpd %xmm3, %xmm4
andpd %xmm2, %xmm4
movd %xmm4, %eax
andl $0x1, %eax
ucomisd %xmm1, %xmm0
movl $0x2, %ecx
cmovbl %eax, %ecx
ucomisd 0x6a07(%rip), %xmm0     # 0xe6b8
movl $0x3, %eax
cmovbel %ecx, %eax
leaq 0xd0c0(%rip), %rcx      # 0x14d80
movq (%rcx,%rax,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlEnd
void sqlEnd(sqlRow *row) {
    if (row->stmt == NULL) return;
    xfree(row->col);
    sqlite3_finalize(row->stmt);
    row->col = NULL;
    row->stmt = NULL;
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x836e
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x2468
movq (%rbx), %rdi
callq 0x2410
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlNextRow
int sqlNextRow(sqlRow *row) {
    if (row->stmt == NULL) return 0;

    if (row->col != NULL) {
        if (sqlite3_step(row->stmt) != SQLITE_ROW) {
            sqlEnd(row);
            return 0;
        }
    }

    xfree(row->col);
    row->cols = sqlite3_data_count(row->stmt);
    row->col = xmalloc(row->cols*sizeof(sqlCol));
    for (int j = 0; j < row->cols; j++) {
        row->col[j].type = sqlite3_column_type(row->stmt,j);
        if (row->col[j].type == SQLITE_INTEGER) {
            row->col[j].i = sqlite3_column_int64(row->stmt,j);
        } else if (row->col[j].type == SQLITE_FLOAT) {
            row->col[j].d = sqlite3_column_double(row->stmt,j);
        } else if (row->col[j].type == SQLITE_TEXT) {
            row->col[j].s = (char*)sqlite3_column_text(row->stmt,j);
            row->col[j].i = sqlite3_column_bytes(row->stmt,j);
        } else if (row->col[j].type == SQLITE_BLOB) {
            row->col[j].s = sqlite3_column_blob(row->stmt,j);
            row->col[j].i = sqlite3_column_bytes(row->stmt,j);
        } else {
            /* SQLITE_NULL. */
            row->col[j].s = NULL;
            row->col[j].i = 0;
            row->col[j].d = 0;
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x848e
cmpq $0x0, 0x10(%rbx)
je 0x839d
callq 0x2350
cmpl $0x64, %eax
jne 0x8486
movq 0x10(%rbx), %rdi
callq 0x2468
movq (%rbx), %rdi
callq 0x21a0
movl %eax, 0x8(%rbx)
movslq %eax, %rdi
shlq $0x5, %rdi
callq 0x7970
movq %rax, 0x10(%rbx)
movl $0x1, %ebp
cmpl $0x0, 0x8(%rbx)
jle 0x848e
xorl %r15d, %r15d
leaq 0x6396(%rip), %r12      # 0xe770
xorl %r14d, %r14d
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x20e0
movq 0x10(%rbx), %rcx
movl %eax, (%rcx,%r15)
decl %eax
cmpl $0x3, %eax
ja 0x845e
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x2090
jmp 0x843b
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x21e0
jmp 0x8425
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x2040
movq 0x10(%rbx), %rcx
movq %rax, 0x10(%rcx,%r15)
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x22e0
cltq
movq 0x10(%rbx), %rcx
movq %rax, 0x8(%rcx,%r15)
jmp 0x8470
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x21c0
movq 0x10(%rbx), %rax
movsd %xmm0, 0x18(%rax,%r15)
jmp 0x8470
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rcx,%r15)
movq $0x0, 0x18(%rcx,%r15)
incq %r14
movslq 0x8(%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r14
jl 0x83dd
jmp 0x848e
movq %rbx, %rdi
callq 0x8349
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlInsert
int sqlInsert(const char *sql, ...) {
    int64_t lastid = 0;
    va_list ap;
    va_start(ap,sql);
    int rc = sqlGenericQuery(NULL,sql,ap);
    if (rc == SQLITE_DONE) lastid = sqlite3_last_insert_rowid(DbHandle);
    va_end(ap);
    return lastid;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x84f8
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
xorl %ebx, %ebx
xorl %edi, %edi
movq %r10, %rsi
callq 0x8020
cmpl $0x65, %eax
jne 0x853a
movq %fs:-0x8, %rdi
callq 0x2150
movq %rax, %rbx
movl %ebx, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlQuery
int sqlQuery(const char *sql, ...) {
    int64_t retval = 0;
    va_list ap;
    va_start(ap,sql);
    int rc = sqlGenericQuery(NULL,sql,ap);
    retval = (rc == SQLITE_DONE);
    va_end(ap);
    return retval;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x85a3
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
xorl %edi, %edi
movq %r10, %rsi
callq 0x8020
xorl %ecx, %ecx
cmpl $0x65, %eax
sete %cl
movl %ecx, %eax
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlSelect
int sqlSelect(sqlRow *row, const char *sql, ...) {
    va_list ap;
    va_start(ap,sql);
    int rc = sqlGenericQuery(row,sql,ap);
    va_end(ap);
    return rc;
}

// Assembly:
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x8636
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %r10, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x8020
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlSelectOneRow
int sqlSelectOneRow(sqlRow *row, const char *sql, ...) {
    va_list ap;
    va_start(ap,sql);
    int rc = sqlGenericQuery(row,sql,ap);
    if (rc == SQLITE_ROW) sqlNextRow(row);
    va_end(ap);
    return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x86bf
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0x8020
movl %eax, %ebp
cmpl $0x64, %eax
jne 0x86f6
movq %rbx, %rdi
callq 0x836f
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: sqlSelectInt
int64_t sqlSelectInt(const char *sql, ...) {
    sqlRow row;
    int64_t i = 0;
    va_list ap;
    va_start(ap,sql);
    int rc = sqlGenericQuery(&row,sql,ap);
    if (rc == SQLITE_ROW) {
        sqlNextRow(&row);
        i = row.col[0].i;
        sqlEnd(&row);
    }
    va_end(ap);
    return i;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %r10
leaq 0x40(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x8769
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
leaq 0x20(%rsp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r10, %rsi
callq 0x8020
cmpl $0x64, %eax
jne 0x87d5
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x836f
movq 0x10(%r14), %rdi
movq 0x8(%rdi), %rbx
cmpq $0x0, (%r14)
je 0x87d7
callq 0x2468
movq 0x8(%rsp), %rdi
callq 0x2410
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x87d7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: makeHttpCall
sds makeHttpCall(const char *url, int *resptr) {
    if (DebugMode) printf("HTTP GET %s\n", url);
    CURL* curl;
    CURLcode res;
    sds body = sdsempty();

    curl = curl_easy_init();
    if (curl) {
        curl_easy_setopt(curl, CURLOPT_URL, url);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, makeHttpCallWriter);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &body);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1L);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15);
        curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);

        /* Perform the request, res will get the return code */
        res = curl_easy_perform(curl);
        if (resptr) *resptr = res == CURLE_OK ? C_OK : C_ERR;

        /* Check for errors */
        if (res != CURLE_OK) {
            const char *errstr = curl_easy_strerror(res);
            body = sdscat(body,errstr);
        } else {
            /* Return C_ERR if the request worked but returned a 500 code. */
            long code;
            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
            if (code == 500 && resptr) *resptr = C_ERR;
        }

        /* always cleanup */
        curl_easy_cleanup(curl);
    }
    return body;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x0, 0xca92(%rip)      # 0x152b0
je 0x8831
leaq 0x60f0(%rip), %rdi      # 0xe917
movq %r15, %rsi
xorl %eax, %eax
callq 0x2030
callq 0x5889
movq %rax, (%rsp)
callq 0x2320
testq %rax, %rax
je 0x893a
movq %rax, %r14
movq %rax, %rdi
movl $0x2712, %esi           # imm = 0x2712
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
leaq -0x7f(%rip), %rdx       # 0x87e5
movq %r14, %rdi
movl $0x4e2b, %esi           # imm = 0x4E2B
xorl %eax, %eax
callq 0x22c0
movq %rsp, %rdx
movq %r14, %rdi
movl $0x2711, %esi           # imm = 0x2711
xorl %eax, %eax
callq 0x22c0
movl $0x1, %edx
movq %r14, %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x22c0
movl $0x1, %edx
movq %r14, %rdi
movl $0x51, %esi
xorl %eax, %eax
callq 0x22c0
movq %r14, %rdi
movl $0xd, %esi
movl $0xf, %edx
xorl %eax, %eax
callq 0x22c0
movq %r14, %rdi
movl $0x4e, %esi
movl $0xf, %edx
xorl %eax, %eax
callq 0x22c0
movq %r14, %rdi
callq 0x2330
testq %rbx, %rbx
je 0x88eb
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, (%rbx)
testl %eax, %eax
je 0x8908
movl %eax, %edi
callq 0x2390
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x61f0
movq %rax, (%rsp)
jmp 0x8932
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl $0x200002, %esi         # imm = 0x200002
xorl %eax, %eax
callq 0x2160
testq %rbx, %rbx
je 0x8932
cmpq $0x1f4, 0x8(%rsp)       # imm = 0x1F4
jne 0x8932
movl $0x0, (%rbx)
movq %r14, %rdi
callq 0x2310
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: makeHttpCallOpt
sds makeHttpCallOpt(const char *url, int *resptr, char **optlist, int optnum) {
    sds fullurl = sdsnew(url);
    if (optnum) fullurl = sdscatlen(fullurl,"?",1);
    CURL *curl = curl_easy_init();
    for (int j = 0; j < optnum; j++) {
        if (j > 0) fullurl = sdscatlen(fullurl,"&",1);
        fullurl = sdscat(fullurl,optlist[j*2]);
        fullurl = sdscatlen(fullurl,"=",1);
        char *escaped = curl_easy_escape(curl,
            optlist[j*2+1],strlen(optlist[j*2+1]));
        fullurl = sdscat(fullurl,escaped);
        curl_free(escaped);
    }
    curl_easy_cleanup(curl);
    sds body = makeHttpCall(fullurl,resptr);
    sdsfree(fullurl);
    return body;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, (%rsp)
callq 0x58ac
movq %rax, %r12
testl %ebp, %ebp
je 0x897f
leaq 0x66de(%rip), %rsi      # 0xf04d
movl $0x1, %edx
movq %r12, %rdi
callq 0x6120
movq %rax, %r12
callq 0x2320
movq %rax, %r15
testl %ebp, %ebp
jle 0x8a13
movl %ebp, %ebp
shlq $0x4, %rbp
xorl %r13d, %r13d
testq %r13, %r13
je 0x89b4
movl $0x1, %edx
movq %r12, %rdi
leaq 0x5f78(%rip), %rsi      # 0xe924
callq 0x6120
movq %rax, %r12
movq (%r14,%r13), %rsi
movq %r12, %rdi
callq 0x61f0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5f57(%rip), %rsi      # 0xe926
callq 0x6120
movq %rax, %r12
movq 0x8(%r14,%r13), %rbx
movq %rbx, %rdi
callq 0x2100
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x2420
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
callq 0x61f0
movq %rax, %r12
movq %rbx, %rdi
callq 0x20a0
addq $0x10, %r13
cmpq %r13, %rbp
jne 0x8998
movq %r15, %rdi
callq 0x2310
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x8808
movq %rax, %rbx
movq %r12, %rdi
callq 0x591d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: makeBotRequest
sds makeBotRequest(const char *action, int *resptr, char **optlist, int numopt)
{
    sds url = sdsnew("https://api.telegram.org/bot");
    url = sdscat(url,BotApiKey);
    url = sdscatlen(url,"/",1);
    url = sdscat(url,action);
    sds body = makeHttpCallOpt(url,resptr,optlist,numopt);
    sdsfree(url);
    return body;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x5eca(%rip), %rdi      # 0xe928
callq 0x58ac
movq 0xc856(%rip), %rsi      # 0x152c0
movq %rax, %rdi
callq 0x61f0
leaq 0x5efe(%rip), %rsi      # 0xe977
movl $0x1, %edx
movq %rax, %rdi
callq 0x6120
movq %rax, %rdi
movq %r12, %rsi
callq 0x61f0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x8948
movq %rax, %rbx
movq %r12, %rdi
callq 0x591d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: freeYahooData
void freeYahooData(ydata *y) {
    if (y == NULL) return;
    sdsfree(y->symbol);
    sdsfree(y->name);
    sdsfree(y->prechange);
    sdsfree(y->postchange);
    sdsfree(y->regchange);
    sdsfree(y->csym);
    sdsfree(y->exchange);
    sdsfree(y->summary);
    sdsfree(y->country);
    sdsfree(y->industry);
    sdsfree(y->exdivdate);
    free(y->ts_data);
    free(y);
}

// Assembly:
testq %rdi, %rdi
je 0x8b4f
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x591d
movq 0x10(%rbx), %rdi
callq 0x591d
movq 0x48(%rbx), %rdi
callq 0x591d
movq 0x50(%rbx), %rdi
callq 0x591d
movq 0x58(%rbx), %rdi
callq 0x591d
movq 0x70(%rbx), %rdi
callq 0x591d
movq 0x60(%rbx), %rdi
callq 0x591d
movq 0xc8(%rbx), %rdi
callq 0x591d
movq 0xd0(%rbx), %rdi
callq 0x591d
movq 0xd8(%rbx), %rdi
callq 0x591d
movq 0xf0(%rbx), %rdi
callq 0x591d
movq 0x80(%rbx), %rdi
callq 0x2468
movq %rbx, %rdi
popq %rbx
jmp 0x2468
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: kvGet
sds kvGet(const char *key) {
    sds value = NULL;
    sqlRow row;
    sqlSelect(&row,"SELECT expire,value FROM KeyValue WHERE key=?s",key);
    if (sqlNextRow(&row)) {
        int64_t expire = row.col[0].i;
        if (!NoEvictMode && expire && expire < time(NULL)) {
            sqlQuery("DELETE FROM KeyValue WHERE key=?s",key);
        } else {
            value = sdsnewlen(row.col[1].s,row.col[1].i);
        }
    }
    sqlEnd(&row);
    return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x5b98(%rip), %rsi      # 0xeb1e
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x85df
movq %r15, %rdi
callq 0x836f
testl %eax, %eax
je 0x8ff3
cmpl $0x0, 0xc327(%rip)      # 0x152d4
jne 0x8fde
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x8fde
xorl %edi, %edi
callq 0x2200
cmpq %rax, %rbx
jge 0x8fde
leaq 0x5b7d(%rip), %rdi      # 0xeb4d
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x8545
jmp 0x8ff3
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdi
callq 0x576c
movq %rax, %rbx
cmpq $0x0, 0x8(%rsp)
je 0x901b
movq 0x18(%rsp), %rdi
callq 0x2468
movq 0x8(%rsp), %rdi
callq 0x2410
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: botSendMessage
int botSendMessage(int64_t target, sds text, int64_t reply_to) {
    char *options[10];
    int optlen = 4;
    options[0] = "chat_id";
    options[1] = sdsfromlonglong(target);
    options[2] = "text";
    options[3] = text;
    options[4] = "parse_mode";
    options[5] = "Markdown";
    options[6] = "disable_web_page_preview";
    options[7] = "true";
    if (reply_to) {
        optlen++;
        options[8] = "reply_to_message_id";
        options[9] = sdsfromlonglong(reply_to);
    } else {
        options[9] = NULL; /* So we can sdsfree it later without problems. */
    }

    int res;
    sds body = makeBotRequest("sendMessage",&res,options,optlen);
    sdsfree(body);
    sdsfree(options[1]);
    sdsfree(options[9]);
    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x586f(%rip), %rax      # 0xea6a
movq %rax, 0x10(%rsp)
callq 0x646e
movq %rax, %rbx
movq %rax, 0x18(%rsp)
leaq 0x585e(%rip), %rax      # 0xea72
movq %rax, 0x20(%rsp)
movq %r15, 0x28(%rsp)
leaq 0x5852(%rip), %rax      # 0xea77
movq %rax, 0x30(%rsp)
leaq 0x5851(%rip), %rax      # 0xea82
movq %rax, 0x38(%rsp)
leaq 0x584e(%rip), %rax      # 0xea8b
movq %rax, 0x40(%rsp)
leaq 0x4e65(%rip), %rax      # 0xe0ae
movq %rax, 0x48(%rsp)
testq %r14, %r14
je 0x9271
leaq 0x584a(%rip), %rax      # 0xeaa4
movq %rax, 0x50(%rsp)
movq %r14, %rdi
callq 0x646e
movq %rax, %r14
movl $0x5, %ecx
jmp 0x9279
movl $0x4, %ecx
xorl %r14d, %r14d
leaq 0x10(%rsp), %rdx
movq %r14, 0x48(%rdx)
leaq 0x582f(%rip), %rdi      # 0xeab8
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x8a44
movq %rax, %rdi
callq 0x591d
movq %rbx, %rdi
callq 0x591d
movq %r14, %rdi
callq 0x591d
movl (%r15), %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: createBotRequest
botRequest *createBotRequest(void) {
    botRequest *br = malloc(sizeof(*br));
    br->request = NULL;
    br->target = 0;
    return br;
}

// Assembly:
pushq %rax
movl $0x10, %edi
callq 0x2470
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: kvSetLen
int kvSetLen(const char *key, const char *value, size_t vlen, int64_t expire) {
    expire += time(NULL);
    if (!sqlInsert("INSERT INTO KeyValue VALUES(?i,?s,?b)",
                   expire,key,value,vlen))
    {
        if (!sqlQuery("UPDATE KeyValue SET expire=?i,value=?b WHERE key=?s",
                      expire,value,vlen,key))
        {
            return C_ERR;
        }
    }
    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2200
movq %rax, %r13
addq %rbp, %r13
leaq 0x57b4(%rip), %rdi      # 0xeac4
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x8499
testl %eax, %eax
jne 0x9345
leaq 0x57bc(%rip), %rdi      # 0xeaea
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x8545
testl %eax, %eax
je 0x934a
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetListID
int64_t dbGetListID(const char *listname, int create) {
    int64_t listid = 0;

    listid = sqlSelectInt(
        "SELECT rowid FROM Lists WHERE name=?s COLLATE NOCASE",
        listname);
    if (listid == 0 && create)
        listid = sqlInsert("INSERT INTO Lists VALUES(?s)",listname);
    return listid;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5b19(%rip), %rdi      # 0xef1c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8702
testq %rax, %rax
setne %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
jne 0x942f
leaq 0x5b2e(%rip), %rdi      # 0xef51
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8499
cltq
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetStockID
int64_t dbGetStockID(const char *listname, const char *stock) {
    int64_t listid = dbGetListID(listname,0);
    if (listid == 0) return 0;

    /* Check if a list with such name already exists. */
    return sqlSelectInt(
        "SELECT rowid FROM ListStock WHERE "
        "listid=?i AND symbol=?s COLLATE NOCASE",listid,stock);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x5ad8(%rip), %rdi      # 0xef1c
xorl %eax, %eax
callq 0x8702
testq %rax, %rax
je 0x9465
leaq 0x5b17(%rip), %rdi      # 0xef6e
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x8702
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetListCount
int dbGetListCount(const char *listname) {
    int64_t listid = dbGetListID(listname,0);
    if (listid == 0) return 0;

    return sqlSelectInt(
        "SELECT COUNT(*) FROM ListStock WHERE listid=?i",listid);
}

// Assembly:
pushq %rbx
movq %rdi, %rsi
leaq 0x5aa8(%rip), %rdi      # 0xef1c
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8702
testq %rax, %rax
je 0x9496
leaq 0x5b2e(%rip), %rdi      # 0xefb7
movq %rax, %rsi
xorl %eax, %eax
callq 0x8702
movq %rax, %rbx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbDelStockFromList
int dbDelStockFromList(const char *listname, const char *symbol, int dellist) {
    int64_t stockid = dbGetStockID(listname,symbol);

    if (!sqlQuery("DELETE FROM ListStock WHERE rowid=?i",stockid))
        return C_ERR;

    /* Delete the list if is now orphaned. */
    if (dellist && dbGetListCount(listname) == 0) {
        if (!sqlQuery("DELETE FROM Lists WHERE name=?s",listname))
            return C_ERR;
    }

    /* Finally remove the packs associated with this item in the list. */
    if (!sqlQuery("DELETE FROM StockPack WHERE rowid=?",stockid))
        return C_ERR;

    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
callq 0x9436
movq %rax, %rbx
leaq 0x5b34(%rip), %rdi      # 0xefe6
movq %rax, %rsi
xorl %eax, %eax
callq 0x8545
testl %eax, %eax
je 0x94fa
testl %ebp, %ebp
je 0x94e5
movq %r14, %rdi
callq 0x9469
testl %eax, %eax
jne 0x94e5
leaq 0x5b34(%rip), %rdi      # 0xf00b
movq %r14, %rsi
xorl %eax, %eax
callq 0x8545
testl %eax, %eax
je 0x94fa
leaq 0x5b3f(%rip), %rdi      # 0xf02b
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x8545
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: populateStockPackInfo
int populateStockPackInfo(stockpack *pack, const char *symbol) {
    ydata *yd = getYahooData(YDATA_QUOTE,symbol,NULL,NULL,10);

    size_t len = strlen(symbol);
    if (len >= sizeof(pack->symbol)) len = sizeof(pack->symbol)-1;
    memcpy(pack->symbol,symbol,len);
    pack->symbol[len] = 0;

    if (yd) {
        double daychange = strtod(yd->regchange,NULL);
        double payed = pack->quantity * pack->avgprice;
        double value = pack->quantity * yd->reg;
        pack->value = value;
        pack->gain = value-payed;
        pack->gainperc = (value/payed-1)*100;
        pack->daygainperc = daychange;
        pack->daygain = value / 100 * daychange;
        if (yd->csym[0] == '$')
            pack->currency = CURRENCY_USD;
        else if (strlen(yd->csym) == 3 && !memcmp(yd->csym,"\xe2\x82\xac",3))
            pack->currency = CURRENCY_EUR;
        freeYahooData(yd);
        return C_OK;
    } else {
        return C_ERR;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
callq 0x8b50
movq %rax, %r14
movq %r12, %rdi
callq 0x2100
cmpq $0x3f, %rax
movl $0x3f, %r13d
cmovbq %rax, %r13
leaq 0x24(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21d0
movb $0x0, 0x24(%rbx,%r13)
testq %r14, %r14
je 0x9618
movq 0x58(%r14), %rdi
xorl %esi, %esi
callq 0x21b0
movq 0x10(%rbx), %rax
cvtsi2sd %rax, %xmm1
mulsd 0x18(%rbx), %xmm1
cvtsi2ss %rax, %xmm2
mulss 0x20(%r14), %xmm2
cvtss2sd %xmm2, %xmm2
movsd %xmm2, 0x88(%rbx)
movaps %xmm2, %xmm3
subsd %xmm1, %xmm3
movsd %xmm3, 0x68(%rbx)
movaps %xmm2, %xmm3
divsd %xmm1, %xmm3
addsd 0x5122(%rip), %xmm3     # 0xe6c8
movsd %xmm0, 0x80(%rbx)
divsd 0x510a(%rip), %xmm2     # 0xe6c0
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
movapd 0x52ae(%rip), %xmm1     # 0xe870
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd %xmm3, %xmm1
movupd %xmm1, 0x70(%rbx)
movq 0x70(%r14), %r15
movl $0x1, %eax
cmpb $0x24, (%r15)
jne 0x95e3
movl %eax, 0x20(%rbx)
jmp 0x960a
movq %r15, %rdi
callq 0x2100
cmpq $0x3, %rax
jne 0x960a
movzwl (%r15), %eax
xorl $0x82e2, %eax           # imm = 0x82E2
movzbl 0x2(%r15), %ecx
xorl $0xac, %ecx
orw %ax, %cx
je 0x9625
movq %r14, %rdi
callq 0x8abe
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x2, %eax
jmp 0x95de
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetPortfolio
stockpack *dbGetPortfolio(const char *listname, int *count) {
    int64_t listid = dbGetListID(listname,0);
    if (listid == 0) return NULL;

    stockpack *packs = NULL;
    int rows = 0;
    char *sql = "SELECT symbol,quantity,avgprice FROM ListStock "
                "CROSS JOIN StockPack On "
                "ListStock.rowid = StockPack.liststockid "
                "WHERE ListStock.listid=?i ORDER BY symbol";

    sqlRow row;
    sqlSelect(&row,sql,listid);
    while (sqlNextRow(&row)) {
        packs = realloc(packs,sizeof(stockpack)*(rows+1));
        stockpack *pack = packs+rows;
        memset(pack,0,sizeof(stockpack));
        const char *symbol = row.col[0].s;
        pack->quantity = row.col[1].i;
        pack->avgprice = row.col[2].d;
        /* Compute the gain. */
        populateStockPackInfo(pack,symbol);
        rows++;
    }
    *count = rows;

    /* Return NULL if the list exists but there are no associated packs. */
    if (rows == 0) {
        xfree(packs);
        packs = NULL;
    }
    return packs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x58d5(%rip), %rdi      # 0xef1c
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x8702
testq %rax, %rax
je 0x9708
movq %rbx, 0x8(%rsp)
leaq 0x59ee(%rip), %rsi      # 0xf053
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x85df
movq %r14, %rdi
callq 0x836f
testl %eax, %eax
je 0x96f2
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
xorl %r14d, %r14d
leaq 0x90(%r12), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2478
movq %rax, %r14
leaq (%rax,%r12), %r13
movl $0x90, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2140
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%r14,%r12)
movsd 0x58(%rax), %xmm0
movsd %xmm0, 0x18(%r14,%r12)
movq %r13, %rdi
callq 0x9501
movq %r15, %rdi
callq 0x836f
incl %ebp
movq %rbx, %r12
testl %eax, %eax
jne 0x9690
jmp 0x96f5
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
movl %ebp, (%rax)
testl %ebp, %ebp
jne 0x970b
movq %r14, %rdi
callq 0x2468
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbAddStockToList
int64_t dbAddStockToList(const char *listname, const char *symbol) {
    int64_t listid = dbGetListID(listname,1);
    if (listid == 0) return 0;

    /* Check if the stock is already part of the list. */
    int64_t stockid = dbGetStockID(listname,symbol);
    if (stockid) return stockid;

    stockid = sqlInsert("INSERT INTO ListStock VALUES(?i,?s)",listid,symbol);
    return stockid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl $0x1, %esi
callq 0x93f4
testq %rax, %rax
je 0x9762
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9436
testq %rax, %rax
jne 0x9764
leaq 0x599b(%rip), %rdi      # 0xf0ec
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8499
cltq
jmp 0x9764
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetStocksFromList
sds *dbGetStocksFromList(const char *listname, int *numstocks) {
    int rows = 0;
    sds *symbols = NULL;

    /* Get the ID of the specified list, if any. */
    int64_t listid = dbGetListID(listname,0);
    if (listid == 0) return NULL;

    /* Check if a list with such name already exists. */
    sqlRow row;
    sqlSelect(&row,"SELECT symbol FROM ListStock WHERE listid=?i",listid);
    while (sqlNextRow(&row)) {
        symbols = realloc(symbols,sizeof(sds)*(rows+1));
        sds sym = sdsnew(row.col[0].s);
        symbols[rows++] = sym;
    }
    *numstocks = rows;
    return symbols;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x5797(%rip), %rdi      # 0xef1c
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x8702
testq %rax, %rax
je 0x97fe
leaq 0x5975(%rip), %rsi      # 0xf110
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x85df
movq %r14, %rdi
callq 0x836f
testl %eax, %eax
je 0x9803
movl $0x8, %r15d
xorl %r13d, %r13d
movq %rsp, %r12
xorl %r14d, %r14d
movq %r13, %rbp
incq %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x2478
movq %rax, %r14
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x58ac
movq %rax, (%r14,%rbp,8)
movq %r12, %rdi
callq 0x836f
addq $0x8, %r15
testl %eax, %eax
jne 0x97c6
jmp 0x9806
xorl %r14d, %r14d
jmp 0x9809
xorl %r14d, %r14d
movl %r13d, (%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antirez[P]stonky/stonky.c
// Function: dbGetStockPack
int dbGetStockPack(stockpack *sp) {
    sqlRow row;
    sqlSelect(&row,
        "SELECT rowid,quantity,avgprice FROM StockPack WHERE liststockid=?i",
        sp->stockid);

    /* Check if a list with such name already exists. */
    if (sqlNextRow(&row)) {
        sp->rowid = row.col[0].i;
        sp->quantity = row.col[1].i;
        sp->avgprice = row.col[2].d;
        sqlEnd(&row);
        return C_OK;
    } else {
        return C_ERR;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movq 0x8(%rdi), %rdx
leaq 0x590b(%rip), %rsi      # 0xf13d
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x85df
movq %r15, %rdi
callq 0x836f
testl %eax, %eax
je 0x9896
movq 0x18(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%r14)
movq 0x28(%rdi), %rax
movq %rax, 0x10(%r14)
movsd 0x58(%rdi), %xmm0
movsd %xmm0, 0x18(%r14)
movl $0x1, %ebx
cmpq $0x0, 0x8(%rsp)
je 0x9896
callq 0x2468
movq 0x8(%rsp), %rdi
callq 0x2410
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq