// File: /workspace/github_cpp_makefile_star2_O1/Sherhang[P]redis-for-cpp/credis.cpp
// Function: Redis::scan(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int32_t Redis::scan(int32_t cursor, const std::string& pattern, int32_t count, std::vector<std::string>& keys)
{
    std::string cmd = "SCAN "  + num2str<int32_t>(cursor)
                    + (pattern.empty() ? "" : (" MATCH " + pattern))
                    + (count < 0 ? "" : " COUNT " + num2str<int32_t>(count));
    return execScan(cmd, keys);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %rbx
movq %rdx, %r15
movq %rdi, %r14
leaq 0xb4(%rsp), %rdx
movl %esi, (%rdx)
movl %ecx, 0xc(%rsp)
leaq 0xd8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x41b0
leaq 0xf1db(%rip), %rcx      # 0x141f5
movl $0x5, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x505d
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x5065
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
cmpq $0x0, 0x8(%r15)
je 0x509d
leaq 0xf087(%rip), %rsi      # 0x14115
leaq 0x70(%rsp), %rdi
movq %r15, %rdx
callq 0xa756
jmp 0x50bd
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf1f2(%rip), %rdx      # 0x142a2
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0x42a6
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %r8
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x50e8
movq 0xa0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x510d
leaq 0x80(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5108
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5121
movq 0x70(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x3110
jmp 0x512f
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5153
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x5159
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
setns %r15b
js 0x51dc
leaq 0xb8(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movq %r14, %rsi
callq 0x41b0
leaq 0xef7f(%rip), %rcx      # 0x1411d
leaq 0xb8(%rsp), %rdi
movl $0x7, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x51fb
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x5201
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf0b6(%rip), %rdx      # 0x142a2
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x42a6
jmp 0x5219
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %r13
movq -0x10(%r13), %rcx
movq -0x8(%r13), %r8
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x523e
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x525d
leaq 0x20(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5258
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x526e
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3110
jmp 0x527c
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x60(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x52a0
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x52a6
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52d6
callq 0x3350
testl %ebp, %ebp
js 0x52f0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52f0
callq 0x3350
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x52ff
callq 0x3350
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5315
callq 0x3350
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x5327
callq 0x3350
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x533d
callq 0x3350
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5434
movl %eax, %ebx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5362
callq 0x3350
movl %ebx, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x53cc
movq %rax, %rbx
movb $0x1, %r15b
jmp 0x53ae
movq %rax, %rbx
movb $0x1, %r15b
jmp 0x53c9
movq %rax, %rbx
leaq 0x60(%rsp), %rax
jmp 0x541e
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53ae
callq 0x3350
testb %r15b, %r15b
je 0x53c9
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53c9
callq 0x3350
testb %r15b, %r15b
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53e4
callq 0x3350
jmp 0x53e4
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53ff
callq 0x3350
jmp 0x53ff
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x5416
callq 0x3350
jmp 0x5416
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x542c
callq 0x3350
movq %rbx, %rdi
callq 0x35b0