LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.c
// Function: dit2fft
void dit2fft(const double *input, double *output, unsigned size, int inverse) {
    unsigned *offset = gen2fftorder(size >> 1),
        stride = 1, i;

    while (size > 2) {
        stride <<= 1;
        size >>= 1;
    }

    for (i = 0; i < stride; i++) {
        radix2fft(&input[offset[i] << 1], &output[(i * 2) << 1], stride);
    }

    free(offset);

    while (stride > 1) {
        stride >>= 1;
        size <<= 1;
        for (i = 0; i < stride; i++) {
            sum2fft(&output[(i * size) << 1], &output[(i * size) << 1], size >> 1, inverse);
        }
    }

    if (inverse) {
        for (i = 0; i < size; i++) {
            output[i << 1] /= (double)size;
            output[(i << 1) + 1] /= (double)size;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl %edx, %edi
shrl %edi
callq 0x1307
movq %rax, 0x8(%rsp)
pushq $0x1
popq %r15
cmpl $0x2, %r14d
jbe 0x13ae
addl %r15d, %r15d
shrl %r14d
jmp 0x13a0
movl %r15d, %r12d
shlq $0x2, %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x13e9
movq 0x8(%rsp), %rax
movl (%rax,%r13), %eax
addl %eax, %eax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rdi
movl %r13d, %eax
andl $-0x4, %eax
leaq (%rbx,%rax,8), %rsi
movl %r15d, %edx
callq 0x119c
addq $0x4, %r13
jmp 0x13b8
movq 0x8(%rsp), %rdi
callq 0x1030
cmpl $0x2, %r15d
jb 0x1449
shrl %r15d
leal (,%r14,4), %r13d
movq %r14, 0x8(%rsp)
movl %r14d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq %r15, 0x10(%rsp)
subq $0x1, %r15
jb 0x143a
movl %r14d, %eax
leaq (%rbx,%rax,8), %rdi
movq %rdi, %rsi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x11da
addl %r13d, %r14d
jmp 0x141b
movq 0x8(%rsp), %r14
addl %r14d, %r14d
movq 0x10(%rsp), %r15
jmp 0x13f3
testl %ebp, %ebp
je 0x147c
movl %r14d, %eax
cvtsi2sd %rax, %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
addq %rax, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x147c
movl %ecx, %edx
andl $-0x2, %edx
movupd (%rbx,%rdx,8), %xmm1
divpd %xmm0, %xmm1
movupd %xmm1, (%rbx,%rdx,8)
addq $0x2, %rcx
jmp 0x145e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.c
// Function: computeNormalized
void computeNormalized(const double *f, const double *g, double *r) {
    double a1 = (f[1] != 0.0) ? ((f[0] != 0.0) ? atan(f[1] / f[0]) : copysign(M_PI, f[1]) / 2.0) : 0.0;
    if (f[0] < 0.0) {
        a1 = copysign(M_PI, f[1]) + a1;
    }

    double a2 = (g[1] != 0.0) ? ((g[0] != 0.0) ? atan(g[1] / g[0]) : copysign(M_PI, g[1]) / 2.0) : 0.0;
    if (g[0] < 0.0) {
        a2 = copysign(M_PI, g[1]) + a2;
    }

    r[0] = cos(a1 - a2);
    r[1] = sin(a1 - a2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd 0x8(%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
xorpd %xmm3, %xmm3
jne 0x1691
jnp 0x16b3
movsd (%r15), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x16a2
jnp 0x16d6
divsd %xmm1, %xmm0
callq 0x1040
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm3
ucomisd (%r15), %xmm1
jbe 0x16f2
movsd 0x8(%r15), %xmm0
andpd 0x958(%rip), %xmm0      # 0x2020
orpd 0x960(%rip), %xmm0      # 0x2030
addsd %xmm0, %xmm3
jmp 0x16f2
andpd 0x942(%rip), %xmm0      # 0x2020
orpd 0x94a(%rip), %xmm0      # 0x2030
mulsd 0x952(%rip), %xmm0      # 0x2040
movapd %xmm0, %xmm3
movsd 0x8(%r14), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
xorpd %xmm0, %xmm0
jne 0x1708
jnp 0x1732
movsd (%r14), %xmm0
ucomisd %xmm2, %xmm0
jne 0x1715
jnp 0x1755
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x1040
xorpd %xmm2, %xmm2
movsd 0x8(%rsp), %xmm3
ucomisd (%r14), %xmm2
jbe 0x1771
movsd 0x8(%r14), %xmm1
andpd 0x8d9(%rip), %xmm1      # 0x2020
orpd 0x8e1(%rip), %xmm1      # 0x2030
addsd %xmm1, %xmm0
jmp 0x1771
andpd 0x8c3(%rip), %xmm1      # 0x2020
orpd 0x8cb(%rip), %xmm1      # 0x2030
mulsd 0x8d3(%rip), %xmm1      # 0x2040
movapd %xmm1, %xmm0
subsd %xmm0, %xmm3
movsd %xmm3, 0x8(%rsp)
movapd %xmm3, %xmm0
callq 0x1070
movsd %xmm0, (%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x1090
movsd %xmm0, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.c
// Function: main
int main()
{
    unsigned char image1[256 * 128];
    unsigned char image2[256 * 128];

    unsigned i, j;
    int deltax, deltay;

    // Generate pair of images
    for (j = 0; j < 128; j++)
        for (i = 0; i < 256; i++) {
            unsigned offset = i + j * 256;
            if ((i >= 16) && (i < 76) && (j >= 32) && (j < 92))
                image1[offset] = 128;
            else
                image1[offset] = 0;

            if ((i >= 8) && (i < 68) && (j >= 40) && (j < 100))
                image2[offset] = 16;
            else
                image2[offset] = 255;
        }

    computeShift(image1, image2, 256, 128, &deltax, &deltay);

    printf("Calculated shift: [%d, %d]\n", deltax, deltay);

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10010, %rsp          # imm = 0x10010
leaq 0x10(%rsp), %rax
leaq 0x8010(%rsp), %rcx
xorl %edx, %edx
pushq $-0x8
popq %rsi
movl $0x100, %edi            # imm = 0x100
cmpq $0x80, %rdx
je 0x1a71
leal -0x20(%rdx), %r8d
leal -0x28(%rdx), %r9d
movl %esi, %r10d
xorl %r11d, %r11d
cmpq $0x100, %r11            # imm = 0x100
je 0x1a66
cmpl $0x3c, %r9d
setae %bl
cmpl $0x3c, %r8d
setb %bpl
leal -0x8(%r10), %r14d
cmpl $0x3c, %r14d
setb %r14b
andb %bpl, %r14b
shlb $0x7, %r14b
movb %r14b, (%rcx,%r11)
cmpl $0x3c, %r10d
setae %bpl
orb %bl, %bpl
negb %bpl
orb $0x10, %bpl
movb %bpl, (%rax,%r11)
incq %r11
incl %r10d
jmp 0x1a19
incq %rdx
addq %rdi, %rax
addq %rdi, %rcx
jmp 0x1a02
leaq 0x8010(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movl $0x80, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x17a2
movl (%rbx), %esi
movl (%r14), %edx
leaq 0x59f(%rip), %rdi       # 0x2048
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x10010, %rsp          # imm = 0x10010
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk/exprtk_simple_example_01.cpp
// Function: void trig_function<double>()
void trig_function()
{
   typedef exprtk::symbol_table<T> symbol_table_t;
   typedef exprtk::expression<T>   expression_t;
   typedef exprtk::parser<T>       parser_t;

   const std::string expression_string =
      "clamp(-1.0, sin(2 * pi * x) + cos(x / 2 * pi), +1.0)";

   T x;

   symbol_table_t symbol_table;
   symbol_table.add_variable("x",x);
   symbol_table.add_constants();

   expression_t expression;
   expression.register_symbol_table(symbol_table);

   parser_t parser;
   parser.compile(expression_string,expression);

   for (x = T(-5); x <= T(+5); x += T(0.001))
   {
      const T y = expression.value();
      printf("%19.15f\t%19.15f\n", x, y);
   }
}

// Assembly:
pushq %rbx
subq $0xad0, %rsp            # imm = 0xAD0
leaq 0x129e0f(%rip), %rsi    # 0x23a111
leaq 0x38(%rsp), %rdi
leaq 0x1a8(%rsp), %rdx
callq 0x1102b8
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x11055c
leaq 0x129d41(%rip), %rsi    # 0x23a069
leaq 0x1a8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x1102b8
leaq 0x8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x110580
leaq 0x1a8(%rsp), %rdi
callq 0x10e5b8
leaq 0x8(%rsp), %rdi
callq 0x1105ec
leaq 0x18(%rsp), %rdi
callq 0x110612
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x110672
leaq 0x58(%rsp), %rdi
pushq $0x7f
popq %rsi
callq 0x1106ce
leaq 0x1a8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1107de
leaq 0x58(%rsp), %rdi
callq 0x110df6
leaq 0x1a8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x110e3e
movsd 0x124c3d(%rip), %xmm0   # 0x235008
leaq 0x129d74(%rip), %rbx    # 0x23a146
movsd %xmm0, 0x10(%rsp)
movsd 0x124c30(%rip), %xmm1   # 0x235010
ucomisd %xmm0, %xmm1
jb 0x110419
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
movb $0x2, %al
callq 0x10e060
movsd 0x10(%rsp), %xmm0
addsd 0x124c01(%rip), %xmm0   # 0x235018
jmp 0x1103d2
leaq 0x1a8(%rsp), %rdi
callq 0x1112c0
leaq 0x18(%rsp), %rdi
callq 0x1113fa
leaq 0x8(%rsp), %rdi
callq 0x111410
leaq 0x38(%rsp), %rdi
callq 0x10e5b8
addq $0xad0, %rsp            # imm = 0xAD0
popq %rbx
retq
jmp 0x110485
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x110df6
jmp 0x110495
jmp 0x110460
movq %rax, %rbx
jmp 0x110495
jmp 0x11047b
jmp 0x11047b
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x10e5b8
jmp 0x11049f
movq %rax, %rbx
jmp 0x11049f
movq %rax, %rbx
jmp 0x1104a9
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x1112c0
leaq 0x18(%rsp), %rdi
callq 0x1113fa
leaq 0x8(%rsp), %rdi
callq 0x111410
leaq 0x38(%rsp), %rdi
callq 0x10e5b8
movq %rbx, %rdi
callq 0x10e310
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/communication.cpp
// Function: socket_io::operator<<(socket_io::socket_view&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto operator<<(socket_view& dst, std::string const& to_send) -> socket_view&
{
    // Prepare data to send
    std::string::size_type const length = to_send.length();
    if (length > std::numeric_limits<uint32_t>::max())
	throw std::invalid_argument{"Input message is too long"};
    uint32_t with_byte_order = htonl(static_cast<uint32_t>(length));
    
    char buffer[length + 1];
    if (snprintf(buffer, length + 1, "%s", to_send.c_str()) < 0)
	throw std::invalid_argument{"Input message is wrong: " +
		                    get_errno_as_string()};
    
    // Send the data
    send(dst.get_native_handle(), static_cast<void*>(&with_byte_order),
	 sizeof(uint32_t));
    send(dst.get_native_handle(), static_cast<void*>(&buffer), length);

    return dst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq 0x8(%rsi), %r14
movq %r14, %rax
shrq $0x20, %rax
jne 0xc044
movq %rdi, %rbx
movq %rsp, %r12
movl %r14d, %eax
bswapl %eax
movl %eax, -0x24(%rbp)
leaq 0x1(%r14), %rax
movq %rsp, %r15
leaq 0x10(%r14), %rcx
andq $-0x10, %rcx
subq %rcx, %r15
movq %r15, %rsp
movq (%rsi), %rcx
leaq 0x4025(%rip), %rdx      # 0x1001a
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xbb60
testl %eax, %eax
js 0xc074
movq %rbx, %rdi
callq 0xb5e0
leaq -0x24(%rbp), %rsi
pushq $0x4
popq %rdx
movl %eax, %edi
callq 0xc0fd
movq %rbx, %rdi
callq 0xb5e0
movl %eax, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0xc0fd
movq %r12, %rsp
movq %rbx, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x3faa(%rip), %rsi      # 0x10000
movq %rax, %rdi
callq 0xbde0
movq 0x8f53(%rip), %rsi      # 0x14fb8
movq 0x8f2c(%rip), %rdx      # 0x14f98
movq %rbx, %rdi
callq 0xbc50
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0xb460
leaq 0x3f8e(%rip), %rsi      # 0x1001d
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xbc20
movb $0x1, %r15b
leaq -0x68(%rbp), %rsi
movq %rbx, %rdi
callq 0xbc70
xorl %r15d, %r15d
movq 0x8f03(%rip), %rsi      # 0x14fb8
movq 0x8edc(%rip), %rdx      # 0x14f98
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0xb250
jmp 0xc0d8
movq %rax, %r14
movb $0x1, %r15b
leaq -0x48(%rbp), %rdi
callq 0xb250
testb %r15b, %r15b
jne 0xc0ed
jmp 0xc0f5
jmp 0xc0ea
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/communication.cpp
// Function: socket_io::send(int, void const*, unsigned long)
static inline auto send(int sockfd, void const* buf, size_t len) -> void
{
    int error_code = ::send(sockfd, buf, len, MSG_NOSIGNAL);
    if (error_code == -1 && errno == EPIPE)
	throw std::system_error{std::make_error_code(std::errc::broken_pipe)};
    else if (error_code == -1)    
	throw std::runtime_error{"An error occured while sending the data: " +
		                 get_errno_as_string()};
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl $0x4000, %ecx           # imm = 0x4000
callq 0xb2b0
cmpl $-0x1, %eax
je 0xc11d
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0xb050
cmpl $0x20, (%rax)
jne 0xc15b
pushq $0x20
popq %rdi
callq 0xb2a0
movq %rax, %rbx
callq 0xb2c0
pushq $0x20
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xb400
movq 0x8dd4(%rip), %rsi      # 0x14f20
movq 0x8ded(%rip), %rdx      # 0x14f40
movq %rbx, %rdi
callq 0xbc50
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb460
leaq 0x3ec1(%rip), %rsi      # 0x10036
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xbc20
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xbb90
xorl %ebp, %ebp
movq 0x8e55(%rip), %rsi      # 0x14ff0
movq 0x8d96(%rip), %rdx      # 0x14f38
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xb250
jmp 0xc1bf
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0xb250
testb %bpl, %bpl
jne 0xc1d3
jmp 0xc1db
jmp 0xc1d0
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/communication.cpp
// Function: socket_io::operator>>(socket_io::socket_view&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
auto operator>>(socket_view& src, std::string& buffer) -> socket_view&
{
    uint32_t with_byte_order;
    recv(src.get_native_handle(), static_cast<void*>(&with_byte_order),
	 sizeof(uint32_t));

    // No error should occur as the data length sent was of size_type
    std::string::size_type const length = ntohl(with_byte_order);

    char buf[length + 1];
    recv(src.get_native_handle(), static_cast<void*>(&buf), length);
    buf[length] = '\0';

    buffer = std::string{buf};
    return src;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xb5e0
leaq -0x30(%rbp), %r15
pushq $0x4
popq %rdx
movl %eax, %edi
movq %r15, %rsi
callq 0xc284
movq %rsp, %r13
movl (%r15), %r15d
bswapl %r15d
movq %rsp, %r12
leaq 0x10(%r15), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %rbx, %rdi
callq 0xb5e0
movl %eax, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0xc284
movb $0x0, (%r15,%r12)
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xbc30
movq %r14, %rdi
movq %r15, %rsi
callq 0xb830
movq %r15, %rdi
callq 0xb250
movq %r13, %rsp
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/communication.cpp
// Function: socket_io::recv(int, void*, unsigned long)
static inline auto recv(int sockfd, void* buf, size_t len) -> int
{
    ssize_t error_code = ::recv(sockfd, buf, len, 0);
    if (error_code == 0)
	throw std::system_error{std::make_error_code(std::errc::broken_pipe)};
    if (error_code == -1)
	throw std::runtime_error{"An error occured while reading the data: " +
		                 get_errno_as_string()};
    return error_code;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
xorl %ecx, %ecx
callq 0xb1c0
cmpq $-0x1, %rax
je 0xc2a7
testq %rax, %rax
je 0xc2f6
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb460
leaq 0x3d9f(%rip), %rsi      # 0x10060
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xbc20
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xbb90
xorl %ebp, %ebp
movq 0x8d09(%rip), %rsi      # 0x14ff0
movq 0x8c4a(%rip), %rdx      # 0x14f38
movq %rbx, %rdi
callq 0xbc50
pushq $0x20
popq %rdi
callq 0xb2a0
movq %rax, %rbx
callq 0xb2c0
pushq $0x20
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xb400
movq 0x8c05(%rip), %rsi      # 0x14f20
movq 0x8c1e(%rip), %rdx      # 0x14f40
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xb250
jmp 0xc33f
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0xb250
testb %bpl, %bpl
jne 0xc353
jmp 0xc35b
jmp 0xc350
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/connection.cpp
// Function: socket_io::bind(socket_io::socket const&, boost::variant<socket_io::socket_address<sockaddr_in>, socket_io::socket_address<sockaddr_in6>> const&)
auto bind(socket const& unbound, ip_socket_address const& to_bind) -> void
{
    bool is_ipv4 = to_bind.type() == typeid(ipv4_socket_address);
    auto ip_version = unbound.get_ip_protocol();

    if ((is_ipv4 && ip_version == ip_protocol::IPv6) ||
	(!is_ipv4 && ip_version == ip_protocol::IPv4))
	throw std::logic_error{"Socket and address have different protocols"};
    
    if (is_ipv4)
    {
	auto tmp_to_bind = boost::get<ipv4_socket_address>(to_bind);	
	sockaddr_in addr_in = tmp_to_bind.get_native_handle();
	socket_io::bind_wrapper(unbound, reinterpret_cast<sockaddr*>(&addr_in),
				sizeof(sockaddr_in));
	
    }
    else
    {
	auto tmp_to_bind = boost::get<ipv6_socket_address>(to_bind);	
	sockaddr_in6 addr_in6 = tmp_to_bind.get_native_handle();
	socket_io::bind_wrapper(unbound, reinterpret_cast<sockaddr*>(&addr_in6),
				sizeof(sockaddr_in6));
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb030
movq 0x8ac0(%rip), %rsi      # 0x14fd8
movq %rax, %rdi
callq 0xb3e0
movzbl %al, %ecx
leal 0x2(,%rcx,8), %ecx
cmpl %ecx, 0x4(%rbx)
je 0xc571
movq %r14, %rdi
testb %al, %al
je 0xc548
callq 0xb370
movups (%rax), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
pushq $0x10
jmp 0xc560
callq 0xb4d0
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
movq %rsp, %rsi
movups %xmm1, 0xc(%rsi)
movaps %xmm0, (%rsi)
pushq $0x1c
popq %rdx
movq %rbx, %rdi
callq 0xc5b4
addq $0x28, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x3c4d(%rip), %rsi      # 0x101d0
movq %rax, %rdi
callq 0xba30
movq 0x8a1e(%rip), %rsi      # 0x14fb0
movq 0x89bf(%rip), %rdx      # 0x14f58
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/connection.cpp
// Function: socket_io::accept(socket_io::socket const&)
auto accept(socket const& server) -> socket
{
    int sockfd = ::accept(server.get_native_handle(), nullptr, nullptr);
    if (sockfd == -1)
	throw std::runtime_error{"An error occured while accepting a client: " +
				 get_errno_as_string()};
    return socket{sockfd, server.get_ip_protocol()};
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb1b0
cmpl $-0x1, %eax
je 0xc694
movl 0x4(%r14), %ecx
movq %rsp, %rdx
movl %ecx, (%rdx)
movq %rbx, %rdi
movl %eax, %esi
callq 0xb7d0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb460
leaq 0x3b4c(%rip), %rsi      # 0x101fc
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xbc20
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xbb90
xorl %ebp, %ebp
movq 0x891c(%rip), %rsi      # 0x14ff0
movq 0x885d(%rip), %rdx      # 0x14f38
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
movq %rsp, %rdi
callq 0xb250
jmp 0xc6f6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0xb250
testb %bpl, %bpl
jne 0xc70a
jmp 0xc712
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/connection.cpp
// Function: socket_io::is_socket_handle(int, socket_io::ip_protocol const&)
auto is_socket_handle(int const handle, ip_protocol const& ip_version) noexcept
    -> bool
{
    sockaddr addr;
    socklen_t addrlen = sizeof(sockaddr);

    if (getsockname(handle, &addr, &addrlen) == -1)
	return false;

    if (addr.sa_family != AF_INET && addr.sa_family != AF_INET6)
	return false;

    if (addr.sa_family == AF_INET && ip_version == ip_protocol::IPv6)
	return false;
    if (addr.sa_family == AF_INET6 && ip_version == ip_protocol::IPv4)
	return false;

    return true;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x10(%rsp), %rsi
callq 0xb610
cmpl $-0x1, %eax
je 0xc76b
movzwl 0x10(%rsp), %eax
movl %eax, %ecx
andl $-0x9, %ecx
cmpw $0x2, %cx
jne 0xc76b
cmpw $0x2, %ax
sete %dl
movl (%rbx), %ecx
cmpl $0xa, %ecx
sete %sil
testb %sil, %dl
je 0xc773
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
cmpw $0xa, %ax
setne %dl
cmpl $0x2, %ecx
setne %al
orb %dl, %al
jmp 0xc76d
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/client.cpp
// Function: socket_io::client::client(socket_io::socket&&, boost::variant<socket_io::socket_address<sockaddr_in>, socket_io::socket_address<sockaddr_in6>> const&)
client::client(socket&& client,
	       ip_socket_address const& address_of_server)
    : main_socket{std::move(client)}, address_of_server{address_of_server}
{
    bool is_ipv4 = address_of_server.type() == typeid(ipv4_socket_address);
    auto ip_version = main_socket.get_ip_protocol();

    if ((is_ipv4 && ip_version == ip_protocol::IPv6) ||
	(!is_ipv4 && ip_version == ip_protocol::IPv4))
	throw std::logic_error{"Socket and address have different protocols"};
    
    if (is_ipv4)
    {
	auto to_connect = boost::get<ipv4_socket_address>(address_of_server);
	sockaddr_in addr_in = to_connect.get_native_handle();
	socket_io::connect(main_socket, reinterpret_cast<sockaddr*>(&addr_in),
			   sizeof(sockaddr_in));
    }
    else
    {
	auto to_connect = boost::get<ipv6_socket_address>(address_of_server);	
	sockaddr_in6 addr_in6 = to_connect.get_native_handle();
	socket_io::connect(main_socket, reinterpret_cast<sockaddr*>(&addr_in6),
			   sizeof(sockaddr_in6));
    }


    std::string idStr;
    main_socket.make_view() >> idStr;
    id = string_to_integer<int>(idStr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rdi, %rbx
callq 0xb5c0
leaq 0x8(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xbb70
movq %r15, %rdi
callq 0xb030
movq 0x8278(%rip), %rsi      # 0x14fd8
movq %rax, %rdi
callq 0xb3e0
movzbl %al, %ecx
leal 0x2(,%rcx,8), %ecx
cmpl %ecx, 0x4(%rbx)
je 0xce09
testb %al, %al
je 0xcd9d
movq %r15, %rdi
callq 0xb370
movups (%rax), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0xce7f
jmp 0xcdc1
movq %r15, %rdi
callq 0xb4d0
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
movq %rsp, %rsi
movups %xmm1, 0xc(%rsi)
movaps %xmm0, (%rsi)
pushq $0x1c
popq %rdx
movq %rbx, %rdi
callq 0xce7f
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rbx, %rdi
callq 0xb110
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movq %rsp, %rsi
callq 0xb1f0
movq %rsp, %rdi
callq 0xbae0
movl %eax, 0x38(%rbx)
movq %rsp, %rdi
callq 0xb250
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %r12
leaq 0x33b5(%rip), %rsi      # 0x101d0
movq %rax, %rdi
callq 0xba30
movq 0x8186(%rip), %rsi      # 0x14fb0
movq 0x8127(%rip), %rdx      # 0x14f58
movq %r12, %rdi
callq 0xbc50
jmp 0xce5f
jmp 0xce5f
jmp 0xce5f
jmp 0xce5f
jmp 0xce5f
movq %rax, %r15
movq %r12, %rdi
callq 0xb430
jmp 0xce62
jmp 0xce52
movq %rax, %r15
movq %rsp, %rdi
callq 0xb250
jmp 0xce62
movq %rax, %r15
movq %r14, %rdi
callq 0xba40
movq %rbx, %rdi
callq 0xb700
movq %r15, %rdi
callq 0xbcf0
movq %rax, %r15
jmp 0xce6a
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/client.cpp
// Function: socket_io::client::~client()
client::~client() noexcept
{
    try
    {
	main_socket.make_view() << std::to_string(id);
    }
    catch (...)
    { /* Ignore the exception */ }	
    shutdown(main_socket);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0xb110
movq %rax, (%rsp)
movl 0x38(%rbx), %esi
leaq 0x8(%rsp), %rdi
callq 0xb8d0
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0xbe80
leaq 0x8(%rsp), %rdi
callq 0xb250
movq %rbx, %rdi
callq 0xb8b0
leaq 0x8(%rbx), %rdi
callq 0xba40
movq %rbx, %rdi
callq 0xb700
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xb250
jmp 0xcf8c
movq %rax, %r14
movq %r14, %rdi
callq 0xb220
callq 0xbbc0
jmp 0xcf59
movq %rax, %rdi
callq 0xc7ba
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/socket.cpp
// Function: socket_io::socket::socket(socket_io::ip_protocol const&)
socket::socket(ip_protocol const& ip_version)
    : ip_version{ip_version}
{
    handle = ::socket(static_cast<int>(ip_version), SOCK_STREAM, 0);
    if (handle == -1)
	throw std::runtime_error("An error occured while creating a socket: " +
				 get_errno_as_string());
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl (%rsi), %edi
movl %edi, 0x4(%rbx)
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0xb140
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0xd3da
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb460
leaq 0x3245(%rip), %rsi      # 0x10639
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xbc20
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xbb90
xorl %ebp, %ebp
movq 0x7bd6(%rip), %rsi      # 0x14ff0
movq 0x7b17(%rip), %rdx      # 0x14f38
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xb250
jmp 0xd43e
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0xb250
testb %bpl, %bpl
jne 0xd450
jmp 0xd458
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/server.cpp
// Function: socket_io::server::accept_clients()
auto server::accept_clients() -> void
{
    for (;;)
    {
	try
	{
	    socket client = accept(main_socket);
	    socket_view view = client.make_view();

	    epoll_handle.add(view, EPOLLIN);
	    
	    int const id = connected.add(std::move(client));
	    view << std::to_string(id);
	}
	catch (...)
	{ /* Ignore the exceptions */ }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0xc(%rdi), %r14
leaq 0x48(%rdi), %r15
addq $0x68, %rbx
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq %r12, %rdi
movq %r14, %rsi
callq 0xb9d0
movq %r12, %rdi
callq 0xb110
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
callq 0xbc00
movq %rbx, %rdi
movq %r12, %rsi
callq 0xba10
movq %rbp, %rdi
movl %eax, %esi
callq 0xb8d0
movq %r13, %rdi
movq %rbp, %rsi
callq 0xb2d0
movq %rbp, %rdi
callq 0xb250
movq %r12, %rdi
callq 0xb700
jmp 0xd640
movq %rax, (%rsp)
movq %rbp, %rdi
callq 0xb250
jmp 0xd6ae
jmp 0xd6aa
jmp 0xd6aa
movq %rax, (%rsp)
movq %r12, %rdi
callq 0xb700
movq (%rsp), %rdi
jmp 0xd6bf
movq %rax, %rdi
callq 0xb220
callq 0xbbc0
jmp 0xd640
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/server.cpp
// Function: socket_io::server::~server()
server::~server() noexcept
{
    using client_cell = registry_of_clients::client_cell;
    std::vector<client_cell> sockets_for_clients = connected.get_clients();
    for (auto& [id, socket] : sockets_for_clients)
    {
	socket_view view = socket.make_view();
	
	view << "EXIT";
	epoll_handle.remove(view);
	shutdown(socket);
    }
    shutdown(main_socket);
    pthread_cancel(accept_clients_tid.native_handle());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x68(%rdi), %rsi
leaq 0x20(%rsp), %rdi
callq 0xb630
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r12
movq %rbx, 0x10(%rsp)
leaq 0x48(%rbx), %r14
leaq 0x38(%rsp), %r13
leaq 0xf(%rsp), %rbp
leaq 0x18(%rsp), %rbx
cmpq %r12, %r15
je 0xd9ef
addq $0x4, %r15
movq %r15, %rdi
callq 0xb110
movq %rax, 0x18(%rsp)
movq %r13, %rdi
leaq 0x2e0b(%rip), %rsi      # 0x107c6
movq %rbp, %rdx
callq 0xbc30
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb2d0
movq %r13, %rdi
callq 0xb250
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb6c0
movq %r15, %rdi
callq 0xb8b0
addq $0x8, %r15
jmp 0xd99b
movq 0x10(%rsp), %r15
leaq 0xc(%r15), %rbx
movq %rbx, %rdi
callq 0xb8b0
movq (%r15), %rdi
callq 0xb9b0
leaq 0x20(%rsp), %rdi
callq 0xb100
leaq 0x70(%r15), %rdi
callq 0xb740
movq %r14, %rdi
callq 0xb7e0
leaq 0x18(%r15), %rdi
callq 0xba40
movq %rbx, %rdi
callq 0xb700
movq %r15, %rdi
callq 0xbb10
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xda4d
movq %rax, %rdi
callq 0xc7ba
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/server.cpp
// Function: socket_io::server::receive[abi:cxx11]()
auto server::receive() -> std::string
{
    auto&& [flags, caused_by] = epoll_handle.get_event();

    std::string message;
    caused_by >> message;
    
    if (message.find("FROM") == std::string::npos)
    {
	int const id = string_to_integer<int>(message);
	socket client = connected.get_client(id);
	epoll_handle.remove(client.make_view());
    }

    auto message_start_pos = message.find('}') + 2;
    return message.substr(message_start_pos,
			  message.length() - message_start_pos);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x48(%rsi), %r14
movq %r14, %rdi
callq 0xb3b0
leaq 0x34(%rsp), %rdi
movq %rax, -0x4(%rdi)
movl %edx, 0x4(%rdi)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rsi
callq 0xb9e0
leaq 0x2d2c(%rip), %rsi      # 0x107cb
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0xbe70
cmpq $-0x1, %rax
jne 0xdaec
leaq 0x8(%rsp), %rdi
callq 0xbae0
addq $0x68, %r15
movq %rsp, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xb7f0
movq %rsp, %rdi
callq 0xb110
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0xb6c0
movq %rsp, %rdi
callq 0xb700
leaq 0x8(%rsp), %r14
pushq $0x7d
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb8c0
leaq 0x2(%rax), %rdx
movq 0x8(%r14), %rcx
subq %rdx, %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb6d0
leaq 0x8(%rsp), %rdi
callq 0xb250
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb700
jmp 0xdb41
jmp 0xdb3e
jmp 0xdb3e
jmp 0xdb3e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb250
movq %rbx, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/server.cpp
// Function: socket_io::server::send(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto server::send(int const client_id, std::string const& message) -> void
{
    socket client = connected.get_client(client_id);
    try
    {
	client.make_view() << message;
    }
    catch (std::runtime_error const& e)
    {
	if (errno == EPIPE) // Client has disconnected
	{
	    epoll_handle.remove(client.make_view());
	    shutdown(client);
	    return;
	}
	throw;
    }
    connected.add(client_id, std::move(client));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xb7f0
movq %r12, %rdi
callq 0xb110
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %r15, %rsi
callq 0xbe80
movq %rsp, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0xba20
movq %rsp, %rdi
callq 0xb700
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0xb700
movq %r14, %rdi
callq 0xbcf0
movq %rax, %r14
cmpl $0x1, %edx
jne 0xdbb9
movq %r14, %rdi
callq 0xb220
callq 0xb050
cmpl $0x20, (%rax)
jne 0xdc0e
addq $0x48, %rbx
movq %rsp, %rdi
callq 0xb110
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0xb6c0
movq %rsp, %rdi
callq 0xb8b0
callq 0xbbc0
jmp 0xdba1
callq 0xba70
jmp 0xdc17
jmp 0xdbb6
movq %rax, %r14
callq 0xbbc0
jmp 0xdbb9
movq %rax, %rdi
callq 0xc7ba
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/server.cpp
// Function: socket_io::server::get_connected_clients()
auto server::get_connected_clients() -> std::vector<connected_client>
{
    using client_cell = registry_of_clients::client_cell;
    std::vector<client_cell> connected_clients = connected.get_clients();

    std::vector<connected_client> views;
    for (auto& [id, socket] : connected_clients)
    {
	views.emplace_back(std::make_pair(id, socket.make_view()));
	connected.add(id, std::move(socket));
    }
    return views;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x68, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xb630
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq (%r15), %rbp
movq 0x8(%r15), %r13
movq %rsp, %r15
cmpq %r13, %rbp
je 0xdcb9
leaq 0x4(%rbp), %r12
movq %r12, %rdi
callq 0xb110
movl (%rbp), %ecx
movl %ecx, 0x10(%rsp)
movq %rax, 0x14(%rsp)
movq 0x10(%rsp), %rcx
shrq $0x20, %rax
movq %rcx, (%rsp)
movl %eax, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb800
movl -0x4(%r12), %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0xba20
addq $0x8, %r12
movq %r12, %rbp
jmp 0xdc67
leaq 0x20(%rsp), %rdi
callq 0xb100
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdcd7
movq %rax, %r14
movq %rbx, %rdi
callq 0xb5b0
leaq 0x20(%rsp), %rdi
callq 0xb100
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/registry.cpp
// Function: socket_io::registry_of_clients::get_new_id() const
auto registry_of_clients::get_new_id() const -> int
{
    std::lock_guard<std::mutex> lock(get_new_id_mutex);
    
    int id = base_id;
    bool found_id = false;
    while (id < std::numeric_limits<int>::max() && !found_id)
	if (client_to_socket.find(id) == client_to_socket.end())
	    found_id = true;
	else
	    id++;
    if (!found_id)
	throw std::runtime_error{"No free ID available"};
    return id;    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
movq %rbx, %rdi
callq 0xbdd0
movl (%r14), %ebp
leaq 0x4(%rsp), %r15
movl %ebp, (%r15)
addq $0x8, %r14
xorl %eax, %eax
cmpl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
je 0xe34a
testb $0x1, %al
jne 0xe34a
movq %r14, %rdi
movq %r15, %rsi
callq 0xb380
movl 0x4(%rsp), %ebp
testq %rax, %rax
sete %al
je 0xe31f
incl %ebp
movl %ebp, 0x4(%rsp)
jmp 0xe31f
testb $0x1, %al
je 0xe363
movq %rbx, %rdi
callq 0xb480
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %r15
leaq 0x24fc(%rip), %rsi      # 0x10871
movq %rax, %rdi
callq 0xb200
movq 0x6c6c(%rip), %rsi      # 0x14ff0
movq 0x6bad(%rip), %rdx      # 0x14f38
movq %r15, %rdi
callq 0xbc50
jmp 0xe3a2
movq %rax, %r14
movq %r15, %rdi
callq 0xb430
jmp 0xe3a5
movq %rax, %r14
movq %rbx, %rdi
callq 0xb480
movq %r14, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/registry.cpp
// Function: socket_io::registry_of_clients::add(int, socket_io::socket&&)
auto registry_of_clients::add(int const id, socket&& client) -> void
{
    if (client_to_socket.find(id) != client_to_socket.end())
	throw std::runtime_error{"Specified id already taken"};
    
    std::lock_guard<std::mutex> lock(add_remove_mutex);
    
    auto result = client_to_socket.emplace(id, std::move(client));

    if (!result.second)
	throw std::invalid_argument{"Failed to add the client to the registry"};
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
leaq 0x8(%rdi), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xbd00
testq %rax, %rax
jne 0xe439
addq $0x68, %rbx
movq %rbx, %rdi
callq 0xbdd0
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0xbc60
testb $0x1, %dl
je 0xe469
movq %rbx, %rdi
callq 0xb480
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x243b(%rip), %rsi      # 0x10886
movq %rax, %rdi
callq 0xb200
movq 0x6b96(%rip), %rsi      # 0x14ff0
movq 0x6ad7(%rip), %rdx      # 0x14f38
movq %rbx, %rdi
callq 0xbc50
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %r15
leaq 0x2426(%rip), %rsi      # 0x108a1
movq %rax, %rdi
callq 0xbde0
movq 0x6b2e(%rip), %rsi      # 0x14fb8
movq 0x6b07(%rip), %rdx      # 0x14f98
movq %r15, %rdi
callq 0xbc50
movq %rax, %r14
movq %r15, %rdi
callq 0xb430
jmp 0xe4b6
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
jmp 0xe4be
movq %rax, %r14
movq %rbx, %rdi
callq 0xb480
movq %r14, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/registry.cpp
// Function: socket_io::registry_of_clients::get_client(int)
auto registry_of_clients::get_client(int const id) -> socket
{
    std::lock_guard<std::mutex> lock(add_remove_mutex);

    socket client = std::move(client_to_socket.at(id));
    client_to_socket.erase(id);
    return client;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movl %edx, (%r12)
leaq 0x68(%rsi), %rbx
movq %rbx, %rdi
callq 0xbdd0
addq $0x8, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0xb690
movq %r14, %rdi
movq %rax, %rsi
callq 0xb5c0
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0xb6e0
movq %rbx, %rdi
callq 0xb480
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r14, %rdi
callq 0xb700
jmp 0xe537
movq %rax, %r15
movq %rbx, %rdi
callq 0xb480
movq %r15, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/registry.cpp
// Function: socket_io::registry_of_clients::get_clients()
auto registry_of_clients::get_clients() -> std::vector<client_cell>
{
    std::lock_guard<std::mutex> lock(add_remove_mutex);
    
    std::vector<client_cell> sockets;
    for (auto&& [id, sock] : client_to_socket)
	sockets.emplace_back(std::make_pair(id, std::move(sock)));
    client_to_socket.clear();
    return sockets;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x68(%rsi), %r14
movq %r14, %rdi
callq 0xbdd0
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x18(%r15), %rbp
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
movq (%rbp), %rbp
testq %rbp, %rbp
je 0xe5af
leaq 0x8(%rbp), %rsi
leaq 0xc(%rbp), %rdx
movq %r13, %rdi
callq 0xb7c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb640
movq %r12, %rdi
callq 0xb700
jmp 0xe581
addq $0x8, %r15
movq %r15, %rdi
callq 0xb970
movq %r14, %rdi
callq 0xb480
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r12, %rdi
callq 0xb700
movq %rbx, %rdi
callq 0xb100
movq %r14, %rdi
callq 0xb480
movq %r15, %rdi
callq 0xbcf0
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/socket_view.cpp
// Function: socket_io::socket_view::to_string[abi:cxx11]() const
auto socket_view::to_string() const -> std::string
{
    if (!is_socket_handle(handle, ip_version))
	std::runtime_error{"Not a valid socket handle"};

    std::string ip_version_str;
    if (ip_version == ip_protocol::IPv4)
        ip_version_str = "IPv4";
    else
	ip_version_str = "IPv6";       
    return "(SOCK_STREAM, " + ip_version_str + ")";    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edi
addq $0x4, %r14
movq %r14, %rsi
callq 0xbd60
testb %al, %al
jne 0xee01
leaq 0x1878(%rip), %rsi      # 0x10664
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xb200
movq %r15, %rdi
callq 0xbea8
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpl $0x2, (%r14)
leaq 0x1861(%rip), %rax      # 0x1067e
leaq 0x185f(%rip), %rsi      # 0x10683
cmoveq %rax, %rsi
movq %rsp, %rdi
callq 0xbe20
leaq 0x1851(%rip), %rsi      # 0x10688
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xb5a0
leaq 0x184c(%rip), %rdx      # 0x10697
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xb120
leaq 0x20(%rsp), %rdi
callq 0xb250
movq %rsp, %rdi
callq 0xb250
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb250
jmp 0xee8b
jmp 0xee88
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb250
movq %rbx, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/address.cpp
// Function: socket_io::socket_address<sockaddr_in>::socket_address(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
socket_address<T>::socket_address(std::string const& ip_address,
				  std::string const& port)
    : handle{} // Set the structure to zero
{
    set_ip_address(ip_address);
    set_port(port);
    if constexpr(is_ipv4)
	handle.sin_family = AF_INET;
    else
	handle.sin6_family = AF_INET6;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
callq 0xb6f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbc40
movw $0x2, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/address.cpp
// Function: socket_io::socket_address<sockaddr_in>::set_ip_address(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto socket_address<T>::set_ip_address(std::string const& ip_address) -> void
{
    int error_code = 1;
    if constexpr(is_ipv4)
    {
	if (ip_address == "INADDR_ANY")
	    handle.sin_addr.s_addr = INADDR_ANY;
	else
            error_code = inet_pton(AF_INET, ip_address.c_str(),
			           static_cast<void*>(&handle.sin_addr));
    }
    else
    {
	if (ip_address == "in6addr_any")
	    handle.sin6_addr = in6addr_any;
	else
	    error_code = inet_pton(AF_INET6, ip_address.c_str(),
			           static_cast<void*>(&handle.sin6_addr));
    }
    /*
     * Error checking for EAFNOSUPPORT no necessary as AF_INET and AF_INET6 are
     * valid address families
    */
    if (error_code == 0)
	throw std::invalid_argument{ip_address + " is not a valid IP address"};
    ip_address_length = ip_address.length();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18ad(%rip), %rsi      # 0x1078c
movq %r14, %rdi
callq 0xbe90
testb %al, %al
je 0xeef1
andl $0x0, 0x4(%rbx)
jmp 0xef04
movq (%r14), %rsi
leaq 0x4(%rbx), %rdx
pushq $0x2
popq %rdi
callq 0xbdf0
testl %eax, %eax
je 0xef15
movq 0x8(%r14), %rax
movq %rax, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x19b1(%rip), %rdx      # 0x108d8
movq %rsp, %rdi
movq %r14, %rsi
callq 0xb880
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xbc70
xorl %ebp, %ebp
movq 0x606f(%rip), %rsi      # 0x14fb8
movq 0x6048(%rip), %rdx      # 0x14f98
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
movq %rsp, %rdi
callq 0xb250
testb %bpl, %bpl
jne 0xef6d
jmp 0xef75
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/include/utils.hpp
// Function: unsigned short string_to_integer<unsigned short>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto string_to_integer(std::string const& str) -> integer
{
    static_assert(std::is_integral<integer>::value);
    const long long converted_integer = std::stoi(str, 0, 10);
    if (converted_integer < std::numeric_limits<integer>::min() ||
	converted_integer > std::numeric_limits<integer>::max())
	throw std::out_of_range{"Input value out of range"};
    return static_cast<integer>(converted_integer);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0xbe30
cmpl $0x10000, %eax          # imm = 0x10000
jae 0xeff6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0xb2a0
movq %rax, %rbx
leaq 0x18ed(%rip), %rsi      # 0x108f5
movq %rax, %rdi
callq 0xb0b0
movq 0x5f89(%rip), %rsi      # 0x14fa0
movq 0x5f6a(%rip), %rdx      # 0x14f88
movq %rbx, %rdi
callq 0xbc50
movq %rax, %r14
movq %rbx, %rdi
callq 0xb430
movq %r14, %rdi
callq 0xbcf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/address.cpp
// Function: socket_io::socket_address<sockaddr_in>::get_ip_address[abi:cxx11]() const
auto socket_address<T>::get_ip_address() const -> std::string
{
    size_type const buffer_length = ip_address_length + 1;
    char buffer[buffer_length];
    /* 
     * Error checking is no necessary as:
     * - AF_INET or AF_INET6 is a valid address family (no EAFNOSUPPORT)
     * - ip_address_length is a proper length of the address (no ENOSPC)
     */
    if constexpr(is_ipv4)
        inet_ntop(AF_INET, &handle.sin_addr, buffer, buffer_length);
    else
	inet_ntop(AF_INET6, &handle.sin6_addr, buffer, buffer_length);
    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
leal 0x1(%rax), %ecx
movq %rsp, %r14
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
addq $0x4, %rsi
pushq $0x2
popq %rdi
movq %r14, %rdx
callq 0xb710
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbc30
movq %rbx, %rax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dak98[P]SocketIO/src/address.cpp
// Function: socket_io::socket_address<sockaddr_in>::to_string[abi:cxx11]() const
auto socket_address<T>::to_string() const -> std::string
{    
    std::string address_family;
    if constexpr(is_ipv4)
        address_family = "IPv4";
    else
	address_family = "IPv6";
    return "(" + address_family +   ", " +
	         get_ip_address() + ", " +
	         get_port() + ")";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x154a(%rip), %rsi      # 0x1067e
leaq 0x8(%rsp), %rdi
callq 0xbe20
leaq 0x17ae(%rip), %rsi      # 0x108f3
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xb5a0
leaq 0x1539(%rip), %rdx      # 0x10694
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xb120
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0xb860
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xb580
leaq 0x14f9(%rip), %rdx      # 0x10694
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xb120
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0xb1a0
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xb580
leaq 0x14b9(%rip), %rdx      # 0x10697
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb120
leaq 0xe8(%rsp), %rdi
callq 0xb250
leaq 0x28(%rsp), %rdi
callq 0xb250
leaq 0xc8(%rsp), %rdi
callq 0xb250
leaq 0xa8(%rsp), %rdi
callq 0xb250
leaq 0x48(%rsp), %rdi
callq 0xb250
leaq 0x88(%rsp), %rdi
callq 0xb250
leaq 0x68(%rsp), %rdi
callq 0xb250
leaq 0x8(%rsp), %rdi
callq 0xb250
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0xb250
jmp 0xf26d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb250
jmp 0xf27c
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xb250
jmp 0xf28e
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xb250
jmp 0xf2a0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb250
leaq 0x88(%rsp), %rdi
callq 0xb250
leaq 0x68(%rsp), %rdi
callq 0xb250
jmp 0xf2d2
movq %rax, %rbx
jmp 0xf2aa
movq %rax, %rbx
jmp 0xf2b7
jmp 0xf2cf
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb250
movq %rbx, %rdi
callq 0xbcf0