// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0xf0, %rsp
movq %r8, %rbx
movq %rdx, %r15
movq %rdi, %r14
leaq 0xac(%rsp), %rdx
movl %esi, (%rdx)
movl %ecx, 0x4(%rsp)
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x41be
leaq 0xf1d5(%rip), %rcx      # 0x141f5
movl $0x5, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5063
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x506b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
cmpq $0x0, 0x8(%r15)
je 0x50a3
leaq 0xf081(%rip), %rsi      # 0x14115
leaq 0x68(%rsp), %rdi
movq %r15, %rdx
callq 0xa64c
jmp 0x50c0
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf1ef(%rip), %rdx      # 0x142a2
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x42ba
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x50eb
movq 0x98(%rsp), %rdi
movq 0x68(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x510e
leaq 0x78(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x5109
movq 0x78(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x511d
leaq 0x88(%rsp), %rdi
callq 0x3110
jmp 0x512b
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x514f
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5155
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movl 0x4(%rsp), %ebp
testl %ebp, %ebp
js 0x51d4
leaq 0xb0(%rsp), %rdi
leaq 0x4(%rsp), %rdx
movq %r14, %rsi
callq 0x41be
leaq 0xef87(%rip), %rcx      # 0x1411d
leaq 0xb0(%rsp), %rdi
movl $0x7, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x51f3
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x51f9
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf0be(%rip), %rdx      # 0x142a2
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x42ba
jmp 0x5211
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %r15
movq -0x10(%r15), %rcx
movq -0x8(%r15), %r8
movq 0x10(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x5236
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x5259
leaq 0x18(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x5254
movq 0x18(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x5265
leaq 0x28(%rsp), %rdi
callq 0x3110
jmp 0x5273
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33e0
leaq 0x58(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5297
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x529d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52cd
callq 0x3350
testl %ebp, %ebp
js 0x52e7
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52e7
callq 0x3350
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x52f6
callq 0x3350
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5309
callq 0x3350
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x531b
callq 0x3350
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5331
callq 0x3350
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5414
movl %eax, %ebx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5356
callq 0x3350
movl %ebx, %eax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x536f
movq %rax, %rbx
jmp 0x5398
movq %rax, %rbx
jmp 0x53ae
movq %rax, %rbx
leaq 0x58(%rsp), %rax
jmp 0x53fd
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5394
callq 0x3350
testl %ebp, %ebp
js 0x53ae
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53ae
callq 0x3350
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53c6
callq 0x3350
jmp 0x53c6
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53de
callq 0x3350
jmp 0x53de
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x53f5
callq 0x3350
jmp 0x53f5
movq %rax, %rbx
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x540b
callq 0x3350
movq %rbx, %rdi
callq 0x35b0
nop