// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rdi, %r14
testq %rsi, %rsi
je 0x39bb
movq %rsi, %r15
movq %rbx, 0x30(%rsp)
leaq 0x5b16(%rip), %r14      # 0x92d0
xorl %ebx, %ebx
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2180
movq %r15, %rdi
callq 0x2100
movq %r14, %rdx
movq %rax, %r13
pushq $0x1
popq %rsi
pushq $0x2
popq %rdi
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq %r13, %r14
jae 0x3969
movb (%r15,%r14), %r12b
movzbl %r12b, %eax
cmpl $0x1, %ebx
je 0x38b0
testl %ebx, %ebx
jne 0x38d2
cmpl $0x5c, %eax
je 0x3910
cmpl $0x27, %eax
je 0x3900
cmpl $0x22, %eax
je 0x390c
movsbl %r12b, %edi
callq 0x2050
testl %eax, %eax
je 0x3944
testq %rbp, %rbp
leaq 0x5a94(%rip), %rdx      # 0x92d0
je 0x395d
movb $0x0, (%rbp,%rdx)
incq %rbp
movq %rbp, %rdi
movq %rdx, %r12
callq 0x23a0
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x2150
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
leaq 0xf(%rsp), %rdx
callq 0x30bc
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x3ad0
xorl %ebp, %ebp
movl $0x400, %edx            # imm = 0x400
leaq 0x5a3a(%rip), %rbx      # 0x92d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2180
movq %r12, %rdi
callq 0x2120
movq %rbx, %rdx
jmp 0x395f
cmpl $0x27, %eax
je 0x38f4
cmpl $0x5c, %eax
jne 0x38f8
leaq 0x1(%r14), %rax
cmpq %r13, %rax
jae 0x3900
movb (%r15,%rax), %cl
movb %cl, (%rbp,%rdx)
incq %rbp
movl %esi, %ebx
jmp 0x3926
cmpl $0x22, %eax
je 0x38f4
cmpl $0x5c, %eax
jne 0x3904
leaq 0x1(%r14), %rax
cmpq %r13, %rax
jae 0x390c
movb (%r15,%rax), %cl
movb %cl, (%rbp,%rdx)
incq %rbp
movl %edi, %ebx
jmp 0x3926
xorl %ebx, %ebx
jmp 0x3929
movb %r12b, (%rbp,%rdx)
incq %rbp
movl %esi, %ebx
jmp 0x3929
movb %r12b, (%rbp,%rdx)
incq %rbp
movl %edi, %ebx
jmp 0x3929
leaq 0x1(%r14), %rax
xorl %ebx, %ebx
cmpq %r13, %rax
jae 0x3929
movb (%r15,%rax), %cl
movb %cl, (%rbp,%rdx)
incq %rbp
movq %rax, %r14
leaq -0x3ff(%rbp), %rax
cmpq $-0x401, %rax           # imm = 0xFBFF
jbe 0x39e0
incq %r14
jmp 0x37e4
leaq 0x5985(%rip), %rdx      # 0x92d0
movb %r12b, (%rbp,%rdx)
incq %rbp
xorl %ebx, %ebx
pushq $0x1
popq %rsi
pushq $0x2
popq %rdi
jmp 0x3929
xorl %ebp, %ebp
xorl %ebx, %ebx
pushq $0x1
popq %rsi
pushq $0x2
popq %rdi
jmp 0x393c
testq %rbp, %rbp
movq 0x30(%rsp), %rbx
leaq 0x10(%rsp), %r14
je 0x39a7
leaq 0x5951(%rip), %rsi      # 0x92d0
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x30bc
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3ad0
leaq 0x38(%rsp), %rdi
callq 0x2120
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andq $0x0, 0x10(%r14)
leaq 0x10(%rsp), %rdi
callq 0x3196
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2190
jmp 0x39ee
jmp 0x39e9
movq %rax, %rbx
jmp 0x39fb
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2120
leaq 0x10(%rsp), %rdi
callq 0x3196
movq %rbx, %rdi
callq 0x24a0