// File: /workspace/github_cpp_makefile_star2_O1/mukul-mehta[P]meta/tokenizer.cc
// Function: tokenize[abi:cxx11](char*)
vector<string> tokenize(char* line) {
    vector<string> tokens;
    if (line == NULL) {
        return {};
    }

    static char token[MAXTOKEN];
    memset(token, '\0', MAXTOKEN);
    size_t n = 0;
    size_t len = strlen(line);

    const int MODE_NORMAL = 0, MODE_SQUOTE = 1, MODE_DQUOTE = 2;
    int mode = MODE_NORMAL;

    for (size_t i = 0; i < len; i++) {
        char c = line[i];
        if (mode == MODE_NORMAL) {
            if (c == '\'') {
                mode = MODE_SQUOTE;
            } else if (c == '"') {
                mode = MODE_DQUOTE;
            } else if (c == '\\') {
                if (i + 1 < len) {
                    token[n++] = line[++i];
                }
            } else if (isspace(c)) {
                if (n > 0) {
                    token[n] = '\0';
                    char* temp = (char*)malloc(n + 1);
                    strncpy(temp, token, n + 1);
                    string word = temp;
                    tokens.push_back(word);
                    n = 0;
                    memset(token, '\0', MAXTOKEN);
                }
            } else {
                token[n++] = c;
            }
        } else if (mode == MODE_SQUOTE) {
            if (c == '\'') {
                mode = MODE_NORMAL;
            } else if (c == '\\') {
                if (i + 1 < len) {
                    token[n++] = line[++i];
                }
            } else {
                token[n++] = c;
            }
        } else if (mode == MODE_DQUOTE) {
            if (c == '"') {
                mode = MODE_NORMAL;
            } else if (c == '\\') {
                if (i + 1 < len) {
                    token[n++] = line[++i];
                }
            } else {
                token[n++] = c;
            }
        }
        if (n + 1 >= MAXTOKEN)
            abort();
    }

    if (n > 0) {
        string temp = token;
        tokens.push_back(temp);
        n = 0;
    }
    return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq %rdi, %rax
testq %rsi, %rsi
je 0x3fcc
movq %rsi, %r15
leaq 0x551c(%rip), %r14      # 0x92c0
xorl %r13d, %r13d
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2150
movq %r15, %rdi
callq 0x20f0
testq %rax, %rax
je 0x3fae
movq %r14, %rdx
movq %rax, %r12
movq %rbx, 0x50(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
movb (%r15,%rbx), %r14b
movzbl %r14b, %eax
cmpl $0x1, %r13d
je 0x3eb0
testl %r13d, %r13d
jne 0x3ec6
cmpl $0x5c, %eax
je 0x3efc
cmpl $0x27, %eax
je 0x3ee4
cmpl $0x22, %eax
je 0x3ef4
movsbl %r14b, %edi
callq 0x2050
testl %eax, %eax
je 0x3f18
testq %rbp, %rbp
leaq 0x5499(%rip), %rdx      # 0x92c0
je 0x3f4b
movb $0x0, (%rbp,%rdx)
incq %rbp
movq %rbp, %rdi
movq %rdx, %r14
callq 0x2380
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x2120
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
leaq 0xf(%rsp), %rdx
callq 0x4146
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x4184
movl $0x400, %edx            # imm = 0x400
leaq 0x5441(%rip), %rdi      # 0x92c0
xorl %esi, %esi
callq 0x2150
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3ea2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq 0x5412(%rip), %rdx      # 0x92c0
jmp 0x3f2a
cmpl $0x27, %eax
je 0x3f27
cmpl $0x5c, %eax
jne 0x3edc
leaq 0x1(%rbx), %rax
movl $0x1, %r13d
jmp 0x3f03
cmpl $0x22, %eax
je 0x3f27
cmpl $0x5c, %eax
jne 0x3eec
leaq 0x1(%rbx), %rax
movl $0x2, %r13d
jmp 0x3f03
movb %r14b, (%rbp,%rdx)
incq %rbp
movl $0x1, %r13d
jmp 0x3f2a
movb %r14b, (%rbp,%rdx)
incq %rbp
movl $0x2, %r13d
jmp 0x3f2a
leaq 0x1(%rbx), %rax
xorl %r13d, %r13d
cmpq %r12, %rax
jae 0x3f2a
movb (%r15,%rax), %cl
movb %cl, (%rbp,%rdx)
incq %rbp
movq %rax, %rbx
jmp 0x3f2a
leaq 0x53a1(%rip), %rdx      # 0x92c0
movb %r14b, (%rbp,%rdx)
incq %rbp
xorl %r13d, %r13d
leaq -0x3ff(%rbp), %rax
cmpq $-0x401, %rax           # imm = 0xFBFF
jbe 0x3ff3
incq %rbx
cmpq %r12, %rbx
jb 0x3dd6
jmp 0x3f52
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x3f2a
testq %rbp, %rbp
movq 0x50(%rsp), %rbx
je 0x3fae
leaq 0x10(%rsp), %r15
leaq 0x20(%rsp), %rax
movq %rax, (%r15)
movq %rdx, %rdi
movq %rdx, %r14
callq 0x20f0
leaq (%rax,%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x41ee
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4184
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3fae
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
leaq 0x30(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
callq 0x37f8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2160
jmp 0x3ffc
jmp 0x401d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4020
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
jmp 0x4020
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x37f8
movq %rbx, %rdi
callq 0x2490