// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/libreddit/token.c
// Function: parseChar
static void parseChar (struct charParser *p)
{
    int k;
    wchar_t temp;
    switch(p->text[p->cur]) {
    case '\\':
        p->cur++;
        switch(p->text[p->cur]) {
        case 'n':
            if (p->wide)
                ((wchar_t*)(p->new_text))[p->offset] = L'\n';
            else
                ((char*)(p->new_text))[p->offset] = '\n';
            p->offset++;
            break;

        case 'u':
            if (p->wide) {
                temp = L'\0';
                for (k = 3; k >= 0; k--) {
                    p->cur++;
                    /* This weird piece of code converts a hex character (0-9 and a-f) into
                     * it's decimal equivalent, and then shits it over the correct number of
                     * bits corresponding to it's position in the wchar_t */
                    temp |= (((p->text[p->cur] < 58)? p->text[p->cur] - 48: ((p->text[p->cur] & 0x0F) + 9))) << (k << 2);
                }
                ((wchar_t*)(p->new_text))[p->offset] = temp;
                p->offset++;
            } else {
                p->cur+=4;
            }
            break;

        case '\"':
            if (p->wide)
                ((wchar_t*)(p->new_text))[p->offset] = L'\"';
            else
                ((char*)(p->new_text))[p->offset] = '\"';
            p->offset++;
            break;

        }
        break;
    default:
        if (p->wide)
            ((wchar_t*)(p->new_text))[p->offset] = btowc(p->text[p->cur]);
        else
            ((char*)(p->new_text))[p->offset] = p->text[p->cur];
        p->offset++;
        break;
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movslq 0x8(%rcx), %rcx
movb (%rax,%rcx), %al
subb $0x5c, %al
jne 0x727c
jmp 0x70b2
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movslq 0x8(%rcx), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
subl $0x22, %eax
je 0x7230
jmp 0x70de
movl 0x4(%rsp), %eax
subl $0x6e, %eax
je 0x70f7
jmp 0x70e9
movl 0x4(%rsp), %eax
subl $0x75, %eax
je 0x7146
jmp 0x727a
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x711d
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movl $0xa, (%rax,%rcx,4)
jmp 0x7133
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movb $0xa, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x727a
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x7220
movl $0x0, 0x8(%rsp)
movl $0x3, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x71f7
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3a, %eax
jge 0x71b5
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl %eax, (%rsp)
jmp 0x71d3
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsbl (%rax,%rcx), %eax
andl $0xf, %eax
addl $0x9, %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movl 0xc(%rsp), %ecx
shll $0x2, %ecx
shll %cl, %eax
orl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x7165
movl 0x8(%rsp), %edx
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x722e
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x8(%rax)
jmp 0x727a
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x7256
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movl $0x22, (%rax,%rcx,4)
jmp 0x726c
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movb $0x22, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x72f1
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x72ba
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2210
movl %eax, %edx
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x72e3
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movb (%rax,%rcx), %dl
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)