// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wc2.c
// Function: build_basic
static void
build_basic(unsigned char *row, unsigned char default_state, unsigned char ubase)
{
    unsigned c;
    for (c=0; c<256; c++) {
        if ((c & 0x80)) {
            if ((c & 0xE0) == 0xC0) {
                /* 110x xxxx - unicode 2 byte sequence */
                if (c < 0xC2)
                    row[c] = ubase + ILLEGAL;
                else if (c == 0xC2)
                    row[c] = ubase + DUO2_C2;
                else
                    row[c] = ubase + DUO2_xx;
            } else if ((c & 0xF0) == 0xE0) {
                /* 1110 xxxx - unicode 3 byte sequence */
                switch (c) {
                    case 0xE0:
                        row[c] = ubase + TRI2_E0;
                        break;
                    case 0xE1:
                        row[c] = ubase + TRI2_E1;
                        break;
                    case 0xE2:
                        row[c] = ubase + TRI2_E2;
                        break;
                    case 0xE3:
                        row[c] = ubase + TRI2_E3;
                        break;
                    case 0xEd:
                        row[c] = ubase + TRI2_ED;
                        break;
                    case 0xEe:
                        row[c] = ubase + TRI2_EE;
                        break;
                    default:
                        row[c] = ubase + TRI2_xx;
                        break;
                }
            } else if ((c & 0xF8) == 0xF0) {
                if (c >= 0xF5)
                    row[c] = ubase + ILLEGAL;
                else if (c == 0xF0)
                    row[c] = ubase + QUAD2_F0;
                else if (c == 0xF4)
                    row[c] = ubase + QUAD2_F4;
                else
                    row[c] = ubase + QUAD2_xx;
            } else
                row[c] = ubase + ILLEGAL;
        } else if (c == '\n')
            row[c] = NEWLINE;
        else if (isspace(c))
            row[c] = WASSPACE;
        else
            row[c] = default_state;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leal 0x1e(%rbx), %r15d
leal 0x17(%rbx), %eax
movl %eax, 0x14(%rsp)
leal 0x16(%rbx), %eax
movl %eax, 0x10(%rsp)
leal 0x15(%rbx), %eax
movl %eax, 0xc(%rsp)
leal 0x7(%rbx), %eax
movl %eax, 0x30(%rsp)
leal 0x6(%rbx), %eax
movl %eax, 0x2c(%rsp)
leal 0x5(%rbx), %eax
movl %eax, 0x28(%rsp)
leal 0x4(%rbx), %eax
movl %eax, 0x24(%rsp)
leal 0x3(%rbx), %eax
movl %eax, 0x20(%rsp)
leal 0x2(%rbx), %eax
movl %eax, 0x1c(%rsp)
leal 0x8(%rbx), %eax
movl %eax, 0x18(%rsp)
leal 0x1(%rbx), %eax
movl %eax, 0x34(%rsp)
xorl %r13d, %r13d
leaq 0x2c5c(%rip), %r12      # 0x4004
cmpq $0x80, %r13
jae 0x13c1
cmpq $0xa, %r13
jne 0x13f2
movb $0x1, 0xa(%r14)
jmp 0x14b9
movl %r13d, %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0x140b
cmpq $0xc1, %r13
jbe 0x1456
cmpq $0xc2, %r13
jne 0x145c
movl 0x34(%rsp), %eax
movb %al, 0xc2(%r14)
jmp 0x14b9
callq 0x1190
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r13,2)
jne 0x1437
movb %bpl, (%r14,%r13)
jmp 0x14b9
movl %r13d, %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0x143e
movzbl %r13b, %eax
addl $0xffffff20, %eax       # imm = 0xFFFFFF20
cmpl $0xe, %eax
ja 0x148c
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movl 0x1c(%rsp), %eax
jmp 0x14b5
movb $0x0, (%r14,%r13)
jmp 0x14b9
movl %r13d, %eax
andl $0xf8, %eax
cmpl $0xf0, %eax
jne 0x1456
cmpq $0xf5, %r13
jb 0x1462
movb %r15b, (%r14,%r13)
jmp 0x14b9
movb %bl, (%r14,%r13)
jmp 0x14b9
cmpb $-0xc, %r13b
je 0x14a4
movzbl %r13b, %eax
cmpl $0xf0, %eax
jne 0x14b1
movl 0x10(%rsp), %eax
movb %al, 0xf0(%r14)
jmp 0x14b9
movl 0x24(%rsp), %eax
jmp 0x14b5
movl 0x30(%rsp), %eax
jmp 0x14b5
movl 0x18(%rsp), %eax
jmp 0x14b5
movl 0x20(%rsp), %eax
jmp 0x14b5
movl 0x28(%rsp), %eax
jmp 0x14b5
movl 0x2c(%rsp), %eax
jmp 0x14b5
movl 0x14(%rsp), %eax
movb %al, 0xf4(%r14)
jmp 0x14b9
movl 0xc(%rsp), %eax
movb %al, (%r14,%r13)
incq %r13
cmpq $0x100, %r13            # imm = 0x100
jne 0x13a8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq