// File: /workspace/github_cpp_makefile_star2_O1/Thomas1995[P]Rentz/src/./event.h
// Function: event::send(int)
void send(int fd) {
    std::vector<uint8_t> header(8, 0);
    ((uint32_t *)header.data())[0] = htonl(type);
    ((uint32_t *)header.data())[1] = htonl(len);

    std::vector<uint8_t> message;
    message.reserve(8 + len + 2);
    message.push_back(FLAG);

    for(auto &b: header) {
      append(b);
    }

    for(size_t i = 0; i < len; ++i) {
      uint8_t b = data[i];
      append(b);
    }

    message.push_back(FLAG);

    int rem = message.size();
    uint8_t *at = message.data();

    while(rem > 0) {
      const int n = ::send(fd, at, rem, 0);
      rem -= n;
      at += n;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x8, %edi
callq 0x3230
movq %rax, %rbx
xorl %eax, %eax
movq %rax, (%rbx)
movl (%r14), %ecx
bswapl %ecx
movl %ecx, (%rbx)
movq 0x8(%r14), %rsi
movl %esi, %ecx
bswapl %ecx
movl %ecx, 0x4(%rbx)
leaq 0x10(%rsp), %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
addq $0xa, %rsi
callq 0x5af8
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x7e8f
movb $0x7e, (%rsi)
incq 0x18(%rsp)
jmp 0x7ea0
leaq 0x5922(%rip), %rdx      # 0xd7b8
leaq 0x10(%rsp), %rdi
callq 0xbf02
movl %ebp, 0x34(%rsp)
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
leaq 0xe(%rsp), %r13
leaq (%rbx,%rbp), %r15
movb (%rbx,%rbp), %al
leal -0x7d(%rax), %edx
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
cmpb $0x1, %dl
ja 0x7ed8
cmpq %rcx, %rsi
je 0x7ee6
movb $0x7d, (%rsi)
incq 0x18(%rsp)
jmp 0x7ef5
cmpq %rcx, %rsi
je 0x7f0b
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x7f16
movq %r12, %rdi
leaq 0x58c9(%rip), %rdx      # 0xd7b9
callq 0xbf02
movb (%r15), %al
xorb $0x20, %al
movb %al, 0xe(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5c1c
jmp 0x7f16
movq %r12, %rdi
movq %r15, %rdx
callq 0xbf02
incq %rbp
cmpq $0x8, %rbp
jne 0x7eb0
cmpq $0x0, 0x8(%r14)
je 0x7fb1
xorl %r15d, %r15d
leaq 0x5885(%rip), %rbp      # 0xd7b9
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %r13
movq 0x10(%r14), %rax
movb (%rax,%r15), %al
movb %al, 0xe(%rsp)
leal -0x7d(%rax), %edx
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
cmpb $0x1, %dl
ja 0x7f6b
cmpq %rcx, %rsi
je 0x7f79
movb $0x7d, (%rsi)
incq 0x18(%rsp)
jmp 0x7f84
cmpq %rcx, %rsi
je 0x7f9b
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x7fa8
movq %r12, %rdi
movq %rbp, %rdx
callq 0xbf02
movb 0xe(%rsp), %al
xorb $0x20, %al
movb %al, 0xf(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5c1c
jmp 0x7fa8
movq %r12, %rdi
leaq 0xe(%rsp), %rdx
callq 0xbf02
incq %r15
cmpq 0x8(%r14), %r15
jb 0x7f3e
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x7fcc
movb $0x7e, (%rsi)
incq 0x18(%rsp)
movl 0x34(%rsp), %r15d
jmp 0x7fe2
leaq 0x57e5(%rip), %rdx      # 0xd7b8
leaq 0x10(%rsp), %rdi
callq 0xbf02
movl 0x34(%rsp), %r15d
movl 0x18(%rsp), %ebp
movq 0x10(%rsp), %r14
subl %r14d, %ebp
testl %ebp, %ebp
jle 0x800a
movl %ebp, %edx
movl %r15d, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3110
cltq
addq %rax, %r14
subl %eax, %ebp
jg 0x7ff2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8021
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3240
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3240
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8047
jmp 0x8047
jmp 0x8047
jmp 0x8047
jmp 0x8047
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8061
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3240
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3240
movq %r14, %rdi
callq 0x33a0