// File: /workspace/github_cpp_makefile_star2_O3/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 -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x518a
movq %r14, %rdi
callq 0xa075
cmpq $0x1, %rax
jne 0x5dbf
leaq -0x80(%rbp), %rdi
callq 0xa150
leaq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x4240
movq -0x80(%rbp), %r15
movq -0x78(%rbp), %rax
testq %rax, %rax
je 0x5cee
xorl %ecx, %ecx
movb (%r15,%rcx), %dl
addb $-0x3a, %dl
cmpb $-0xb, %dl
jbe 0x5d1d
incq %rcx
cmpq %rcx, %rax
jne 0x5cda
movq %r14, %rdi
callq 0x45e0
movl %eax, (%rbx)
leaq -0x70(%rbp), %rax
cmpq %rax, %r15
je 0x5d10
movq -0x70(%rbp), %rsi
incq %rsi
movq %r15, %rdi
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 0xf36c(%rip), %rsi      # 0x1509d
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x643f
leaq 0xf386(%rip), %rsi      # 0x150cb
leaq -0x60(%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 0x5d70
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x5d7b
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 0x1723d(%rip), %rsi     # 0x1cfe8
movq 0x17206(%rip), %rdx     # 0x1cfb8
movq %r14, %rdi
callq 0x46a0
jmp 0x5e5c
movl $0x10, %edi
callq 0x41f0
movq %rax, %r14
leaq 0xf2ca(%rip), %rsi      # 0x1509d
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x643f
leaq 0xf31e(%rip), %rsi      # 0x15105
leaq -0x60(%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 0x5e12
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x5e1d
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 0x1719b(%rip), %rsi     # 0x1cfe8
movq 0x17164(%rip), %rdx     # 0x1cfb8
movq %r14, %rdi
callq 0x46a0
jmp 0x5e67
jmp 0x5e9f
jmp 0x5ebd
movq %rax, %rbx
jmp 0x5ec8
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5e7f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43e0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e98
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43e0
testb %r15b, %r15b
jne 0x5ec0
jmp 0x5ec8
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ec0
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x5ec0
movq %rax, %rbx
movq %r14, %rdi
callq 0x42e0
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ee1
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x46d0
nop