// File: /workspace/github_cpp_makefile_star2_O1/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, -0xb8(%rbp)
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 0x117a8
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 0xdb10
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 0xdb10
leaq 0x829e(%rip), %rdi      # 0x1a228
leaq -0xb0(%rbp), %r15
movq %r15, %rsi
callq 0x1227e
movq %r15, %rdi
callq 0xdab6
leaq -0x48(%rbp), %rbx
movq -0xb8(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x11e3c
movb -0xc8(%rbp), %cl
testb %al, %al
je 0x1213f
testb $0x1, %cl
jne 0x1213f
leaq -0x1a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x12646
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movq %r15, %rdi
xorl %esi, %esi
callq 0xdb10
xorl %eax, %eax
movb %al, -0x60(%rbp)
movq %rbx, -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), %rdx
movq -0x128(%rbp), %r13
movq -0x120(%rbp), %r12
movq -0x118(%rbp), %r14
movaps -0x110(%rbp), %xmm0
movq -0x100(%rbp), %rax
movq -0xf8(%rbp), %rbx
movl $0xa, %ecx
leaq -0x140(%rbp), %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movaps -0x150(%rbp), %xmm1
movaps %xmm1, -0xb0(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rdx, -0xa0(%rbp)
movq %r13, -0x98(%rbp)
movq %r12, -0x90(%rbp)
movq %r14, -0x88(%rbp)
movaps %xmm0, -0x80(%rbp)
movq %rax, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
cmpq %rbx, %r14
jae 0x120d7
movq %r14, %r15
movq 0x8(%r15), %rdi
addq $0x8, %r15
movl $0x200, %esi            # imm = 0x200
callq 0x31f0
cmpq %rbx, %r15
jb 0x120c0
movq -0xc0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq %r13, -0x78(%rbp)
movq %r12, -0x70(%rbp)
movq %r14, -0x68(%rbp)
movb -0x60(%rbp), %al
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), %rbx
cmpq %rbx, %rdi
je 0x1212b
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31f0
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
callq 0xdab6
jmp 0x11fa5
testb $0x1, %cl
jne 0x12198
movq 0x8125(%rip), %rax      # 0x1a270
movq %rax, %rcx
subq 0x80fb(%rip), %rcx      # 0x1a250
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x80f0(%rip), %rax      # 0x1a258
subq 0x80f1(%rip), %rax      # 0x1a260
addq 0x80d2(%rip), %rax      # 0x1a248
shlq $0x9, %rcx
addq %rcx, %rax
cmpq 0x80b4(%rip), %rax      # 0x1a238
jne 0x12198
leaq -0x1a0(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x12350
jmp 0x121ff
movq 0x7e49(%rip), %rbx      # 0x19fe8
leaq 0x182f(%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 0x7e17(%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 0x117a8
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x12221
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31f0
leaq -0x140(%rbp), %rdi
callq 0xdab6
leaq -0x1a0(%rbp), %rdi
callq 0x1164a
movq -0x30(%rbp), %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1225a
movq %rax, %rbx
jmp 0x12269
jmp 0x1225a
jmp 0x1225a
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x1107e
leaq -0x1a0(%rbp), %rdi
callq 0x1164a
movq %rbx, %rdi
callq 0x3310
nop