// File: /workspace/github_cpp_makefile_star2_O2/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 0x448f(%rip), %rsi      # 0xba11
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x58d2
movb $0x1, 0xb0c9(%rip)      # 0x12661
andq $0x0, 0xb0a8(%rip)      # 0x12648
testq %rbx, %rbx
je 0x75ac
movb $0x1, %al
cmpb $0x0, (%rbx)
jne 0x75b9
movq $0x4ed, 0xb091(%rip) # imm = 0x4ED
xorl %eax, %eax
movl $0x4ed, %r15d           # imm = 0x4ED
movzbl %al, %ebp
leaq 0xb047(%rip), %r14      # 0x12610
subl $0x1, %r15d
jb 0x75db
movq %r14, %rdi
movl %ebp, %esi
callq 0x8682
jmp 0x75c9
testq %rbx, %rbx
je 0x76b6
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rbx, %rsi
callq 0x58d2
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbp
xorl %r14d, %r14d
leaq 0x48(%rsp), %rbx
xorl %r15d, %r15d
cmpq %r14, %rbp
je 0x76a1
movb (%r13,%r14), %r12b
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x4250
cmpb $0x2c, %r12b
jne 0x7663
leal -0x1(%r15), %eax
cmpl $0x4eb, %eax            # imm = 0x4EB
ja 0x7663
movl %r15d, %esi
leaq 0xafd0(%rip), %rdi      # 0x12610
callq 0x86c0
notq %rdx
andq %rdx, (%rax)
incq 0xaff6(%rip)            # 0x12648
leaq 0xaf97(%rip), %rdi      # 0x125f0
movq %rbx, %rsi
callq 0x44e0
jmp 0x7669
cmpb $0x2c, %r12b
jne 0x7680
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x439b(%rip), %rsi      # 0xba11
callq 0x44c0
incq %r14
jmp 0x760b
addb $-0x30, %r12b
cmpb $0x9, %r12b
ja 0x7697
imull $0xa, %r15d, %eax
movzbl %r12b, %r15d
addl %eax, %r15d
jmp 0x767b
movq %rbx, %rdi
callq 0x4330
jmp 0x767b
leaq 0x8(%rsp), %rdi
callq 0x4508
cmpl $0x4ec, %r15d           # imm = 0x4EC
jbe 0x76b9
jmp 0x76e6
xorl %r15d, %r15d
movl %r15d, %esi
leaq 0xaf4d(%rip), %rdi      # 0x12610
callq 0x86c0
notq %rdx
andq %rdx, (%rax)
incq 0xaf73(%rip)            # 0x12648
leaq 0xaf14(%rip), %rdi      # 0x125f0
leaq 0x48(%rsp), %rsi
callq 0x44e0
movq 0xaf0b(%rip), %rax      # 0x125f8
movq 0xaefc(%rip), %rcx      # 0x125f0
cmpb $0x2c, -0x1(%rcx,%rax)
jne 0x7707
leaq 0xaeee(%rip), %rdi      # 0x125f0
callq 0x4330
leaq 0xaee2(%rip), %rdi      # 0x125f0
leaq 0x42fc(%rip), %rsi      # 0xba11
callq 0x8772
testb %al, %al
je 0x7769
leaq 0x28(%rsp), %rdi
movl $0x4ec, %esi            # imm = 0x4EC
callq 0x8719
leaq 0x3c24(%rip), %rsi      # 0xb358
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x877f
leaq 0xaea6(%rip), %rdi      # 0x125f0
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x4340
movq %rbx, %rdi
callq 0x4508
leaq 0x28(%rsp), %rdi
callq 0x4508
leaq 0x48(%rsp), %rdi
callq 0x4508
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x77a3
jmp 0x7796
jmp 0x7796
jmp 0x7796
jmp 0x7796
jmp 0x779b
movq %rax, %rbx
jmp 0x77a8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4508
leaq 0x48(%rsp), %rdi
callq 0x4508
movq %rbx, %rdi
callq 0x4490