// File: /workspace/github_cpp_makefile_star2_O1/QZzcoder[P]LiveChat/server.cpp
// Function: newUser(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 newUser(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 + "\"";
    mysql_query(&mysql_conn,sql.c_str());
    ptr_res = mysql_store_result(&mysql_conn);
    if(!ptr_res){return false;}

    sql = "insert into User values(\""+name+"\",\""+password+"\",0);";
    return !mysql_query(&mysql_conn,sql.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x538, %rsp            # imm = 0x538
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x550(%rbp), %r15
movq %r15, %rdi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x35f6(%rip), %rsi      # 0x8020
leaq 0x35f9(%rip), %rdx      # 0x802a
leaq 0x6850(%rip), %rcx      # 0xb288
leaq 0x35f0(%rip), %r8       # 0x802f
movq %r15, %rdi
xorl %r9d, %r9d
callq 0x3170
testq %rax, %rax
je 0x4c9f
leaq 0x369a(%rip), %rsi      # 0x80f4
leaq -0x68(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x5fc0
leaq 0x36a4(%rip), %rsi      # 0x8114
movq %r15, %rdi
callq 0x34d0
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4a9c
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x4aa3
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x58(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x4acd
callq 0x32b0
movq -0x48(%rbp), %rsi
leaq -0x550(%rbp), %rdi
callq 0x31d0
leaq -0x550(%rbp), %rdi
callq 0x3180
testq %rax, %rax
je 0x4b3e
leaq 0x363f(%rip), %rsi      # 0x8134
leaq -0xc8(%rbp), %rdi
movq %r14, %rdx
callq 0x5fc0
leaq 0x3643(%rip), %rsi      # 0x814e
leaq -0xc8(%rbp), %rdi
callq 0x34d0
leaq -0x78(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b45
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x4b4c
xorl %ebx, %ebx
jmp 0x4c7d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x88(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x30c0
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4ba3
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x4bab
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0xa8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3582(%rip), %rsi      # 0x8152
callq 0x34d0
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4bf5
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4bfd
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x33a0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x4c31
callq 0x32b0
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x4c42
callq 0x32b0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x4c53
callq 0x32b0
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c68
callq 0x32b0
movq -0x48(%rbp), %rsi
leaq -0x550(%rbp), %rdi
callq 0x31d0
testl %eax, %eax
sete %bl
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4c8b
callq 0x32b0
movl %ebx, %eax
addq $0x538, %rsp            # imm = 0x538
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6332(%rip), %rdi      # 0xafd8
leaq 0x3387(%rip), %rsi      # 0x8034
callq 0x32e0
movl $0x1, %edi
callq 0x3390
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x4cd5
callq 0x32b0
jmp 0x4cd5
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x4ceb
callq 0x32b0
jmp 0x4ceb
movq %rax, %rbx
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d19
callq 0x32b0
jmp 0x4d19
jmp 0x4d16
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4d22
jmp 0x4d27
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d27
callq 0x32b0
movq %rbx, %rdi
callq 0x3480