// File: /workspace/github_cpp_makefile_star2_O1/fieryzig[P]GameServer/TestClient/TestClient.cpp
// Function: main
int main()
{
    init();
    Client* client = new Client(fd);

    PacketInfo pi;
    pi.srcType = ServerType::CLIENT;
    pi.time = time(NULL);
    pi.uid = -1;
    pi.svrid = 0;
    pi.clifd = -1;
    pi.contentLen = 5;
    string content = "Login";
    client->Send(pi, content);

//    thread recvThread(recv_thread);

    for(;;)
    {
        cin >> content;
        pi.time = time(NULL);
        pi.contentLen = content.length();
        int ret = client->Send(pi, content);
        while (client->hasRemain()) client->SendRemain();
        if (content == "Logout") {
            close(client->fd);
            return 0;
        }
    }

//    recvThread.join();

    return 0;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
callq 0x240c
movl $0x2024, %edi           # imm = 0x2024
callq 0x2160
movq %rax, %rbx
movl 0x3bb5(%rip), %eax      # 0x615c
xorl %r12d, %r12d
movq %r12, 0x1004(%rbx)
movl %r12d, 0x100c(%rbx)
movq %r12, 0x2014(%rbx)
movl %r12d, 0x201c(%rbx)
movl %eax, 0x2020(%rbx)
xorl %edi, %edi
callq 0x2120
movq %rax, %r14
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1a4c(%rip), %rsi      # 0x4031
leaq 0x1a4a(%rip), %rdx      # 0x4036
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x2828
movl %r12d, -0x78(%rbp)
movl %r14d, -0x74(%rbp)
movaps 0x1a09(%rip), %xmm0     # 0x4010
movups %xmm0, -0x70(%rbp)
leaq -0xa8(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x278e
movq -0x68(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0xb8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2c98
movq -0xb8(%rbp), %rdi
cmpq %r14, %rdi
je 0x265d
callq 0x2130
leaq -0x88(%rbp), %r14
leaq -0x98(%rbp), %r12
leaq 0x19c5(%rip), %r13      # 0x4037
movq 0x3967(%rip), %rdi      # 0x5fe0
movq %r15, %rsi
callq 0x21a0
xorl %edi, %edi
callq 0x2120
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movl $0x0, -0x40(%rbp)
movl %eax, -0x3c(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x38(%rbp)
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl %edx, -0x2c(%rbp)
movq %r14, -0x98(%rbp)
addq %rsi, %rdx
movq %r12, %rdi
callq 0x278e
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2c98
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x26ec
callq 0x2130
movq %rbx, %rdi
callq 0x2ef2
testb %al, %al
je 0x2702
movq %rbx, %rdi
callq 0x2f02
jmp 0x26ec
movq %r15, %rdi
movq %r13, %rsi
callq 0x2070
testl %eax, %eax
jne 0x2672
movl 0x2020(%rbx), %edi
callq 0x2260
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x2732
callq 0x2130
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2770
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
jmp 0x2764
jmp 0x2770
jmp 0x2770
jmp 0x2770
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x2773
callq 0x2130
jmp 0x2773
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x2785
callq 0x2130
movq %rbx, %rdi
callq 0x2220
nop