// File: /workspace/github_cpp_makefile_star2_O2/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 $0x568, %rsp            # imm = 0x568
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
andq $0x0, 0x10(%rdi)
leaq -0x578(%rbp), %rdi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x3894(%rip), %rsi      # 0x7020
leaq 0x3897(%rip), %rdx      # 0x702a
leaq 0x7ad6(%rip), %rcx      # 0xb270
leaq 0x388e(%rip), %r8       # 0x702f
leaq -0x578(%rbp), %rdi
xorl %r9d, %r9d
callq 0x3170
testq %rax, %rax
je 0x3a3e
leaq 0x3880(%rip), %rsi      # 0x7040
leaq -0x70(%rbp), %rdi
movq %r14, %rdx
callq 0x4ee9
leaq 0x3898(%rip), %rdx      # 0x706b
leaq -0xf0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4ec0
leaq -0x70(%rbp), %rdi
callq 0x3110
movq -0xf0(%rbp), %rsi
leaq -0x578(%rbp), %rdi
callq 0x31d0
leaq -0x578(%rbp), %rdi
callq 0x3470
movq %rax, %rdi
callq 0x32e0
movq (%rax), %rsi
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x30e0
leaq -0x578(%rbp), %rdi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x37e0(%rip), %rsi      # 0x7020
leaq 0x37e3(%rip), %rdx      # 0x702a
leaq 0x7a22(%rip), %rcx      # 0xb270
leaq 0x37da(%rip), %r8       # 0x702f
leaq -0x578(%rbp), %rdi
xorl %r9d, %r9d
callq 0x3170
testq %rax, %rax
je 0x3a53
leaq 0x37fa(%rip), %rsi      # 0x706e
leaq -0xd0(%rbp), %rdi
movq %r14, %rdx
callq 0x4ee9
leaq 0x380b(%rip), %rdx      # 0x7095
leaq -0x50(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4ec0
leaq -0xb0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x4f5f
leaq 0x37b7(%rip), %rdx      # 0x706c
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4ec0
leaq -0xf0(%rbp), %rbx
leaq -0x90(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3350
movq %r14, %rdi
callq 0x3110
leaq -0xb0(%rbp), %rdi
callq 0x3110
leaq -0x50(%rbp), %rdi
callq 0x3110
leaq -0xd0(%rbp), %rdi
callq 0x3110
movq (%rbx), %rsi
leaq -0x578(%rbp), %rdi
callq 0x31d0
testl %eax, %eax
je 0x3954
leaq -0x578(%rbp), %rdi
callq 0x3370
leaq -0x70(%rbp), %rdi
callq 0x3110
leaq -0xf0(%rbp), %rdi
callq 0x3110
movq -0x30(%rbp), %rax
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x578(%rbp), %rdi
callq 0x3470
movq %rax, %r14
testq %rax, %rax
je 0x391d
leaq -0x90(%rbp), %r13
leaq -0xb0(%rbp), %r12
movq %r14, %rdi
callq 0x32e0
movq %rax, %r15
testq %rax, %rax
je 0x391d
movq %r13, %rdi
leaq 0x37ee(%rip), %rsi      # 0x717e
movq %r12, %rdx
callq 0x30e0
leaq -0x50(%rbp), %rdi
pushq $0x4
popq %rsi
movq %r13, %rdx
leaq -0xd0(%rbp), %rcx
callq 0x4f88
movq %r13, %rdi
callq 0x3110
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x33f0
movl %eax, %eax
cmpq %rax, %r13
jae 0x39e3
movq (%r15,%r13,8), %rsi
movq -0x50(%rbp), %rdi
addq %rbx, %rdi
callq 0x3490
incq %r13
addq $0x20, %rbx
jmp 0x39bb
movq -0x50(%rbp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
leaq 0x382b(%rip), %rdx      # 0x7220
callq 0x4fe8
movq -0x50(%rbp), %rdx
addq $0x60, %rdx
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x4f5f
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x5a3a
movq %r13, %rdi
callq 0x3110
movq %r12, %rdi
callq 0x3110
leaq -0x50(%rbp), %rdi
callq 0x5020
jmp 0x3976
movq 0x7593(%rip), %rdi      # 0xafd8
leaq 0x35e8(%rip), %rsi      # 0x7034
callq 0x32b0
jmp 0x3a66
movq 0x757e(%rip), %rdi      # 0xafd8
leaq 0x35d3(%rip), %rsi      # 0x7034
callq 0x32b0
pushq $0x1
popq %rdi
callq 0x3340
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x3110
jmp 0x3a82
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x3110
jmp 0x3a90
movq %rax, %r14
leaq -0xd0(%rbp), %rdi
jmp 0x3ae4
jmp 0x3aeb
jmp 0x3aad
movq %rax, %r14
leaq -0x70(%rbp), %rdi
jmp 0x3b0c
jmp 0x3aa8
movq %rax, %r14
jmp 0x3b11
movq %rax, %r14
jmp 0x3b05
jmp 0x3aeb
jmp 0x3af0
movq %rax, %r14
jmp 0x3aca
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x3110
leaq -0xb0(%rbp), %rdi
callq 0x3110
jmp 0x3af3
jmp 0x3aeb
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x3110
jmp 0x3afc
movq %rax, %r14
jmp 0x3afc
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x5020
leaq -0x70(%rbp), %rdi
callq 0x3110
leaq -0xf0(%rbp), %rdi
callq 0x3110
movq -0x30(%rbp), %rdi
callq 0x5020
movq %r14, %rdi
callq 0x3440