// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/ServerInfo.cpp
// Function: ServerInfo::setPort(char const*)
void ServerInfo::setPort(char const *p) 
{
    std::string cString = p;
    if (numberOfWords(p) != 1)
        throw std::runtime_error("Error : " + cString + " - put only one port to listen\n");
    
    cString = *wsTrim(cString);
    for (size_t i = 0; i < cString.size(); i++) 
		if (cString[i] < 48 || cString[i]  > 57)
			throw std::runtime_error("Error : " + cString + " - use only digit for listen\n");
    
    _port = atoi(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x518a
movq %r14, %rdi
callq 0x9ffe
cmpq $0x1, %rax
jne 0x5dba
leaq -0x60(%rbp), %rdi
callq 0xa0c9
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x4240
movq -0x58(%rbp), %rax
testq %rax, %rax
je 0x5ce8
movq -0x60(%rbp), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb $-0x3a, %sil
cmpb $-0xb, %sil
jbe 0x5d18
incq %rdx
cmpq %rdx, %rax
jne 0x5cd2
movq %r14, %rdi
callq 0x45e0
movl %eax, (%rbx)
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d0b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43e0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x41f0
movq %rax, %r14
leaq 0xf371(%rip), %rsi      # 0x1509d
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x6400
leaq 0xf38b(%rip), %rsi      # 0x150cb
leaq -0x80(%rbp), %rdi
callq 0x4760
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5d6b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x5d76
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax), %rdx
leaq -0x40(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %r15b
movq %r14, %rdi
callq 0x4620
xorl %r15d, %r15d
movq 0x17242(%rip), %rsi     # 0x1cfe8
movq 0x1720b(%rip), %rdx     # 0x1cfb8
movq %r14, %rdi
callq 0x46a0
jmp 0x5e57
movl $0x10, %edi
callq 0x41f0
movq %rax, %r14
leaq 0xf2cf(%rip), %rsi      # 0x1509d
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x6400
leaq 0xf323(%rip), %rsi      # 0x15105
leaq -0x80(%rbp), %rdi
callq 0x4760
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5e0d
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x5e18
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax), %rdx
leaq -0x40(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %r15b
movq %r14, %rdi
callq 0x4620
xorl %r15d, %r15d
movq 0x171a0(%rip), %rsi     # 0x1cfe8
movq 0x17169(%rip), %rdx     # 0x1cfb8
movq %r14, %rdi
callq 0x46a0
jmp 0x5e62
jmp 0x5e7c
jmp 0x5e9d
movq %rax, %rbx
jmp 0x5eb0
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5e82
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x5e82
movq %rax, %rbx
movb $0x1, %r15b
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ea3
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x5ea3
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x5eb0
movq %r14, %rdi
callq 0x42e0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ec9
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x46d0
nop