// File: /workspace/github_cpp_makefile_star2_O3/0x0584[P]scmin-plus/src/repl/token.cpp
// Function: token::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
queue<token> token::tokenize(string& s) {
    queue<token> tokens;
    token tok;

    paren = {};
    while (next_token(s, tok) and not tok.err)
        tokens.push(tok), tok = {};
    // TODO: implement more sophisticated error management ////////////////////
    if (tok.err or paren.size()) {
        cerr << "there was error while lexing" << endl;
        return {};
    }
    return tokens;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r12
movq %rdi, -0x30(%rbp)
xorps %xmm0, %xmm0
leaq -0x1a0(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x111c0
leaq -0x140(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xd5aa
leaq -0xd8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
xorl %eax, %eax
movb %al, (%rcx)
movb %al, 0x10(%rcx)
leaq -0xb0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xd5aa
leaq 0x88b2(%rip), %rdi      # 0x1a228
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x11c74
movq %rbx, %rdi
callq 0xd544
leaq -0x48(%rbp), %r14
movq %r12, -0xb8(%rbp)
movq %r12, %rdi
leaq -0x140(%rbp), %rsi
callq 0x1182e
movb -0xc8(%rbp), %cl
testb %al, %al
je 0x11b36
testb $0x1, %cl
jne 0x11b36
leaq -0x1a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x1203c
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd5aa
movq %rbx, %rsi
xorl %eax, %eax
movb %al, -0x60(%rbp)
movq %r14, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb %al, -0x48(%rbp)
movb %al, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movaps -0x140(%rbp), %xmm0
movaps %xmm0, -0x150(%rbp)
movq -0x130(%rbp), %r15
movq -0x128(%rbp), %r8
movq -0x120(%rbp), %r13
movq -0x118(%rbp), %r14
movaps -0x110(%rbp), %xmm0
movq -0x100(%rbp), %rdx
movq -0xf8(%rbp), %rbx
movl $0xa, %ecx
leaq -0x140(%rbp), %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps -0x150(%rbp), %xmm1
movaps %xmm1, -0xb0(%rbp)
movq %r15, -0xa0(%rbp)
movq %r8, -0x98(%rbp)
movq %r13, -0x90(%rbp)
movq %r14, -0x88(%rbp)
movaps %xmm0, -0x80(%rbp)
movq %rdx, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
cmpq %rbx, %r14
jae 0x11ad8
movq %r8, -0xc0(%rbp)
movq %r14, %r12
movq 0x8(%r12), %rdi
addq $0x8, %r12
movl $0x200, %esi            # imm = 0x200
callq 0x31f0
cmpq %rbx, %r12
jb 0x11aaf
movb -0x60(%rbp), %al
movq -0xb8(%rbp), %r12
movq -0xc0(%rbp), %r8
movq %r15, -0x80(%rbp)
movq %r8, -0x78(%rbp)
movq %r13, -0x70(%rbp)
movq %r14, -0x68(%rbp)
movb %al, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3230
movq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x48(%rbp), %r14
cmpq %r14, %rdi
je 0x11b22
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31f0
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
callq 0xd544
jmp 0x11998
testb $0x1, %cl
jne 0x11b8f
movq 0x872e(%rip), %rax      # 0x1a270
movq %rax, %rcx
subq 0x8704(%rip), %rcx      # 0x1a250
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x86f9(%rip), %rax      # 0x1a258
subq 0x86fa(%rip), %rax      # 0x1a260
addq 0x86db(%rip), %rax      # 0x1a248
shlq $0x9, %rcx
addq %rcx, %rax
cmpq 0x86bd(%rip), %rax      # 0x1a238
jne 0x11b8f
leaq -0x1a0(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x11d46
jmp 0x11bf6
movq 0x8452(%rip), %rbx      # 0x19fe8
leaq 0x1e38(%rip), %rsi      # 0x139d5
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x8420(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movq -0x30(%rbp), %rdi
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %esi, %esi
callq 0x111c0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x11c18
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31f0
leaq -0x140(%rbp), %rdi
callq 0xd544
leaq -0x1a0(%rbp), %rdi
callq 0x11056
movq -0x30(%rbp), %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11c51
movq %rax, %rbx
jmp 0x11c60
jmp 0x11c51
jmp 0x11c51
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x10a8e
leaq -0x1a0(%rbp), %rdi
callq 0x11056
movq %rbx, %rdi
callq 0x3310