// File: cjxgm[P]libgpp/src/libgpp.cpp
// Function: (anonymous namespace)::str_nl(char*, int)
char *str_nl(char *s, int check_delim) {
        char *u;
        int neg;
        u = s;
        if (check_delim && !is_delim(*s))
            bug("character not allowed to start a syntax specifier");
        while (*s != '"') {
            if (((*s & 0x60) == 0) && (*s != '\n') && (*s != '\t'))
                bug("character not allowed in syntax specifier");
            if (*s == '\\') {
                neg = (s[1] == '!');
                switch (s[neg + 1]) {
                case 'n':
                case 'r':
                    *u = '\n';
                    break;
                case 't':
                    *u = '\t';
                    break;
                case 'b': // one or more spaces
                    *u = '\001';
                    break;
                case 'w': // zero or more spaces
                    if (neg)
                        bug("\\w and \\W cannot be negated");
                    *u = '\002';
                    break;
                case 'B': // one or more spaces or \n
                    *u = '\003';
                    break;
                case 'W': // zero or more spaces or \n
                    if (neg)
                        bug("\\w and \\W cannot be negated");
                    *u = '\004';
                    break;
                case 'a': // alphabetic
                    *u = '\005';
                    break;
                case 'A': // alphabetic + space
                    *u = '\006';
                    break;
                case '#': // numeric
                    *u = '\007';
                    break;
                case 'i': // identifier
                    *u = '\010';
                    break;
                case 'o': // operator
                    *u = '\013';
                    break;
                case 'O': // operator/parenthesis
                    *u = '\014';
                    break;
                case '"':
                case '\\':
                    if (!neg) {
                        *u = s[1];
                        break;
                    }
                    // fallthrough
                default:
                    bug("unknown escape sequence in syntax specifier");
                }
                if (neg > 0)
                    *u += (char) 128;
                s += neg + 1;
            } else if (*s == ' ')
                *u = '\001';
            else
                *u = *s;
            if (*s == 0)
                bug("unterminated string in #mode command");
            s++;
            u++;
        }
        *u = 0;
        return (s + 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xa5fa
movq -0x8(%rbp), %rax
movzbl (%rax), %edi
callq 0xa8a0
cmpl $0x0, %eax
jne 0xa5fa
leaq 0x19ec(%rip), %rdi      # 0xbfe1
callq 0x35e0
jmp 0xa5fc
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0xa7d0
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
andl $0x60, %eax
cmpl $0x0, %eax
jne 0xa63f
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0xa63f
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0xa63f
leaq 0x19d9(%rip), %rdi      # 0xc013
callq 0x35e0
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0xa778
movq -0x8(%rbp), %rax
movb 0x1(%rax), %al
subb $0x21, %al
sete %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
movslq -0x1c(%rbp), %rax
movsbl 0x1(%rax,%rcx), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x55, %eax
ja 0xa744
movq -0x28(%rbp), %rax
leaq 0xe09(%rip), %rcx       # 0xb494
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movb $0xa, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x9, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0xa750
cmpl $0x0, -0x1c(%rbp)
je 0xa6ca
leaq 0x1978(%rip), %rdi      # 0xc03d
callq 0x35e0
movq -0x18(%rbp), %rax
movb $0x2, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x3, (%rax)
jmp 0xa750
cmpl $0x0, -0x1c(%rbp)
je 0xa6ee
leaq 0x1954(%rip), %rdi      # 0xc03d
callq 0x35e0
movq -0x18(%rbp), %rax
movb $0x4, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x5, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x6, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x7, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0x8, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0xb, (%rax)
jmp 0xa750
movq -0x18(%rbp), %rax
movb $0xc, (%rax)
jmp 0xa750
cmpl $0x0, -0x1c(%rbp)
jne 0xa742
movq -0x8(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0xa750
jmp 0xa744
leaq 0x190e(%rip), %rdi      # 0xc059
callq 0x35e0
cmpl $0x0, -0x1c(%rbp)
jle 0xa762
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
addl $-0x80, %ecx
movb %cl, (%rax)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xa79b
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xa78d
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0xa799
movq -0x8(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0xa79b
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xa7b3
leaq 0x18d7(%rip), %rdi      # 0xc085
callq 0x35e0
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa5fc
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x1, %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)