// File: QZzcoder[P]LiveChat/server.cpp
// Function: storeMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool storeMessage(string origin,string target,string msg){
    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 = "insert into message values("+to_string(timeStamp())
                +",\'"+origin+"\',\'"+target+"\',\'"+msg+"\');";

    return !mysql_query(&mysql_conn,sql.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x620, %rsp            # imm = 0x620
movq %rdi, -0x5f8(%rbp)
movq %rsi, -0x5f0(%rbp)
movq %rdx, -0x5e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x3160
leaq -0x4a0(%rbp), %rdi
leaq 0xa06e(%rip), %rsi      # 0xe004
leaq 0xa071(%rip), %rdx      # 0xe00e
leaq 0x1131c(%rip), %rcx     # 0x152c0
leaq 0xa068(%rip), %r8       # 0xe013
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x3190
cmpq $0x0, %rax
jne 0x3fe9
movq 0x11005(%rip), %rdi     # 0x14fd8
leaq 0xa03e(%rip), %rsi      # 0xe018
callq 0x3310
movl $0x1, %edi
callq 0x33b0
callq 0xcef0
movq %rax, %rsi
leaq -0x5d0(%rbp), %rdi
movq %rdi, -0x600(%rbp)
callq 0x66e0
movq -0x600(%rbp), %rdx
leaq 0xa075(%rip), %rsi      # 0xe087
leaq -0x5b0(%rbp), %rdi
callq 0x6690
jmp 0x4020
leaq 0xa07d(%rip), %rdx      # 0xe0a4
leaq -0x590(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x62f0
jmp 0x403c
movq -0x5f8(%rbp), %rdx
leaq -0x570(%rbp), %rdi
leaq -0x590(%rbp), %rsi
callq 0x6450
jmp 0x4058
leaq 0xa044(%rip), %rdx      # 0xe0a3
leaq -0x550(%rbp), %rdi
leaq -0x570(%rbp), %rsi
callq 0x62f0
jmp 0x4074
movq -0x5f0(%rbp), %rdx
leaq -0x530(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x6450
jmp 0x4090
leaq 0xa00c(%rip), %rdx      # 0xe0a3
leaq -0x510(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x62f0
jmp 0x40ac
movq -0x5e8(%rbp), %rdx
leaq -0x4f0(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x6450
jmp 0x40c8
leaq 0x9fd8(%rip), %rdx      # 0xe0a7
leaq -0x4d0(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x62f0
jmp 0x40e4
leaq -0x4f0(%rbp), %rdi
callq 0x3200
leaq -0x510(%rbp), %rdi
callq 0x3200
leaq -0x530(%rbp), %rdi
callq 0x3200
leaq -0x550(%rbp), %rdi
callq 0x3200
leaq -0x570(%rbp), %rdi
callq 0x3200
leaq -0x590(%rbp), %rdi
callq 0x3200
leaq -0x5b0(%rbp), %rdi
callq 0x3200
leaq -0x5d0(%rbp), %rdi
callq 0x3200
leaq -0x4d0(%rbp), %rdi
callq 0x3120
movq %rax, %rsi
leaq -0x4a0(%rbp), %rdi
callq 0x3210
movl %eax, -0x604(%rbp)
jmp 0x4167
movl -0x604(%rbp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x605(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x3200
movb -0x605(%rbp), %al
andb $0x1, %al
addq $0x620, %rsp            # imm = 0x620
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x4293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x4287
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x427b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x426f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x4263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x4257
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
jmp 0x424b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x3200
leaq -0x510(%rbp), %rdi
callq 0x3200
leaq -0x530(%rbp), %rdi
callq 0x3200
leaq -0x550(%rbp), %rdi
callq 0x3200
leaq -0x570(%rbp), %rdi
callq 0x3200
leaq -0x590(%rbp), %rdi
callq 0x3200
leaq -0x5b0(%rbp), %rdi
callq 0x3200
leaq -0x5d0(%rbp), %rdi
callq 0x3200
jmp 0x42bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x5d8(%rbp)
movl %eax, -0x5dc(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x3200
movq -0x5d8(%rbp), %rdi
callq 0x34d0
nopl (%rax,%rax)