// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_fill_value
void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1,
                        unsigned long v2, char sym, int interactive)
{
    unsigned long step = 4096/sizeof(unsigned long);
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long iwords = words/step;  /* words per iteration */
    unsigned long off, w, *l1, *l2, v;

    assert((bytes & 4095) == 0);
    for (off = 0; off < step; off++) {
        l1 = l+off;
        l2 = l1+words;
        v = (off & 1) ? v2 : v1;
        for (w = 0; w < iwords; w++) {
#ifdef MEMTEST_32BIT
            *l1 = *l2 = ((unsigned long)     v) |
                        (((unsigned long)    v) << 16);
#else
            *l1 = *l2 = ((unsigned long)     v) |
                        (((unsigned long)    v) << 16) |
                        (((unsigned long)    v) << 32) |
                        (((unsigned long)    v) << 48);
#endif
            l1 += step;
            l2 += step;
            if ((w & 0xffff) == 0 && interactive)
                memtest_progress_step(w+iwords*off,words,sym);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movl %r9d, -0x28(%rbp)
movq $0x200, -0x30(%rbp)     # imm = 0x200
movq -0x10(%rbp), %rax
shrq $0x3, %rax
shrq %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x30(%rbp)
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
andq $0xfff, %rax            # imm = 0xFFF
cmpq $0x0, %rax
jne 0x8f78b
jmp 0x8f7aa
leaq 0xb5acd(%rip), %rdi     # 0x14525f
leaq 0xb5ada(%rip), %rsi     # 0x145273
movl $0xab, %edx
leaq 0xb5b0f(%rip), %rcx     # 0x1452b4
callq 0x262e0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x8f8d0
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x8f7fe
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x8f806
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x8f8bd
movq -0x68(%rbp), %rcx
movq -0x68(%rbp), %rax
shlq $0x10, %rax
orq %rax, %rcx
movq -0x68(%rbp), %rax
shlq $0x20, %rax
orq %rax, %rcx
movq -0x68(%rbp), %rax
shlq $0x30, %rax
orq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x8f8aa
cmpl $0x0, -0x28(%rbp)
je 0x8f8aa
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
imulq -0x48(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movsbl -0x21(%rbp), %edx
callq 0x8f3a0
jmp 0x8f8ac
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x8f816
jmp 0x8f8bf
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x8f7b2
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)