// File: /workspace/github_cpp_makefile_star2_O1/chuckwolber[P]Cube/order/cli.cpp
// Function: setFindOrders(char*)
void setFindOrders(char* orderList) {
    std::string temp = "";
    skipFoundOrders = true;
    numSkipFoundOrders = 0;

    bool foundDefault = true;
    if (orderList == NULL || strlen(orderList) == 0) {
        foundDefault = false;
        numSkipFoundOrders = ORDER_MAX;
    }
    for (int i = 0; i < ORDER_MAX; i++)
        foundOrders.push_back(foundDefault);

    unsigned int currOrder = 0;
    if (orderList == NULL)
        goto nolist;

    for (char c : std::string(orderList)) {
        temp += c;
        if (c == ',' && currOrder > 0 && currOrder < ORDER_MAX) {
            foundOrders[currOrder] = false;
            currOrder = 0;
            ++numSkipFoundOrders;
            findOrders += temp;
            temp = "";
        } else if (c == ',') {
            currOrder = 0;
            temp = "";
        } else if (c >= '0' && c <= '9') {
            currOrder = currOrder*10 + (unsigned int)(c - '0');
        } else {
            temp.pop_back();
        }
    }

    nolist:
    if (currOrder < ORDER_MAX) {
        foundOrders[currOrder] = false;
        ++numSkipFoundOrders;
        findOrders += temp;
    }

    if (findOrders.back() == ',')
        findOrders.pop_back();

    if (findOrders == "")
        findOrders = "1 - " + std::to_string(ORDER_MAX - 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4e27(%rip), %rdx      # 0xcab1
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x5ccc
movb $0x1, 0xa9d3(%rip)      # 0x12671
movq $0x0, 0xa9af(%rip) # 0x12658
testq %rbx, %rbx
je 0x7cb5
movb $0x1, %al
cmpb $0x0, (%rbx)
jne 0x7cc2
movq $0x4ed, 0xa998(%rip) # imm = 0x4ED
xorl %eax, %eax
movl $0x4ed, %r15d           # imm = 0x4ED
movzbl %al, %ebp
leaq 0xa94e(%rip), %r14      # 0x12620
movq %r14, %rdi
movl %ebp, %esi
callq 0x95b6
decl %r15d
jne 0x7cd2
testq %rbx, %rbx
je 0x7dd4
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbx, %rdi
callq 0x4110
leaq (%rax,%rbx), %rdx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x5ccc
movq 0x10(%rsp), %r13
testq %r13, %r13
je 0x7dd8
movq 0x8(%rsp), %rbp
xorl %r15d, %r15d
leaq 0x28(%rsp), %r14
xorl %ebx, %ebx
movb (%rbp,%r15), %r12b
movsbl %r12b, %esi
movq %r14, %rdi
callq 0x4270
cmpb $0x2c, %r12b
jne 0x7d85
leal -0x1(%rbx), %eax
cmpl $0x4eb, %eax            # imm = 0x4EB
ja 0x7d85
movq 0xa8cf(%rip), %rax      # 0x12620
movl %ebx, %edx
movq $-0x2, %rsi
movl %ebx, %ecx
rolq %cl, %rsi
shrl $0x6, %edx
andq %rsi, (%rax,%rdx,8)
incq 0xa8eb(%rip)            # 0x12658
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xa882(%rip), %rdi      # 0x12600
callq 0x40c0
jmp 0x7d8b
cmpb $0x2c, %r12b
jne 0x7db4
xorl %ebx, %ebx
movq 0x30(%rsp), %rdx
movq %r14, %rdi
xorl %esi, %esi
leaq 0x4d13(%rip), %rcx      # 0xcab1
xorl %r8d, %r8d
callq 0x4430
incq %r15
cmpq %r15, %r13
jne 0x7d29
jmp 0x7dda
addb $-0x30, %r12b
cmpb $0x9, %r12b
ja 0x7dca
leal (%rbx,%rbx,4), %eax
movzbl %r12b, %ecx
leal (%rcx,%rax,2), %ebx
jmp 0x7da6
movq %r14, %rdi
callq 0x4360
jmp 0x7da6
xorl %ebx, %ebx
jmp 0x7dfb
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7df6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
leaq 0x38(%rsp), %r12
cmpl $0x4ec, %ebx            # imm = 0x4EC
ja 0x7e3c
movq 0xa816(%rip), %rax      # 0x12620
movl %ebx, %edx
movq $-0x2, %rsi
movl %ebx, %ecx
rolq %cl, %rsi
shrl $0x6, %edx
andq %rsi, (%rax,%rdx,8)
incq 0xa832(%rip)            # 0x12658
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xa7c9(%rip), %rdi      # 0x12600
callq 0x40c0
movq 0xa7c5(%rip), %rax      # 0x12608
movq 0xa7b6(%rip), %rcx      # 0x12600
cmpb $0x2c, -0x1(%rcx,%rax)
jne 0x7e5d
leaq 0xa7a8(%rip), %rdi      # 0x12600
callq 0x4360
leaq 0xa79c(%rip), %rdi      # 0x12600
leaq 0x4c46(%rip), %rsi      # 0xcab1
callq 0x40b0
testl %eax, %eax
jne 0x7f4a
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x48(%rsp), %rdi
movl $0x4, %esi
movl $0x2d, %edx
callq 0x4350
leaq 0x48(%rsp), %rbx
movq (%rbx), %rdi
movl $0x4, %esi
movl $0x4ec, %edx            # imm = 0x4EC
callq 0x9720
leaq 0x4545(%rip), %rcx      # 0xc3f8
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4330
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7eec
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x7ef3
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa6ea(%rip), %rdi      # 0x12600
movq %rbx, %rsi
callq 0x4370
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7f33
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x7f4a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x7f61
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42f0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x7fae
movq 0x58(%rsp), %rsi
jmp 0x7fa1
jmp 0x7fab
jmp 0x7fab
jmp 0x7fab
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7fae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
jmp 0x7fae
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7fca
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x44c0