// File: /workspace/github_cpp_makefile_star2_O3/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 0x5085(%rip), %rdx      # 0xcab1
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x5b3e
movb $0x1, 0xac31(%rip)      # 0x12671
movq $0x0, 0xac0d(%rip) # 0x12658
testq %rbx, %rbx
je 0x7a57
movb $0x1, %al
cmpb $0x0, (%rbx)
jne 0x7a64
movq $0x4ed, 0xabf6(%rip) # imm = 0x4ED
xorl %eax, %eax
movl $0x4ed, %r15d           # imm = 0x4ED
movzbl %al, %ebp
leaq 0xabac(%rip), %r14      # 0x12620
movq %r14, %rdi
movl %ebp, %esi
callq 0x9366
decl %r15d
jne 0x7a74
testq %rbx, %rbx
je 0x7b8d
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x4110
leaq (%rax,%rbx), %rdx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x5b3e
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
je 0x7b92
xorl %r12d, %r12d
leaq 0x28(%rsp), %r15
xorl %r14d, %r14d
movb (%rbx,%r12), %r13b
movsbl %r13b, %esi
movq %r15, %rdi
callq 0x4270
cmpb $0x2c, %r13b
jne 0x7b2a
leal -0x1(%r14), %eax
cmpl $0x4eb, %eax            # imm = 0x4EB
ja 0x7b2a
movq 0xab2c(%rip), %rax      # 0x12620
movl %r14d, %edx
movq $-0x2, %rsi
movl %r14d, %ecx
rolq %cl, %rsi
shrl $0x6, %edx
andq %rsi, (%rax,%rdx,8)
incq 0xab46(%rip)            # 0x12658
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xaadd(%rip), %rdi      # 0x12600
callq 0x40c0
jmp 0x7b30
cmpb $0x2c, %r13b
jne 0x7b5a
xorl %r14d, %r14d
movq 0x30(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x4f6d(%rip), %rcx      # 0xcab1
xorl %r8d, %r8d
callq 0x4430
incq %r12
cmpq %r12, %rbp
jne 0x7acc
jmp 0x7b7c
addb $-0x30, %r13b
cmpb $0x9, %r13b
ja 0x7b72
leal (%r14,%r14,4), %eax
movzbl %r13b, %ecx
leal (%rcx,%rax,2), %r14d
jmp 0x7b4c
movq %r15, %rdi
callq 0x4360
jmp 0x7b4c
movq 0x8(%rsp), %rbx
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r15
jmp 0x7b95
xorl %r14d, %r14d
jmp 0x7bb3
xorl %r14d, %r14d
cmpq %r15, %rbx
je 0x7baa
movq 0x18(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x42f0
cmpl $0x4ec, %r14d           # imm = 0x4EC
ja 0x7bee
movq 0xaa66(%rip), %rax      # 0x12620
movl %r14d, %edx
movq $-0x2, %rsi
movl %r14d, %ecx
rolq %cl, %rsi
shrl $0x6, %edx
andq %rsi, (%rax,%rdx,8)
incq 0xaa80(%rip)            # 0x12658
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xaa17(%rip), %rdi      # 0x12600
callq 0x40c0
movq 0xaa13(%rip), %rax      # 0x12608
movq 0xaa04(%rip), %rcx      # 0x12600
cmpb $0x2c, -0x1(%rcx,%rax)
jne 0x7c0f
leaq 0xa9f6(%rip), %rdi      # 0x12600
callq 0x4360
leaq 0xa9ea(%rip), %rdi      # 0x12600
leaq 0x4e94(%rip), %rsi      # 0xcab1
callq 0x40b0
testl %eax, %eax
jne 0x7cfc
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 0x94db
leaq 0x4793(%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 0x7c9e
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x7ca5
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 0xa938(%rip), %rdi      # 0x12600
movq %rbx, %rsi
callq 0x4370
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7ce5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x7cfc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x7d13
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 0x7d60
movq 0x58(%rsp), %rsi
jmp 0x7d53
jmp 0x7d5d
jmp 0x7d5d
jmp 0x7d5d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7d60
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
jmp 0x7d60
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7d7c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x44c0