// File: /workspace/github_cpp_makefile_star2_O1/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::newConnection(int)
void Server::newConnection(int fd) {
  struct sockaddr_storage their_addr;
  socklen_t addr_size = sizeof(their_addr);

  FD_CLR(fd, &read_fds_);

  int clientFd = accept(fd, (struct sockaddr *)&their_addr, &addr_size);

  if (clientFd == -1)
    return ;

  Log.print(INFO, head_ + "new connection on " + ft::to_string(running_server_[fd].ip_) + ":" + ft::to_string(running_server_[fd].port_), GREEN);

  fcntl(clientFd, F_SETFL, O_NONBLOCK);

  std::string client_addr = ft::inet_ntop(ft::get_in_addr((struct sockaddr *)&their_addr));
  clients_[clientFd] = new Client(clientFd, client_addr, running_server_[fd], worker_id_, clients_.size() >= MAX_CLIENT);

  add_to_fd_set(clientFd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %esi, %ecx
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
leaq 0xd4(%rsp), %rdx
movl $0x80, (%rdx)
movq $-0x2, %rax
rolq %cl, %rax
leal 0x3f(%rcx), %esi
testl %ecx, %ecx
cmovnsl %ecx, %esi
sarl $0x6, %esi
movslq %esi, %rsi
andq %rax, 0xf8(%rdi,%rsi,8)
leaq 0x118(%rsp), %rsi
movl %ecx, %edi
callq 0x4110
movl %eax, 0x8(%rsp)
cmpl $-0x1, %eax
je 0x1974b
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x6bac
leaq 0xc6d0(%rip), %rsi      # 0x25a15
movq %r14, %rdi
callq 0x4830
leaq 0x18(%rbx), %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1ab00
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0x6bac
leaq 0xb0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x1ab64
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x193bf
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x193e4
leaq 0xc0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x193df
movq 0xc0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x193f8
movq 0xb0(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x4100
jmp 0x19409
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c0
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1942d
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x19433
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xbfcb(%rip), %rsi      # 0x25422
leaq 0x30(%rsp), %rdi
callq 0x4830
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19488
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x19490
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1ab00
movl 0x20(%rax), %esi
leaq 0x90(%rsp), %rdi
callq 0x105d9
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x194ea
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1950f
leaq 0xa0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1950a
movq 0xa0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x19523
movq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4100
jmp 0x19534
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c0
leaq 0x60(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x19558
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1955e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xe8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xc481(%rip), %rsi      # 0x25a0f
leaq 0xc47f(%rip), %rdx      # 0x25a14
leaq 0xd8(%rsp), %rdi
callq 0x578e
leaq 0x18f2f(%rip), %rdi     # 0x324d8
leaq 0x50(%rsp), %rdx
leaq 0xd8(%rsp), %rcx
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x20fae
movq 0xd8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x195e0
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x195fb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1961c
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x19633
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1964e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1966f
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1968c
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x196a6
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4460
movl 0x8(%rsp), %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x4260
leaq 0x118(%rsp), %rdi
callq 0x24aab
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x2485b
movl $0x50, %edi
callq 0x4430
movq %rax, %r15
movl 0x8(%rsp), %ebp
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1ab00
movl (%rbx), %r8d
xorl %r9d, %r9d
cmpq $0x3e8, 0x70(%rbx)      # imm = 0x3E8
setae %r9b
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movl %ebp, %esi
movq %rax, %rcx
callq 0x107f8
leaq 0x48(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ac40
movq %r15, (%rax)
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x1923e
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x1974b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x19782
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x19782
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x197a2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x197a2
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x197f1
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x197f1
movq %rax, %rbx
jmp 0x19808
movq %rax, %rbx
jmp 0x19823
movq %rax, %rbx
jmp 0x19844
jmp 0x19863
movq %rax, %rbx
movl $0x50, %esi
movq %r15, %rdi
callq 0x4460
jmp 0x1987d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x19808
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19823
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19844
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x19866
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x19866
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x19894
movq 0x80(%rsp), %rsi
jmp 0x1988c
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x19894
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
movq %rbx, %rdi
callq 0x4780