// File: /workspace/github_cpp_makefile_star2_O3/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::checkServerArguments(int, char**)
void MyHelper::checkServerArguments(int argc, char *argv[])
{
    if (argc < 3)
    {
        cout << "Usage: " << argv[0] << " <port> <directory>" << endl;
        exit(EXIT_FAILURE);
    }

    if (!stringIsInt(argv[1]) || stoi(argv[1]) < 1024 || stoi(argv[1]) > 65535)
    {
        cout << "Invalid port" << endl;
        exit(EXIT_FAILURE);
    }

    if (opendir(argv[2]) == NULL)
    {
        perror("directory error");
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
cmpl $0x2, %esi
jle 0x392f
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x402c
movq %r14, %rsi
callq 0x3a32
movb $0x1, %bpl
testb %al, %al
je 0x38f4
movq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x402c
movq 0x28(%rsp), %r15
callq 0x3040
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x3390
cmpq %r15, (%r12)
je 0x3983
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x398f
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x398f
testl %ecx, %ecx
jne 0x3839
movl %ebp, (%r14)
movb $0x1, %bpl
cmpl $0x400, %eax            # imm = 0x400
jl 0x38d9
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x402c
movq 0x8(%rsp), %r15
movl (%r14), %ebp
movl $0x0, (%r14)
leaq 0x68(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x3390
cmpq %r15, (%r12)
je 0x399b
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x39a7
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x39a7
testl %ecx, %ecx
jne 0x38b5
movl %ebp, (%r14)
cmpl $0x10000, %eax          # imm = 0x10000
setge %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3300
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38f4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3300
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x390f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3300
testb %bpl, %bpl
jne 0x3959
movq 0x10(%rbx), %rdi
callq 0x33f0
testq %rax, %rax
je 0x397e
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x76a2(%rip), %rdi      # 0xafd8
leaq 0x46c7(%rip), %rsi      # 0x8004
callq 0x32e0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x32e0
leaq 0x46b8(%rip), %rsi      # 0x800c
movq %rax, %rdi
jmp 0x3967
movq 0x7678(%rip), %rdi      # 0xafd8
leaq 0x46b9(%rip), %rsi      # 0x8020
callq 0x32e0
movq %rax, %rdi
callq 0x3190
movl $0x1, %edi
callq 0x3370
callq 0x3520
leaq 0x46d2(%rip), %rdi      # 0x805c
callq 0x31c0
leaq 0x46c6(%rip), %rdi      # 0x805c
callq 0x33b0
leaq 0x46ba(%rip), %rdi      # 0x805c
callq 0x31c0
leaq 0x46ae(%rip), %rdi      # 0x805c
callq 0x33b0
movq %rax, %rbx
jmp 0x39ef
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x39c4
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3300
jmp 0x39ef
jmp 0x3a0c
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x39ef
movl %ebp, (%r14)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a0f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3300
jmp 0x3a0f
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a2a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3300
movq %rbx, %rdi
callq 0x34a0