// File: /workspace/github_cpp_makefile_star2_O1/QZzcoder[P]LiveChat/server.cpp
// Function: getOldMsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> getOldMsg(string name){
    vector<string> ret;
    MYSQL mysql_conn;
    MYSQL_RES * ptr_res;
    MYSQL_ROW result_row;
    mysql_init(&mysql_conn);
    if(!mysql_real_connect(&mysql_conn,"localhost","root",dbpassword,"Chat",0,NULL,0)){
        cout<<"mysql error";
        exit(1);
    }
    string sql = "select logofftime from User where name = \"" + name + "\";";
    if(!mysql_query(&mysql_conn,sql.c_str())){
        ptr_res = mysql_use_result(&mysql_conn);
        if(ptr_res){
            result_row = mysql_fetch_row(ptr_res);
        }
    }
    string logofftime = result_row[0];

    mysql_init(&mysql_conn);
    if(!mysql_real_connect(&mysql_conn,"localhost","root",dbpassword,"Chat",0,NULL,0)){
        cout<<"mysql error";
        exit(1);
    }
    sql = "select * from message where target = \"" + name + "\" and time > "+logofftime+";";
    if(!mysql_query(&mysql_conn,sql.c_str())){
        ptr_res = mysql_use_result(&mysql_conn);
        if(ptr_res){
            while((result_row = mysql_fetch_row(ptr_res))!=NULL){
                vector<string> temp(4,"");
                for(int i = 0;i<mysql_num_fields(ptr_res);i++){
                    temp[i] = result_row[i];
                }
                ret.push_back(temp[1]+":"+temp[3]);
            }
        }
    }
    mysql_close(&mysql_conn);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x578, %rsp            # imm = 0x578
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x50(%rbp)
movq $0x0, 0x10(%rdi)
leaq -0x588(%rbp), %rdi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x4821(%rip), %rsi      # 0x8020
leaq 0x4824(%rip), %rdx      # 0x802a
leaq 0x7a7b(%rip), %rcx      # 0xb288
leaq 0x481b(%rip), %r8       # 0x802f
leaq -0x588(%rbp), %rdi
xorl %r9d, %r9d
callq 0x3170
testq %rax, %rax
je 0x3caf
leaq 0x480d(%rip), %rsi      # 0x8040
leaq -0xb0(%rbp), %rdi
movq %rbx, %rdx
callq 0x5fc0
leaq 0x4822(%rip), %rsi      # 0x806b
leaq -0xb0(%rbp), %rdi
callq 0x34d0
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3882
movq %rdx, -0xd0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc0(%rbp)
jmp 0x3888
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xc8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38b7
callq 0x32b0
movq -0xd0(%rbp), %rsi
leaq -0x588(%rbp), %rdi
callq 0x31d0
leaq -0x588(%rbp), %rdi
callq 0x34c0
movq %rax, %rdi
callq 0x3310
movq (%rax), %rsi
leaq -0xb0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x30f0
leaq -0x588(%rbp), %rdi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x4715(%rip), %rsi      # 0x8020
leaq 0x4718(%rip), %rdx      # 0x802a
leaq 0x796f(%rip), %rcx      # 0xb288
leaq 0x470f(%rip), %r8       # 0x802f
leaq -0x588(%rbp), %rdi
xorl %r9d, %r9d
callq 0x3170
testq %rax, %rax
je 0x3cc4
leaq 0x472f(%rip), %rsi      # 0x806e
leaq -0x100(%rbp), %rdi
movq %rbx, %rdx
callq 0x5fc0
leaq 0x4740(%rip), %rsi      # 0x8095
leaq -0x100(%rbp), %rdi
callq 0x34d0
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3988
movq %rdx, -0x90(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x80(%rbp)
jmp 0x398f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x90(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0x30c0
leaq -0x60(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x39e4
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x39ea
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0x70(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4660(%rip), %rsi      # 0x806c
callq 0x34d0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a35
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x3a3c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xd0(%rbp), %rdi
movq %rbx, %rsi
callq 0x33a0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x3a73
callq 0x32b0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3a85
callq 0x32b0
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3a96
callq 0x32b0
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3aab
callq 0x32b0
movq -0xd0(%rbp), %rsi
leaq -0x588(%rbp), %rdi
callq 0x31d0
testl %eax, %eax
je 0x3b14
leaq -0x588(%rbp), %rdi
callq 0x33b0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3ae6
callq 0x32b0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x3afe
callq 0x32b0
movq -0x50(%rbp), %rax
addq $0x578, %rsp            # imm = 0x578
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x588(%rbp), %rdi
callq 0x34c0
movq %rax, %r12
testq %rax, %rax
je 0x3ac2
leaq -0x48(%rbp), %r15
movq %r12, -0xd8(%rbp)
movq %r12, %rdi
callq 0x3310
movq %rax, %rbx
testq %rax, %rax
je 0x3ac2
movq %r14, -0x48(%rbp)
movq %r15, %rdi
leaq 0x4629(%rip), %rdx      # 0x817e
movq %rdx, %rsi
callq 0x68ca
movl $0x4, %esi
leaq -0x90(%rbp), %rdi
movq %r15, %rdx
leaq -0x70(%rbp), %rcx
callq 0x604c
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x3b83
callq 0x32b0
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rbx, -0xe0(%rbp)
movq %r12, %rdi
callq 0x3430
movl %eax, %eax
cmpq %rax, %r15
jae 0x3be4
movq (%rbx,%r15,8), %r13
movq -0x90(%rbp), %r12
movq 0x8(%r12,%r14), %rbx
addq %r14, %r12
movq %r13, %rdi
callq 0x3110
movq %r12, %rdi
movq -0xd8(%rbp), %r12
xorl %esi, %esi
movq %rbx, %rdx
movq -0xe0(%rbp), %rbx
movq %r13, %rcx
movq %rax, %r8
callq 0x3410
incq %r15
addq $0x20, %r14
jmp 0x3b90
movq -0x90(%rbp), %rax
leaq -0x60(%rbp), %rbx
movq %rbx, -0x70(%rbp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x66b6
movq %r15, %rdi
leaq 0x460c(%rip), %rsi      # 0x8220
callq 0x34d0
leaq -0x38(%rbp), %r14
movq %r15, %rdi
leaq -0x48(%rbp), %r15
movq -0x90(%rbp), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
callq 0x30c0
movq %r14, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3c58
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x3c5f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x6a26
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x3c90
callq 0x32b0
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3c9e
callq 0x32b0
leaq -0x90(%rbp), %rdi
callq 0x60e2
jmp 0x3b33
movq 0x7322(%rip), %rdi      # 0xafd8
leaq 0x4377(%rip), %rsi      # 0x8034
callq 0x32e0
jmp 0x3cd7
movq 0x730d(%rip), %rdi      # 0xafd8
leaq 0x4362(%rip), %rsi      # 0x8034
callq 0x32e0
movl $0x1, %edi
callq 0x3390
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3cfb
callq 0x32b0
jmp 0x3cfb
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x3d11
callq 0x32b0
jmp 0x3d11
movq %rax, %r14
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3d9f
jmp 0x3dba
jmp 0x3da6
jmp 0x3d47
movq %rax, %r14
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x3de0
jmp 0x3d3f
movq %rax, %r14
jmp 0x3dea
movq %rax, %r14
jmp 0x3dd2
jmp 0x3da6
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x3d85
jmp 0x3dae
movq %rax, %r14
jmp 0x3d78
movq %r14, %rcx
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rcx, %rdi
je 0x3d78
callq 0x32b0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3dae
callq 0x32b0
jmp 0x3dae
jmp 0x3dab
jmp 0x3da6
movq %r14, %rcx
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rcx, %rdi
je 0x3dba
callq 0x32b0
jmp 0x3dba
movq %rax, %r14
jmp 0x3dba
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x60e2
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3dd2
callq 0x32b0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x3dea
callq 0x32b0
movq -0x50(%rbp), %rdi
callq 0x60e2
movq %r14, %rdi
callq 0x3480