// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/main.c
// Function: linkScreenRenderLinkText
void linkScreenRenderLinkText (LinkScreen *screen, wchar_t *tmpbuf, int bufLen, int screenLines)
{
    RedditLink *current;
    int lastLine = screenLines - screen->offset;

    linkScreenSetupSplit(screen, tmpbuf, bufLen, lastLine);

    attron(COLOR_PAIR(1));
    if (screen->list->linkCount >= screen->selected) {
        current = screen->list->links[screen->selected];
        if (current != NULL) {
            swprintf(tmpbuf, bufLen, L"%s - %d Score / %d Comments / %s \nTitle: ", current->author, current->score, current->numComments, current->created_utc);
            mvaddwstr(lastLine + 1, 0, tmpbuf);
            addwstr(current->wtitleEsc);
            addch('\n');
            swprintf(tmpbuf, bufLen, L"-------\n");
            addwstr(tmpbuf);

            if (current->flags & REDDIT_LINK_IS_SELF)
                addwstr(&(current->wselftextEsc[current->advance]));
            else
                addstr(current->url);
        }
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movl 0x20(%rsp), %eax
movq 0x30(%rsp), %rcx
subl 0xc(%rcx), %eax
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x14(%rsp), %ecx
callq 0x3c50
movq 0x629c(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
movl %eax, %edx
callq 0x22b0
movq 0x30(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rax), %eax
movq 0x30(%rsp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x3ed1
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x30(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x3ecf
movq 0x28(%rsp), %rdi
movslq 0x24(%rsp), %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x18(%rsp), %rax
movl 0x58(%rax), %r8d
movq 0x18(%rsp), %rax
movl 0x64(%rax), %r9d
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rax
leaq 0x35ff(%rip), %rdx      # 0x73cc
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2270
movq 0x6201(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movl 0x14(%rsp), %esi
addl $0x1, %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
jne 0x3df7
jmp 0x3e10
movq 0x61e2(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2280
movq 0x61c9(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2280
movq 0x61ac(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movl $0xa, %esi
callq 0x2290
movq 0x28(%rsp), %rdi
movslq 0x24(%rsp), %rsi
leaq 0x3622(%rip), %rdx      # 0x7474
movb $0x0, %al
callq 0x2270
movq 0x6180(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2280
movq 0x18(%rsp), %rax
movl 0x78(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3eb0
movq 0x6157(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rsi
movq 0x18(%rsp), %rax
movl 0x7c(%rax), %eax
shlq $0x2, %rax
addq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2280
jmp 0x3ecd
movq 0x6129(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2320
jmp 0x3ecf
jmp 0x3ed1
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)