// File: /workspace/github_cpp_makefile_star2_O3/Sherhang[P]redis-for-cpp/demo5.cpp
// Function: main
int main()
{
    Redis redis;
    redis.init("127.0.0.1",6379,"");
    redis.connect();
    for(char k='a';k<='z';++k)
    {
    vector<string> keys(50000);
    vector<string> vals(50000);
    for (int i =0; i<keys.size(); ++i)
    {
        keys[i] = redis.num2str<int>(i);
        if(keys[i].size()<8)
        {
            string num = "00000000";
            keys[i]=num.substr(keys[i].size()) + keys[i] + k ;
        }
        vals[i]= keys[i];
        for(int j =0;j<vals[i].size();++j)
        {
            if(vals[i][j]<='9'&& vals[i][j]>='0')
                vals[i][j]=vals[i][j]-'0'+'a';
        }
        random_shuffle(vals[i].begin(),vals[i].end());//打乱
    }
    //cout<<keys[987]<<" "<<vals[987]<<endl;
    redis.mset(keys,vals);

    }
    vector<string> v;
    redis.getKeys("string", "", 10000, v);
    //redis.keys("*",v);
    
    ofstream file_for_write;
    file_for_write.open("./file/data.txt", ios::trunc);
    file_for_write << "get all keys:"<<endl;
    int ka=1;
    for(int i=0;i<v.size();++i,++ka)
    {
        file_for_write << v[i] <<" ";
        if(ka%10 ==0)
            file_for_write<<endl;
    }
    file_for_write<<endl<<endl<<endl<<endl;
    vector<string> vs;
    redis.mget(v, vs);
    file_for_write<<"get values:"<<endl;
    int kt=1;
    for(int i=0;i<vs.size();++i,++kt)
    {
        file_for_write << vs[i] << " ";
        if(kt >= 10)
        {
            kt = 0x01;
            file_for_write<<endl;
        }
    }

    cout<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
leaq 0xa0(%rsp), %rdi
callq 0x436c
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x107e6(%rip), %rsi     # 0x14004
leaq 0x107e8(%rip), %rdx     # 0x1400d
leaq 0x108(%rsp), %rdi
callq 0x42ba
leaq 0x20(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x10a60(%rip), %rdx     # 0x142a2
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x42ba
leaq 0xa0(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0x10(%rsp), %rcx
movl $0x18eb, %edx           # imm = 0x18EB
callq 0x4436
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x387d
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x388f
callq 0x3350
leaq 0xa0(%rsp), %rdi
callq 0x4462
leaq 0x40(%rsp), %rbp
movb $0x61, 0xb(%rsp)
leaq 0x50(%rsp), %r15
leaq 0x108(%rsp), %r14
leaq 0x68(%rsp), %r13
movl $0xc350, %esi           # imm = 0xC350
movq %r15, %rdi
movq %r14, %rdx
callq 0x4132
movl $0xc350, %esi           # imm = 0xC350
movq %r13, %rdi
movq %r14, %rdx
callq 0x4132
movl $0x0, 0xc(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x3bac
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x41be
movslq 0xc(%rsp), %rdi
shlq $0x5, %rdi
addq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x3440
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x392d
callq 0x3350
movslq 0xc(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rdi, %rax
shlq $0x5, %rax
cmpq $0x7, 0x8(%rsi,%rax)
ja 0x3abf
movq %r12, 0x108(%rsp)
movq %r14, %rdi
leaq 0x106b2(%rip), %rsi     # 0x1400e
leaq 0x106b3(%rip), %rdx     # 0x14016
callq 0x42ba
movslq 0xc(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rdx
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x3390
movslq 0xc(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r15, %rdi
callq 0x3110
movq %rbp, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x39d7
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x39de
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rsi
movsbl 0xb(%rsp), %r8d
movl $0x1, %ecx
leaq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x35f0
movq %rbx, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a35
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x3a3b
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movslq 0xc(%rsp), %rdi
shlq $0x5, %rdi
addq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3440
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3a7a
callq 0x3350
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3a89
callq 0x3350
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3aa3
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ab5
callq 0x3350
movslq 0xc(%rsp), %rdi
movq 0x50(%rsp), %rsi
shlq $0x5, %rdi
addq %rdi, %rsi
addq 0x68(%rsp), %rdi
callq 0x3200
movslq 0xc(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rax, %rsi
shlq $0x5, %rsi
cmpq $0x0, 0x8(%rcx,%rsi)
je 0x3b8d
addq %rcx, %rsi
xorl %edx, %edx
movq (%rsi), %rsi
movb (%rsi,%rdx), %dil
leal -0x30(%rdi), %r8d
cmpb $0x9, %r8b
ja 0x3b14
addb $0x31, %dil
movb %dil, (%rsi,%rdx)
movl 0xc(%rsp), %eax
movq 0x68(%rsp), %rcx
incq %rdx
movslq %eax, %rdi
shlq $0x5, %rdi
leaq (%rcx,%rdi), %rsi
movq 0x8(%rcx,%rdi), %r15
cmpq %rdx, %r15
ja 0x3af2
cmpq $0x2, %r15
jb 0x3b8d
movq %r13, %r14
movq %rbp, %r13
movq %rbx, %rbp
movq (%rsi), %r12
movl $0x1, %ebx
callq 0x30e0
cltq
leaq 0x1(%rbx), %rcx
cqto
idivq %rcx
cmpq %rdx, %rbx
je 0x3b68
addq %r12, %rbx
addq %r12, %rdx
movb (%rbx), %al
movb (%rdx), %sil
movb %sil, (%rbx)
movb %al, (%rdx)
movq %rcx, %rbx
cmpq %rcx, %r15
jne 0x3b43
movl 0xc(%rsp), %eax
movq %rbp, %rbx
leaq 0x118(%rsp), %r12
movq %r13, %rbp
movq %r14, %r13
leaq 0x108(%rsp), %r14
incl %eax
movl %eax, 0xc(%rsp)
cltq
movq 0x58(%rsp), %rcx
subq 0x50(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
ja 0x38f0
leaq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x6158
movq %r13, %rdi
callq 0x4270
movq %r15, %rdi
callq 0x4270
movb 0xb(%rsp), %al
incb %al
movb %al, 0xb(%rsp)
cmpb $0x7b, %al
jne 0x38b8
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x108(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x10701(%rip), %rsi     # 0x1430a
leaq 0x10700(%rip), %rdx     # 0x14310
callq 0x42ba
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x1067e(%rip), %rdx     # 0x142a2
movq %rdx, %rsi
callq 0x42ba
leaq 0xa0(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %r8
movl $0x2710, %ecx           # imm = 0x2710
callq 0x5574
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3c5f
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c71
callq 0x3350
leaq 0x108(%rsp), %rdi
callq 0x3580
leaq 0x10392(%rip), %rsi     # 0x14017
leaq 0x108(%rsp), %rdi
movl $0x20, %edx
callq 0x3060
leaq 0x10389(%rip), %rsi     # 0x14027
leaq 0x108(%rsp), %rbx
movl $0xd, %edx
movq %rbx, %rdi
callq 0x33f0
movq 0x108(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0x3d9e
movl $0x1, %ebp
movl $0x8, %r15d
xorl %r12d, %r12d
movl $0xcccccccd, %r13d      # imm = 0xCCCCCCCD
leaq 0x10ee0(%rip), %r14     # 0x14bf2
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x33f0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x33f0
movl %ebp, %eax
imulq %r13, %rax
shrq $0x23, %rax
leal (%rax,%rax,4), %eax
leal -0x2(,%rax,2), %eax
incq %rax
cmpl %r12d, %eax
jne 0x3d7b
movq 0x108(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
incq %r12
incl %ebp
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
cmpq %r12, %rcx
ja 0x3d12
movq 0x108(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
leaq 0x108(%rsp), %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6276
leaq 0x101bc(%rip), %rsi     # 0x14035
leaq 0x108(%rsp), %rbx
movl $0xb, %edx
movq %rbx, %rdi
callq 0x33f0
movq 0x108(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x3f5d
movl $0x1, %ebp
movl $0x8, %r15d
xorl %r12d, %r12d
leaq 0x10d0b(%rip), %r14     # 0x14bf2
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x33f0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x33f0
cmpl $0xa, %ebp
jl 0x3f3e
movq 0x108(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movl $0x1, %ebp
movq %rax, %rdi
callq 0x3280
incq %r12
incl %ebp
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
cmpq %r12, %rcx
ja 0x3ee7
movq 0x16074(%rip), %rdi     # 0x19fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq 0x16059(%rip), %rdi     # 0x19fd8
callq 0x3030
movq %rax, %rdi
callq 0x3280
leaq 0x10(%rsp), %rdi
callq 0x4270
movq 0x16033(%rip), %rax     # 0x19fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x110(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x108(%rsp,%rcx)
callq 0x3330
leaq 0x200(%rsp), %rdi
callq 0x3130
leaq 0x30(%rsp), %rdi
callq 0x4270
leaq 0xa0(%rsp), %rdi
callq 0x43d4
xorl %eax, %eax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4032
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4012
callq 0x3350
jmp 0x4012
movq %rax, %r14
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x40b1
callq 0x3350
jmp 0x40b1
movq %rax, %r14
jmp 0x40b1
jmp 0x4082
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4050
callq 0x3350
jmp 0x4050
movq %rax, %r14
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x411d
callq 0x3350
jmp 0x411d
jmp 0x4082
jmp 0x4092
jmp 0x4092
jmp 0x40a1
jmp 0x40a1
jmp 0x4106
movq %rax, %r14
jmp 0x411d
movq %rax, %r14
jmp 0x4113
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4270
jmp 0x40a4
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x34c0
leaq 0x30(%rsp), %rdi
jmp 0x4118
jmp 0x4106
movq %rax, %r14
jmp 0x40d1
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x40d1
callq 0x3350
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x40f0
callq 0x3350
jmp 0x40f0
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x4109
callq 0x3350
jmp 0x4109
jmp 0x4106
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x4270
leaq 0x50(%rsp), %rdi
callq 0x4270
leaq 0xa0(%rsp), %rdi
callq 0x43d4
movq %r14, %rdi
callq 0x35b0