// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/geo.c
// Function: membersOfAllNeighbors
int membersOfAllNeighbors(robj *zobj, GeoHashRadius n, double lon, double lat, double radius, geoArray *ga) {
    GeoHashBits neighbors[9];
    unsigned int i, count = 0, last_processed = 0;
    int debugmsg = 0;

    neighbors[0] = n.hash;
    neighbors[1] = n.neighbors.north;
    neighbors[2] = n.neighbors.south;
    neighbors[3] = n.neighbors.east;
    neighbors[4] = n.neighbors.west;
    neighbors[5] = n.neighbors.north_east;
    neighbors[6] = n.neighbors.north_west;
    neighbors[7] = n.neighbors.south_east;
    neighbors[8] = n.neighbors.south_west;

    /* For each neighbor (*and* our own hashbox), get all the matching
     * members and add them to the potential result list. */
    for (i = 0; i < sizeof(neighbors) / sizeof(*neighbors); i++) {
        if (HASHISZERO(neighbors[i])) {
            if (debugmsg) D("neighbors[%d] is zero",i);
            continue;
        }

        /* Debugging info. */
        if (debugmsg) {
            GeoHashRange long_range, lat_range;
            geohashGetCoordRange(&long_range,&lat_range);
            GeoHashArea myarea = {{0,0},{0,0},{0,0}};
            geohashDecode(long_range, lat_range, neighbors[i], &myarea);

            /* Dump center square. */
            D("neighbors[%d]:\n",i);
            D("area.longitude.min: %f\n", myarea.longitude.min);
            D("area.longitude.max: %f\n", myarea.longitude.max);
            D("area.latitude.min: %f\n", myarea.latitude.min);
            D("area.latitude.max: %f\n", myarea.latitude.max);
            D("\n");
        }

        /* When a huge Radius (in the 5000 km range or more) is used,
         * adjacent neighbors can be the same, leading to duplicated
         * elements. Skip every range which is the same as the one
         * processed previously. */
        if (last_processed &&
            neighbors[i].bits == neighbors[last_processed].bits &&
            neighbors[i].step == neighbors[last_processed].step)
        {
            if (debugmsg)
                D("Skipping processing of %d, same as previous\n",i);
            continue;
        }
        count += membersOfGeoHashBox(zobj, neighbors[i], ga, lon, lat, radius);
        last_processed = i;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
leaq 0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl $0x0, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movl $0x0, -0xd0(%rbp)
movq (%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x40(%rax), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x48(%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x70(%rax), %rcx
movq %rcx, -0xa0(%rbp)
movq 0x78(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x50(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x58(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x60(%rax), %rcx
movq %rcx, -0x80(%rbp)
movq 0x68(%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x80(%rax), %rcx
movq %rcx, -0x70(%rbp)
movq 0x88(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0xa0(%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0xa8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x90(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x98(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0xb0(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0xb8(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpq $0x9, %rax
jae 0xa4905
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0xa4409
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
cmpb $0x0, 0x8(%rax)
jne 0xa4409
cmpl $0x0, -0xd0(%rbp)
je 0xa4404
jmp 0xa4383
leaq 0xa5081(%rip), %rdi     # 0x14940b
leaq 0xa7478(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
leaq 0xa506d(%rip), %rsi     # 0x149418
leaq 0xa5071(%rip), %rdx     # 0x149423
leaq 0xa5070(%rip), %rcx     # 0x149429
movl $0x15b, %r8d            # imm = 0x15B
movb $0x0, %al
callq 0x26ba0
movq -0xd8(%rbp), %rdi
movl -0xc4(%rbp), %edx
leaq 0xa5065(%rip), %rsi     # 0x14943f
movb $0x0, %al
callq 0x26ba0
movq -0xd8(%rbp), %rdi
leaq 0x95a4a(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0xd8(%rbp), %rdi
callq 0x26a10
jmp 0xa4404
jmp 0xa48f1
cmpl $0x0, -0xd0(%rbp)
je 0xa478d
leaq -0xe8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xd3570
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x26110
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movsd -0xe8(%rbp), %xmm0
movsd -0xe0(%rbp), %xmm1
movsd -0xf8(%rbp), %xmm2
movsd -0xf0(%rbp), %xmm3
movq (%rax), %rdi
leaq -0x128(%rbp), %rdx
movzbl 0x8(%rax), %esi
callq 0xd3a00
leaq 0xa4f7f(%rip), %rdi     # 0x14940b
leaq 0xa7376(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
leaq 0xa4f6b(%rip), %rsi     # 0x149418
leaq 0xa4f6f(%rip), %rdx     # 0x149423
leaq 0xa4f6e(%rip), %rcx     # 0x149429
movl $0x167, %r8d            # imm = 0x167
movb $0x0, %al
callq 0x26ba0
movq -0x130(%rbp), %rdi
movl -0xc4(%rbp), %edx
leaq 0xa4f79(%rip), %rsi     # 0x149455
movb $0x0, %al
callq 0x26ba0
movq -0x130(%rbp), %rdi
leaq 0x95948(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x130(%rbp), %rdi
callq 0x26a10
jmp 0xa4506
leaq 0xa4efe(%rip), %rdi     # 0x14940b
leaq 0xa72f5(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
leaq 0xa4eea(%rip), %rsi     # 0x149418
leaq 0xa4eee(%rip), %rdx     # 0x149423
leaq 0xa4eed(%rip), %rcx     # 0x149429
movl $0x168, %r8d            # imm = 0x168
movb $0x0, %al
callq 0x26ba0
movq -0x138(%rbp), %rdi
movsd -0x118(%rbp), %xmm0
leaq 0xa4f06(%rip), %rsi     # 0x149465
movb $0x1, %al
callq 0x26ba0
movq -0x138(%rbp), %rdi
leaq 0x958c5(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x138(%rbp), %rdi
callq 0x26a10
jmp 0xa4589
leaq 0xa4e7b(%rip), %rdi     # 0x14940b
leaq 0xa7272(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
leaq 0xa4e67(%rip), %rsi     # 0x149418
leaq 0xa4e6b(%rip), %rdx     # 0x149423
leaq 0xa4e6a(%rip), %rcx     # 0x149429
movl $0x169, %r8d            # imm = 0x169
movb $0x0, %al
callq 0x26ba0
movq -0x140(%rbp), %rdi
movsd -0x110(%rbp), %xmm0
leaq 0xa4e9b(%rip), %rsi     # 0x14947d
movb $0x1, %al
callq 0x26ba0
movq -0x140(%rbp), %rdi
leaq 0x95842(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x140(%rbp), %rdi
callq 0x26a10
jmp 0xa460c
leaq 0xa4df8(%rip), %rdi     # 0x14940b
leaq 0xa71ef(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
leaq 0xa4de4(%rip), %rsi     # 0x149418
leaq 0xa4de8(%rip), %rdx     # 0x149423
leaq 0xa4de7(%rip), %rcx     # 0x149429
movl $0x16a, %r8d            # imm = 0x16A
movb $0x0, %al
callq 0x26ba0
movq -0x148(%rbp), %rdi
movsd -0x108(%rbp), %xmm0
leaq 0xa4e30(%rip), %rsi     # 0x149495
movb $0x1, %al
callq 0x26ba0
movq -0x148(%rbp), %rdi
leaq 0x957bf(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x148(%rbp), %rdi
callq 0x26a10
jmp 0xa468f
leaq 0xa4d75(%rip), %rdi     # 0x14940b
leaq 0xa716c(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rdi
leaq 0xa4d61(%rip), %rsi     # 0x149418
leaq 0xa4d65(%rip), %rdx     # 0x149423
leaq 0xa4d64(%rip), %rcx     # 0x149429
movl $0x16b, %r8d            # imm = 0x16B
movb $0x0, %al
callq 0x26ba0
movq -0x150(%rbp), %rdi
movsd -0x100(%rbp), %xmm0
leaq 0xa4dc4(%rip), %rsi     # 0x1494ac
movb $0x1, %al
callq 0x26ba0
movq -0x150(%rbp), %rdi
leaq 0x9573c(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x150(%rbp), %rdi
callq 0x26a10
jmp 0xa4712
leaq 0xa4cf2(%rip), %rdi     # 0x14940b
leaq 0xa70e9(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
leaq 0xa4cde(%rip), %rsi     # 0x149418
leaq 0xa4ce2(%rip), %rdx     # 0x149423
leaq 0xa4ce1(%rip), %rcx     # 0x149429
movl $0x16c, %r8d            # imm = 0x16C
movb $0x0, %al
callq 0x26ba0
movq -0x158(%rbp), %rdi
leaq 0x956d6(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x158(%rbp), %rdi
leaq 0x956c1(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x158(%rbp), %rdi
callq 0x26a10
jmp 0xa478d
cmpl $0x0, -0xcc(%rbp)
je 0xa48a0
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0xcc(%rbp), %ecx
movl %ecx, %edx
leaq -0xc0(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0xa48a0
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movl -0xcc(%rbp), %ecx
movl %ecx, %edx
leaq -0xc0(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
movzbl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa48a0
cmpl $0x0, -0xd0(%rbp)
je 0xa489e
jmp 0xa481d
leaq 0xa4be7(%rip), %rdi     # 0x14940b
leaq 0xa6fde(%rip), %rsi     # 0x14b809
callq 0x26ae0
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
leaq 0xa4bd3(%rip), %rsi     # 0x149418
leaq 0xa4bd7(%rip), %rdx     # 0x149423
leaq 0xa4bd6(%rip), %rcx     # 0x149429
movl $0x178, %r8d            # imm = 0x178
movb $0x0, %al
callq 0x26ba0
movq -0x160(%rbp), %rdi
movl -0xc4(%rbp), %edx
leaq 0xa4c4f(%rip), %rsi     # 0x1494c3
movb $0x0, %al
callq 0x26ba0
movq -0x160(%rbp), %rdi
leaq 0x955b0(%rip), %rsi     # 0x139e39
movb $0x0, %al
callq 0x26ba0
movq -0x160(%rbp), %rdi
callq 0x26a10
jmp 0xa489e
jmp 0xa48f1
movq -0x8(%rbp), %rdi
movl -0xc4(%rbp), %eax
movl %eax, %ecx
leaq -0xc0(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
movq (%rax), %rsi
movzbl 0x8(%rax), %edx
callq 0xa4170
addl -0xc8(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0xa4324
movl -0xc8(%rbp), %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)