// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: http_conn::initresultFile(connection_pool*)
void http_conn::initresultFile(connection_pool *connPool)
{
    ofstream out("./CGImysql/id_passwd.txt");
    //先从连接池中取一个连接
    MYSQL *mysql = NULL;
    connectionRAII mysqlcon(&mysql, connPool);

    //在user表中检索username，passwd数据，浏览器端输入
    if (mysql_query(mysql, "SELECT username,passwd FROM user"))
    {
        LOG_ERROR("SELECT error:%s\n", mysql_error(mysql));
    }

    //从表中检索完整的结果集
    MYSQL_RES *result = mysql_store_result(mysql);

    //返回结果集中的列数
    int num_fields = mysql_num_fields(result);

    //返回所有字段结构的数组
    MYSQL_FIELD *fields = mysql_fetch_fields(result);

    //从结果集中获取下一行，将对应的用户名和密码，存入map中
    while (MYSQL_ROW row = mysql_fetch_row(result))
    {
        string temp1(row[0]);
        string temp2(row[1]);
        out << temp1 << " " << temp2 << endl;
        users[temp1] = temp2;
    }

    out.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5d2f(%rip), %rsi      # 0xa24d
leaq 0x68(%rsp), %rdi
movl $0x10, %edx
callq 0x3460
leaq 0x10(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x58(%rsp), %rdi
movq %r14, %rdx
callq 0x79b6
movq 0x10(%rsp), %rdi
leaq 0x5cc9(%rip), %rsi      # 0xa21b
callq 0x32e0
testl %eax, %eax
je 0x459c
cmpl $0x0, 0xe38(%rbx)
jne 0x459c
callq 0x629e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x3190
leaq 0x5cbf(%rip), %rdx      # 0xa23c
movq %rbx, %rdi
movl $0x3, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x6df4
callq 0x629e
movq %rax, %rdi
callq 0x7216
movq 0x10(%rsp), %rdi
callq 0x3230
movq %rax, %rbx
movq %rax, %rdi
callq 0x3660
movq %rbx, %rdi
callq 0x3480
leaq 0x38(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0x9ece(%rip), %r12      # 0xe498
movq %rbx, %rdi
callq 0x3440
movq %rax, %r13
testq %rax, %rax
je 0x46bc
movq (%r13), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x630e
movq 0x8(%r13), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x630e
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x34c0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5ec1(%rip), %rsi      # 0xa4e5
callq 0x34c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %rdi
callq 0x34c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x32f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x634c
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x4697
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x46b3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3430
testq %r13, %r13
jne 0x45ca
leaq 0x68(%rsp), %rdi
callq 0x35c0
leaq 0x58(%rsp), %rdi
callq 0x79dc
movq 0x98e9(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x70(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x68(%rsp,%rcx)
callq 0x3380
leaq 0x160(%rsp), %rdi
callq 0x3130
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4728
jmp 0x4728
movq %rax, %rbx
jmp 0x4772
jmp 0x4728
jmp 0x4728
jmp 0x4728
movq %rax, %rbx
jmp 0x474c
movq %rax, %rbx
jmp 0x4768
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x474c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4768
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3430
leaq 0x58(%rsp), %rdi
callq 0x79dc
leaq 0x68(%rsp), %rdi
callq 0x3600
movq %rbx, %rdi
callq 0x36e0