// File: /workspace/github_cpp_makefile_star2_O2/king1600[P]cordpp/src/gateway.cc
// Function: cordpp::Gateway::send(cordpp::GatewayOp, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&)
void Gateway::send(GatewayOp op, const Json &data) {
  Json packet = {
    {"op", static_cast<uint16_t>(op)},
    {"d", data}
  };
  const std::string dumped = packet.dump();
  std::cout << "Sending: " << packet.dump(2) << std::endl;
  if (conn->state == WebsockState::open)
    conn->send(dumped.c_str(), dumped.size(), WebsockOp::text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x22898(%rip), %rsi     # 0x326ee
leaq 0x58(%rsp), %rdi
callq 0x12494
leaq 0x78(%rsp), %rdi
movzbl %bpl, %esi
callq 0x124ba
leaq 0x18(%rsp), %r14
leaq 0x58(%rsp), %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x124e0
leaq 0x38(%rsp), %r14
leaq 0x22f19(%rip), %rsi     # 0x32da8
leaq 0x98(%rsp), %rdi
callq 0x12494
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
callq 0x124fa
leaq 0x98(%rsp), %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x124e0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
callq 0x1251c
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x18, %rdi
callq 0xc8b0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0xfedc
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x98, %rdi
callq 0xc8b0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0xfef7
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x58, %rdi
callq 0xc8b0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0xff15
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
callq 0x12630
movq 0x41065(%rip), %rdi     # 0x50fb0
leaq 0x2279f(%rip), %rsi     # 0x326f1
callq 0xa5e0
movq %rax, %r14
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
callq 0x12630
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0xa2e0
movq %rax, %rdi
callq 0xaa10
leaq 0x58(%rsp), %rdi
callq 0xac38
movq 0x30(%rbx), %rdi
cmpl $0x0, 0x398(%rdi)
jne 0xffb0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x2fb94
leaq 0x18(%rsp), %rdi
callq 0xac38
leaq 0x8(%rsp), %rdi
callq 0xc8b0
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10076
movq %rax, %rbx
jmp 0x10092
movq %rax, %rbx
pushq $0x20
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x18, %rdi
callq 0xc8b0
addq $-0x20, %r15
cmpq $-0x20, %r15
jne 0xffe6
xorl %ebp, %ebp
jmp 0x10007
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x20
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x98, %rdi
callq 0xc8b0
addq $-0x20, %r15
cmpq $-0x20, %r15
jne 0x1000b
jmp 0x1002f
jmp 0x10029
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x20
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x58, %rdi
callq 0xc8b0
addq $-0x20, %r15
cmpq $-0x20, %r15
jne 0x10033
leaq 0x18(%rsp), %r15
cmpq %r14, %r15
setne %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x1009c
addq $-0x20, %r14
movq %r14, %rdi
callq 0xc8b0
cmpq %r15, %r14
jne 0x1005e
jmp 0x1009c
movq %rax, %rbx
jmp 0x1009c
movq %rax, %rbx
jmp 0x10088
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xac38
leaq 0x18(%rsp), %rdi
callq 0xac38
leaq 0x8(%rsp), %rdi
callq 0xc8b0
movq %rbx, %rdi
callq 0xa6c0