// File: QZzcoder[P]LiveChat/server.cpp
// Function: userCheck(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 userCheck(string name,string password){
    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 * from User where name = \"" + name + "\" and password = "+password+";";
    if(!mysql_query(&mysql_conn,sql.c_str())){
        ptr_res = mysql_use_result(&mysql_conn);
        return mysql_fetch_row(ptr_res)!=NULL;
    }
    cout<<"query error"<<endl;
    mysql_close(&mysql_conn);
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x590, %rsp            # imm = 0x590
movq %rdi, -0x550(%rbp)
movq %rsi, -0x548(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x3160
leaq -0x4a0(%rbp), %rdi
leaq 0x9aa9(%rip), %rsi      # 0xe004
leaq 0x9aac(%rip), %rdx      # 0xe00e
leaq 0x10d57(%rip), %rcx     # 0x152c0
leaq 0x9aa3(%rip), %r8       # 0xe013
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x3190
cmpq $0x0, %rax
jne 0x45ae
movq 0x10a40(%rip), %rdi     # 0x14fd8
leaq 0x9a79(%rip), %rsi      # 0xe018
callq 0x3310
movl $0x1, %edi
callq 0x33b0
movq -0x550(%rbp), %rdx
leaq 0x9b1c(%rip), %rsi      # 0xe0d8
leaq -0x530(%rbp), %rdi
movq %rdi, -0x558(%rbp)
callq 0x6340
movq -0x558(%rbp), %rsi
leaq 0x9b1d(%rip), %rdx      # 0xe0fa
leaq -0x510(%rbp), %rdi
callq 0x62f0
jmp 0x45eb
movq -0x548(%rbp), %rdx
leaq -0x4f0(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x6450
jmp 0x4607
leaq 0x9a42(%rip), %rdx      # 0xe050
leaq -0x4d0(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x62f0
jmp 0x4623
leaq -0x4f0(%rbp), %rdi
callq 0x3200
leaq -0x510(%rbp), %rdi
callq 0x3200
leaq -0x530(%rbp), %rdi
callq 0x3200
leaq -0x4d0(%rbp), %rdi
callq 0x3120
movq %rax, %rsi
leaq -0x4a0(%rbp), %rdi
callq 0x3210
movl %eax, -0x55c(%rbp)
jmp 0x466a
movl -0x55c(%rbp), %eax
cmpl $0x0, %eax
jne 0x4756
leaq -0x4a0(%rbp), %rdi
callq 0x3510
movq %rax, -0x568(%rbp)
jmp 0x468e
movq -0x568(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movq -0x4a8(%rbp), %rdi
callq 0x3340
movq %rax, -0x570(%rbp)
jmp 0x46b1
movq -0x570(%rbp), %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x540(%rbp)
jmp 0x47a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x538(%rbp)
movl %eax, -0x53c(%rbp)
jmp 0x4725
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x538(%rbp)
movl %eax, -0x53c(%rbp)
jmp 0x4719
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x538(%rbp)
movl %eax, -0x53c(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x3200
leaq -0x510(%rbp), %rdi
callq 0x3200
leaq -0x530(%rbp), %rdi
callq 0x3200
jmp 0x47bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x538(%rbp)
movl %eax, -0x53c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x3200
jmp 0x47bd
movq 0x1087b(%rip), %rdi     # 0x14fd8
leaq 0x99a8(%rip), %rsi      # 0xe10c
callq 0x3310
movq %rax, -0x578(%rbp)
jmp 0x4772
movq -0x578(%rbp), %rdi
movq 0x10840(%rip), %rsi     # 0x14fc0
callq 0x3370
jmp 0x4787
leaq -0x4a0(%rbp), %rdi
callq 0x33d0
jmp 0x4795
movb $0x0, -0x1(%rbp)
movl $0x1, -0x540(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x3200
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x590, %rsp            # imm = 0x590
popq %rbp
retq
movq -0x538(%rbp), %rdi
callq 0x34d0
nopl (%rax)