// File: mbourand[P]webserv/srcs/Socket/ServerSocket.cpp
// Function: ServerSocket::ServerSocket(ServerSocket const&)
ServerSocket::ServerSocket(const ServerSocket &src) : m_port(src.m_port)
{
	if (!Socket::Create(true))
		throw ServerSocketException("Counldn't create socket.");
	if (!Socket::Bind(this->m_port))
		throw ServerSocketException("Counldn't bind to port.");
	if (!Socket::Listen())
		throw ServerSocketException("Counldn't listen to socket.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x1c2e0
movq -0xa0(%rbp), %rdi
leaq 0x730cf(%rip), %rax     # 0x8eb00
movq %rax, (%rdi)
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, 0x3c(%rdi)
addq $0x40, %rdi
movq %rdi, -0xa8(%rbp)
callq 0x98c0
movq -0xa0(%rbp), %rdi
movl $0x1, %esi
callq 0x1c4d0
movb %al, -0x93(%rbp)
jmp 0x1ba67
movb -0x93(%rbp), %al
testb $0x1, %al
jne 0x1bb40
jmp 0x1ba77
movb $0x1, -0x42(%rbp)
movl $0x28, %edi
callq 0x9340
movq %rax, -0xb8(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x9b10
movq -0xb0(%rbp), %rdx
leaq 0x4ee70(%rip), %rsi     # 0x6a91a
leaq -0x40(%rbp), %rdi
callq 0xa780
jmp 0x1bab5
movq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1c1e0
jmp 0x1bac7
movq -0xb8(%rbp), %rdi
movb $0x0, -0x42(%rbp)
leaq 0x7304f(%rip), %rsi     # 0x8eb28
leaq 0x770(%rip), %rdx       # 0x1c250
callq 0x9aa0
jmp 0x1bd37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1bd16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1bb1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9c98
leaq -0x41(%rbp), %rdi
callq 0x9700
testb $0x1, -0x42(%rbp)
jne 0x1bb2f
jmp 0x1bb3b
movq -0xb8(%rbp), %rdi
callq 0x94c0
jmp 0x1bd16
movq -0xa0(%rbp), %rdi
movl 0x3c(%rdi), %esi
callq 0x1c580
movb %al, -0xb9(%rbp)
jmp 0x1bb57
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x1bc1f
jmp 0x1bb67
movb $0x1, -0x6a(%rbp)
movl $0x28, %edi
callq 0x9340
movq %rax, -0xd0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x9b10
movq -0xc8(%rbp), %rdx
leaq 0x4ed99(%rip), %rsi     # 0x6a933
leaq -0x68(%rbp), %rdi
callq 0xa780
jmp 0x1bba5
movq -0xd0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1c1e0
jmp 0x1bbb7
movq -0xd0(%rbp), %rdi
movb $0x0, -0x6a(%rbp)
leaq 0x72f5f(%rip), %rsi     # 0x8eb28
leaq 0x680(%rip), %rdx       # 0x1c250
callq 0x9aa0
jmp 0x1bd37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1bbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x9c98
leaq -0x69(%rbp), %rdi
callq 0x9700
testb $0x1, -0x6a(%rbp)
jne 0x1bc0e
jmp 0x1bc1a
movq -0xd0(%rbp), %rdi
callq 0x94c0
jmp 0x1bd16
movq -0xa0(%rbp), %rdi
callq 0x1caf0
movb %al, -0xd1(%rbp)
jmp 0x1bc33
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x1bd0d
jmp 0x1bc43
movb $0x1, -0x92(%rbp)
movl $0x28, %edi
callq 0x9340
movq %rax, -0xe8(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x9b10
movq -0xe0(%rbp), %rdx
leaq 0x4eccf(%rip), %rsi     # 0x6a94b
leaq -0x90(%rbp), %rdi
callq 0xa780
jmp 0x1bc8a
movq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1c1e0
jmp 0x1bc9f
movq -0xe8(%rbp), %rdi
movb $0x0, -0x92(%rbp)
leaq 0x72e74(%rip), %rsi     # 0x8eb28
leaq 0x595(%rip), %rdx       # 0x1c250
callq 0x9aa0
jmp 0x1bd37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1bce8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9c98
leaq -0x91(%rbp), %rdi
callq 0x9700
testb $0x1, -0x92(%rbp)
jne 0x1bcff
jmp 0x1bd0b
movq -0xe8(%rbp), %rdi
callq 0x94c0
jmp 0x1bd16
addq $0xf0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x9c98
movq -0xa0(%rbp), %rdi
callq 0x1c3b0
movq -0x18(%rbp), %rdi
callq 0x9af0
nopw (%rax,%rax)