// File: /workspace/github_c_makefile_star2_O0/antirez[P]stonky/stonky.c
// Function: sdsCatPriceRequest
sds sdsCatPriceRequest(sds s, sds symbol, ydata *yd, int flags) {
    if (yd == NULL) {
        s = sdscatprintf(s,
            (flags & STONKY_SHORT) ? "Can't find data for '%s'" :
                                     "%s: no data avaiable",
        symbol);
        return s;
    }

    /* Select the emoji according to the price change. */
    double change = strtod(yd->regchange,NULL);
    const char *emoji = priceChangeToEmoji(change);

    if (flags & STONKY_VERY_SHORT) {
        s = sdscatprintf(s,
            "%s[%s](https://google.com/search?q=%s+stock) %s%s",
            emoji,
            yd->symbol,
            yd->symbol,
            (yd->regchange && yd->regchange[0] == '-') ? "" : "+",
            yd->regchange);
    } else if (flags & STONKY_SHORT) {
        s = sdscatprintf(s,
            "%s[%s](https://google.com/search?q=%s+stock): %.02f%s (%s%s)",
            emoji,
            yd->symbol,
            yd->symbol,
            yd->reg,
            yd->csym,
            (yd->regchange && yd->regchange[0] == '-') ? "" : "+",
            yd->regchange);
    } else {
        s = sdscatprintf(s,
            "%s%s ([%s](https://google.com/search?q=%s+stock)) "
            "price is %.02f%s (%s%s)",
            emoji,
            yd->name,
            yd->symbol,
            yd->symbol,
            yd->reg,
            yd->csym,
            (yd->regchange && yd->regchange[0] == '-') ? "" : "+",
            yd->regchange);
    }
    if (DebugMode >= 2) {
        printf("%s pretime:%d regtime:%d posttime:%d\n",
            yd->symbol,
            (int)yd->pretime, (int)yd->regtime, (int)yd->posttime);
    }

    /* Add premarket / afterhours info. */
    if (!(flags & STONKY_VERY_SHORT)) {
        if (yd->pretime > yd->regtime) {
            s = sdscatprintf(s," | %s: %.02f%s (%s%s)",
                (flags & STONKY_SHORT) ? "pre" : "pre-market",
                yd->pre, yd->csym, yd->prechange[0] == '-' ? "" : "+",
                yd->prechange);
        } else if (yd->posttime > yd->regtime) {
            s = sdscatprintf(s," | %s: %.02f%s (%s%s)",
                (flags & STONKY_SHORT) ? "post" : "after-hours",
                yd->post, yd->csym, yd->postchange[0] == '-' ? "" : "+",
                yd->postchange);
        }
    }
    return s;
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movl %ecx, 0xd4(%rsp)
cmpq $0x0, 0xd8(%rsp)
jne 0xf294
movq 0xe8(%rsp), %rdi
movl 0xd4(%rsp), %ecx
andl $0x1, %ecx
leaq 0x6ebb(%rip), %rsi      # 0x16115
leaq 0x6e9b(%rip), %rax      # 0x160fc
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movq 0xe0(%rsp), %rdx
movb $0x0, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0xf7c2
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2190
movsd %xmm0, 0xc8(%rsp)
movsd 0xc8(%rsp), %xmm0
callq 0xb8f0
movq %rax, 0xc0(%rsp)
movl 0xd4(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xf3c0
movq 0xe8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xd8(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x58(%rcx)
movb %al, 0xbf(%rsp)
je 0xf357
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0xbf(%rsp)
movq 0xb0(%rsp), %r8
movq 0xa8(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rdi
movb 0xbf(%rsp), %sil
leaq 0x6dd6(%rip), %r9       # 0x1615c
leaq 0x77c8(%rip), %rax      # 0x16b55
testb $0x1, %sil
cmovneq %rax, %r9
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
leaq 0x6d82(%rip), %rsi      # 0x1612a
movq %rax, (%rsp)
movb $0x0, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
jmp 0xf5f8
movl 0xd4(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf4e4
movq 0xe8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0xd8(%rsp), %rax
movss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0xd8(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x58(%rcx)
movb %al, 0x97(%rsp)
je 0xf471
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0x97(%rsp)
movq 0x88(%rsp), %r9
movsd 0x80(%rsp), %xmm0
movq 0x78(%rsp), %r8
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rdi
movb 0x97(%rsp), %sil
leaq 0x6cb7(%rip), %r10      # 0x1615c
leaq 0x76a9(%rip), %rax      # 0x16b55
testb $0x1, %sil
cmovneq %rax, %r10
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
leaq 0x6c97(%rip), %rsi      # 0x1615e
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x1, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
jmp 0xf5f6
movq 0xe8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0xd8(%rsp), %rax
movss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0xd8(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x58(%rcx)
movb %al, 0x5f(%rsp)
je 0xf587
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0x5f(%rsp)
movq 0x50(%rsp), %r11
movsd 0x48(%rsp), %xmm0
movq 0x40(%rsp), %r9
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rdi
movb 0x5f(%rsp), %sil
leaq 0x6ba5(%rip), %r10      # 0x1615c
leaq 0x7597(%rip), %rax      # 0x16b55
testb $0x1, %sil
cmovneq %rax, %r10
movq 0xd8(%rsp), %rax
movq 0x58(%rax), %rax
leaq 0x6bc2(%rip), %rsi      # 0x1619b
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x1, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
jmp 0xf5f8
cmpl $0x2, 0xbcb1(%rip)      # 0x1b2b0
jl 0xf646
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rax
movl %eax, %edx
movq 0xd8(%rsp), %rax
movq 0x38(%rax), %rax
movl %eax, %ecx
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movl %eax, %r8d
leaq 0x6ba6(%rip), %rdi      # 0x161e5
movb $0x0, %al
callq 0x2030
movl 0xd4(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xf7b2
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jle 0xf706
movq 0xe8(%rsp), %rdi
movl 0xd4(%rsp), %ecx
andl $0x1, %ecx
leaq 0x6b95(%rip), %rdx      # 0x16225
leaq 0x6b8a(%rip), %rax      # 0x16221
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq 0xd8(%rsp), %rax
movss 0x18(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rcx
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %rax
movsbl (%rax), %esi
leaq 0x6a8b(%rip), %r8       # 0x1615c
leaq 0x747d(%rip), %rax      # 0x16b55
cmpl $0x2d, %esi
cmoveq %rax, %r8
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %r9
leaq 0x6b19(%rip), %rsi      # 0x1620b
movb $0x1, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
jmp 0xf7b0
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jle 0xf7ae
movq 0xe8(%rsp), %rdi
movl 0xd4(%rsp), %ecx
andl $0x1, %ecx
leaq 0x6af3(%rip), %rdx      # 0x16230
leaq 0x7e8b(%rip), %rax      # 0x175cf
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq 0xd8(%rsp), %rax
movss 0x1c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rcx
movq 0xd8(%rsp), %rax
movq 0x50(%rax), %rax
movsbl (%rax), %esi
leaq 0x69de(%rip), %r8       # 0x1615c
leaq 0x73d0(%rip), %rax      # 0x16b55
cmpl $0x2d, %esi
cmoveq %rax, %r8
movq 0xd8(%rsp), %rax
movq 0x50(%rax), %r9
leaq 0x6a6c(%rip), %rsi      # 0x1620b
movb $0x1, %al
callq 0x98c0
movq %rax, 0xe8(%rsp)
jmp 0xf7b0
jmp 0xf7b2
movq 0xe8(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)