// File: Manuel123cool[P]smiley/regex.cpp
// Function: MyRegex::testUserInput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Stack&)
void MyRegex::testUserInput(std::string code, Stack &stack)
{
    if (code.length() <= 0)
        return;  

    if (!MyRegex::testString(code, "B-) "))
        return;

    std::string identifier;
    bool start{ false };
    for(const auto &c : code)
    {
        if (start)
            identifier += c;
   
        if (c == ' ' && !start)
            start = true;
    }

    std::string inputValue;
    std::getline(std::cin, inputValue);
    stack().setVariable(identifier, inputValue, Variable::STRING);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x118(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x3330
cmpq $0x0, %rax
ja 0xb11a
jmp 0xb36a
movq -0x118(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x30e0
leaq -0x51(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x3390
movq -0x120(%rbp), %rdx
leaq 0xa074(%rip), %rsi      # 0x151bc
leaq -0x50(%rbp), %rdi
callq 0x8eb0
jmp 0xb153
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa430
movb %al, -0x121(%rbp)
jmp 0xb168
movb -0x121(%rbp), %al
xorb $-0x1, %al
movb %al, -0x122(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3160
leaq -0x51(%rbp), %rdi
callq 0x3270
leaq -0x30(%rbp), %rdi
callq 0x3160
movb -0x122(%rbp), %al
testb $0x1, %al
jne 0xb19d
jmp 0xb1dc
jmp 0xb36a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb1c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3160
leaq -0x51(%rbp), %rdi
callq 0x3270
leaq -0x30(%rbp), %rdi
callq 0x3160
jmp 0xb3cb
leaq -0x88(%rbp), %rdi
callq 0x3300
movq -0x118(%rbp), %rax
movb $0x0, -0x89(%rbp)
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x31e0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x3130
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x9180
testb $0x1, %al
jne 0xb23c
jmp 0xb2b5
leaq -0xa0(%rbp), %rdi
callq 0x91c0
movq %rax, -0xb0(%rbp)
testb $0x1, -0x89(%rbp)
je 0xb283
movq -0xb0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x88(%rbp), %rdi
callq 0x3170
jmp 0xb270
jmp 0xb283
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb3bf
movq -0xb0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xb2a2
testb $0x1, -0x89(%rbp)
jne 0xb2a2
movb $0x1, -0x89(%rbp)
jmp 0xb2a4
leaq -0xa0(%rbp), %rdi
callq 0x91e0
jmp 0xb223
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3300
movq -0x130(%rbp), %rsi
movq 0x11d02(%rip), %rdi     # 0x1cfd8
callq 0x3060
jmp 0xb2dd
movq -0x10(%rbp), %rdi
callq 0xdf30
movq %rax, -0x138(%rbp)
jmp 0xb2ef
leaq -0xf0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x30e0
jmp 0xb304
leaq -0x110(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x30e0
jmp 0xb319
movq -0x138(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
movl $0x1, %ecx
callq 0x50b0
jmp 0xb33a
leaq -0x110(%rbp), %rdi
callq 0x3160
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xd0(%rbp), %rdi
callq 0x3160
leaq -0x88(%rbp), %rdi
callq 0x3160
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb3b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb3a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3160
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xd0(%rbp), %rdi
callq 0x3160
leaq -0x88(%rbp), %rdi
callq 0x3160
movq -0x60(%rbp), %rdi
callq 0x3380
nopw %cs:(%rax,%rax)