// File: /workspace/github_cpp_makefile_star2_O1/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 0x4354
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x107e7(%rip), %rsi     # 0x14004
leaq 0x107e9(%rip), %rdx     # 0x1400d
leaq 0x108(%rsp), %rdi
callq 0x42a6
leaq 0x20(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x10a61(%rip), %rdx     # 0x142a2
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x42a6
leaq 0xa0(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0x10(%rsp), %rcx
movl $0x18eb, %edx           # imm = 0x18EB
callq 0x441e
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x387c
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x388e
callq 0x3350
leaq 0xa0(%rsp), %rdi
callq 0x444a
leaq 0x40(%rsp), %r12
movb $0x61, 0xb(%rsp)
leaq 0x50(%rsp), %r13
leaq 0x108(%rsp), %r14
leaq 0x68(%rsp), %rbp
movl $0xc350, %esi           # imm = 0xC350
movq %r13, %rdi
movq %r14, %rdx
callq 0x4126
movl $0xc350, %esi           # imm = 0xC350
movq %rbp, %rdi
movq %r14, %rdx
callq 0x4126
movl $0x0, 0xc(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x3b9f
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x41b0
movslq 0xc(%rsp), %rdi
shlq $0x5, %rdi
addq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x3440
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x392c
callq 0x3350
movslq 0xc(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x5, %rax
cmpq $0x7, 0x8(%rcx,%rax)
ja 0x3ab2
movq %r15, 0x108(%rsp)
movq %r14, %rdi
leaq 0x106b6(%rip), %rsi     # 0x1400e
leaq 0x106b7(%rip), %rdx     # 0x14016
callq 0x42a6
movslq 0xc(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rdx
leaq 0x80(%rsp), %r13
movq %r13, %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 %r13, %rdi
callq 0x3110
movq %r12, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x39d3
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x39db
movups (%rcx), %xmm0
movups %xmm0, (%r12)
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 0x3a32
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x3a38
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 0x3a77
callq 0x3350
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a86
callq 0x3350
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3aa0
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ab2
callq 0x3350
movslq 0xc(%rsp), %rdi
shlq $0x5, %rdi
movq 0x50(%rsp), %rsi
addq %rdi, %rsi
addq 0x68(%rsp), %rdi
callq 0x3200
movq %rbp, %r14
movq %r12, %r13
movq %rbx, %rbp
movslq 0xc(%rsp), %rax
movq 0x68(%rsp), %rdx
shlq $0x5, %rax
leaq (%rdx,%rax), %rcx
movq 0x8(%rdx,%rax), %r15
testq %r15, %r15
je 0x3b28
xorl %eax, %eax
movq (%rcx), %rcx
movb (%rcx,%rax), %dl
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x3b09
addb $0x31, %dl
movb %dl, (%rcx,%rax)
incq %rax
movslq 0xc(%rsp), %rdx
movq 0x68(%rsp), %rsi
shlq $0x5, %rdx
leaq (%rsi,%rdx), %rcx
movq 0x8(%rsi,%rdx), %r15
cmpq %rax, %r15
ja 0x3af4
cmpq $0x2, %r15
jb 0x3b63
movq (%rcx), %r12
movl $0x1, %ebx
callq 0x30e0
cltq
leaq 0x1(%rbx), %rcx
cqto
idivq %rcx
cmpq %rdx, %rbx
je 0x3b5b
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 0x3b36
movslq 0xc(%rsp), %rax
incq %rax
movl %eax, 0xc(%rsp)
movq 0x58(%rsp), %rcx
subq 0x50(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
movq %rbp, %rbx
leaq 0x118(%rsp), %r15
movq %r13, %r12
movq %r14, %rbp
leaq 0x108(%rsp), %r14
ja 0x38ef
leaq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x61ae
movq %rbp, %rdi
callq 0x4262
movq %r13, %rdi
callq 0x4262
movb 0xb(%rsp), %al
incb %al
movb %al, 0xb(%rsp)
cmpb $0x7b, %al
jne 0x38b7
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x108(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1070e(%rip), %rsi     # 0x1430a
leaq 0x1070d(%rip), %rdx     # 0x14310
callq 0x42a6
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x1068b(%rip), %rdx     # 0x142a2
movq %rdx, %rsi
callq 0x42a6
leaq 0xa0(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %r8
movl $0x2710, %ecx           # imm = 0x2710
callq 0x5594
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3c52
callq 0x3350
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x3c64
callq 0x3350
leaq 0x108(%rsp), %rdi
callq 0x3580
leaq 0x1039f(%rip), %rsi     # 0x14017
leaq 0x108(%rsp), %rdi
movl $0x20, %edx
callq 0x3060
leaq 0x10396(%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 0x3d91
movl $0x1, %ebp
movl $0x8, %r15d
xorl %r12d, %r12d
movl $0xcccccccd, %r13d      # imm = 0xCCCCCCCD
leaq 0x10eed(%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 0x3d6e
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 0x3d05
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 0x62e8
leaq 0x101c9(%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 0x3f50
movl $0x1, %ebp
movl $0x8, %r15d
xorl %r12d, %r12d
leaq 0x10d18(%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 0x3f31
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 0x3eda
movq 0x16081(%rip), %rdi     # 0x19fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq 0x16066(%rip), %rdi     # 0x19fd8
callq 0x3030
movq %rax, %rdi
callq 0x3280
leaq 0x10(%rsp), %rdi
callq 0x4262
movq 0x16040(%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 0x4262
leaq 0xa0(%rsp), %rdi
callq 0x43bc
xorl %eax, %eax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4025
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4005
callq 0x3350
jmp 0x4005
movq %rax, %r14
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x40a4
callq 0x3350
jmp 0x40a4
movq %rax, %r14
jmp 0x40a4
jmp 0x4075
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4043
callq 0x3350
jmp 0x4043
movq %rax, %r14
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x4110
callq 0x3350
jmp 0x4110
jmp 0x4075
jmp 0x4085
jmp 0x4085
jmp 0x4094
jmp 0x4094
jmp 0x40f9
movq %rax, %r14
jmp 0x4110
movq %rax, %r14
jmp 0x4106
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4262
jmp 0x4097
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x34c0
leaq 0x30(%rsp), %rdi
jmp 0x410b
jmp 0x40f9
movq %rax, %r14
jmp 0x40c4
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x40c4
callq 0x3350
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x40e3
callq 0x3350
jmp 0x40e3
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x40fc
callq 0x3350
jmp 0x40fc
jmp 0x40f9
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x4262
leaq 0x50(%rsp), %rdi
callq 0x4262
leaq 0xa0(%rsp), %rdi
callq 0x43bc
movq %r14, %rdi
callq 0x35b0
nop