// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jae 0x153b
movl -0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x14e0
movl -0x10(%rbp), %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0x1371
cmpl $0xc2, -0x10(%rbp)
jae 0x1339
movzbl -0xa(%rbp), %eax
addl $0x1e, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x136c
cmpl $0xc2, -0x10(%rbp)
jne 0x1357
movzbl -0xa(%rbp), %eax
addl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x136a
movzbl -0xa(%rbp), %eax
addl $0x0, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x136c
jmp 0x14de
movl -0x10(%rbp), %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0x1445
movl -0x10(%rbp), %eax
addl $0xffffff20, %eax       # imm = 0xFFFFFF20
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xe, %eax
ja 0x142d
movq -0x18(%rbp), %rax
leaq 0x1c5e(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0xa(%rbp), %eax
addl $0x2, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x3, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x4, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x5, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x6, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x7, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1440
movzbl -0xa(%rbp), %eax
addl $0x8, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14dc
movl -0x10(%rbp), %eax
andl $0xf8, %eax
cmpl $0xf0, %eax
jne 0x14c7
cmpl $0xf5, -0x10(%rbp)
jb 0x1472
movzbl -0xa(%rbp), %eax
addl $0x1e, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14c5
cmpl $0xf0, -0x10(%rbp)
jne 0x1490
movzbl -0xa(%rbp), %eax
addl $0x16, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14c3
cmpl $0xf4, -0x10(%rbp)
jne 0x14ae
movzbl -0xa(%rbp), %eax
addl $0x17, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14c1
movzbl -0xa(%rbp), %eax
addl $0x15, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14c3
jmp 0x14c5
jmp 0x14da
movzbl -0xa(%rbp), %eax
addl $0x1e, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x14dc
jmp 0x14de
jmp 0x152b
cmpl $0xa, -0x10(%rbp)
jne 0x14f3
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x1529
callq 0x1190
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x151a
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x1527
movb -0x9(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x1529
jmp 0x152b
jmp 0x152d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x12ee
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)