// File: 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
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x190(%rbp)
movb $0x1, -0x141(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
leaq 0x6f74e(%rip), %rsi     # 0x91476
callq 0x290c0
jmp 0x21d2f
leaq -0xb0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movzbl -0x9(%rbp), %esi
callq 0x29100
jmp 0x21d48
leaq -0xd0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x2, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x29160
jmp 0x21d7a
leaq -0x58(%rbp), %rax
movq %rax, -0x198(%rbp)
movq %rax, -0x80(%rbp)
leaq -0x138(%rbp), %rdi
movq %rdi, -0x140(%rbp)
leaq 0x6fd92(%rip), %rsi     # 0x91b30
callq 0x290c0
jmp 0x21da5
leaq -0x118(%rbp), %rdi
movq %rdi, -0x140(%rbp)
movq -0x18(%rbp), %rsi
callq 0x291c0
jmp 0x21dbe
movq -0x198(%rbp), %rdi
leaq -0x138(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x2, -0xf0(%rbp)
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
callq 0x29160
jmp 0x21df3
movb $0x0, -0x141(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x2, -0x30(%rbp)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x28(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x29200
jmp 0x21e28
leaq -0x78(%rbp), %rax
movq %rax, -0x1a8(%rbp)
addq $0x40, %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x29140
movq -0x1a8(%rbp), %rcx
movq -0x1b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1a0(%rbp)
jne 0x21e3e
leaq -0x138(%rbp), %rax
movq %rax, -0x1c0(%rbp)
addq $0x40, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x29140
movq -0x1c0(%rbp), %rcx
movq -0x1c8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1b8(%rbp)
jne 0x21e88
leaq -0xd0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
addq $0x40, %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x29140
movq -0x1d8(%rbp), %rcx
movq -0x1e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1d0(%rbp)
jne 0x21ed2
leaq -0x168(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
callq 0x29440
jmp 0x21f22
movq 0xba06f(%rip), %rdi     # 0xdbf98
leaq 0x6f549(%rip), %rsi     # 0x91479
callq 0xc7e0
movq %rax, -0x1e8(%rbp)
jmp 0x21f3e
leaq -0x188(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x2, %edx
movl $0x20, %ecx
xorl %r8d, %r8d
callq 0x29440
jmp 0x21f5d
movq -0x1e8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xc460
movq %rax, -0x1f0(%rbp)
jmp 0x21f79
movq -0x1f0(%rbp), %rdi
movq 0xba049(%rip), %rsi     # 0xdbfd0
callq 0xcd30
jmp 0x21f8e
leaq -0x188(%rbp), %rdi
callq 0xcfb8
movq -0x190(%rbp), %rdi
addq $0x30, %rdi
callq 0x29600
cmpl $0x0, 0x398(%rax)
jne 0x22291
movq -0x190(%rbp), %rdi
addq $0x30, %rdi
callq 0x29600
movq %rax, -0x200(%rbp)
leaq -0x168(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0xc190
movq -0x208(%rbp), %rdi
movq %rax, -0x1f8(%rbp)
callq 0xc420
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x89060
jmp 0x22011
jmp 0x22291
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0xd8(%rbp), %rax
leaq -0xd0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x210(%rbp)
je 0x22073
movq -0x210(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x218(%rbp)
callq 0x29140
movq -0x218(%rbp), %rax
leaq -0xd0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x210(%rbp)
jne 0x22042
jmp 0x221f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x221ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x140(%rbp), %rax
leaq -0x138(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x220(%rbp)
je 0x220ec
movq -0x220(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x228(%rbp)
callq 0x29140
movq -0x228(%rbp), %rax
leaq -0x138(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x220(%rbp)
jne 0x220bb
jmp 0x221ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x22160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x238(%rbp)
addq $0x40, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x240(%rbp)
callq 0x29140
movq -0x238(%rbp), %rcx
movq -0x240(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x230(%rbp)
jne 0x2212d
jmp 0x22160
leaq -0x138(%rbp), %rax
movq %rax, -0x250(%rbp)
addq $0x40, %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x258(%rbp)
callq 0x29140
movq -0x250(%rbp), %rcx
movq -0x258(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x248(%rbp)
jne 0x22179
jmp 0x221ac
leaq -0xd0(%rbp), %rax
movq %rax, -0x268(%rbp)
addq $0x40, %rax
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x270(%rbp)
callq 0x29140
movq -0x268(%rbp), %rcx
movq -0x270(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x260(%rbp)
jne 0x221c5
jmp 0x221f8
testb $0x1, -0x141(%rbp)
jne 0x22203
jmp 0x22247
movq -0x80(%rbp), %rax
leaq -0x78(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x278(%rbp)
je 0x22245
movq -0x278(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x280(%rbp)
callq 0x29140
movq -0x280(%rbp), %rax
leaq -0x78(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x278(%rbp)
jne 0x22217
jmp 0x22247
jmp 0x222c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x222bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x222af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x188(%rbp), %rdi
callq 0xcfb8
jmp 0x222af
leaq -0x168(%rbp), %rdi
callq 0xcfb8
leaq -0x28(%rbp), %rdi
callq 0x12560
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
leaq -0x168(%rbp), %rdi
callq 0xcfb8
leaq -0x28(%rbp), %rdi
callq 0x12560
movq -0xe0(%rbp), %rdi
callq 0xc8c0