// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_test
int memtest_test(unsigned long *m, size_t bytes, int passes, int interactive) {
    int pass = 0;
    int errors = 0;

    while (pass != passes) {
        pass++;

        if (interactive) memtest_progress_start("Addressing test",pass);
        errors += memtest_addressing(m,bytes,interactive);
        if (interactive) memtest_progress_end();

        if (interactive) memtest_progress_start("Random fill",pass);
        memtest_fill_random(m,bytes,interactive);
        if (interactive) memtest_progress_end();
        errors += memtest_compare_times(m,bytes,pass,4,interactive);

        if (interactive) memtest_progress_start("Solid fill",pass);
        memtest_fill_value(m,bytes,0,(unsigned long)-1,'S',interactive);
        if (interactive) memtest_progress_end();
        errors += memtest_compare_times(m,bytes,pass,4,interactive);

        if (interactive) memtest_progress_start("Checkerboard fill",pass);
        memtest_fill_value(m,bytes,ULONG_ONEZERO,ULONG_ZEROONE,'C',interactive);
        if (interactive) memtest_progress_end();
        errors += memtest_compare_times(m,bytes,pass,4,interactive);
    }
    return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x8fc2e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8faee
movl -0x1c(%rbp), %esi
leaq 0xb5892(%rip), %rdi     # 0x14537b
callq 0x8f2a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x8f430
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8fb0f
callq 0x8f380
cmpl $0x0, -0x18(%rbp)
je 0x8fb24
movl -0x1c(%rbp), %esi
leaq 0xb586c(%rip), %rdi     # 0x14538b
callq 0x8f2a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x8f580
cmpl $0x0, -0x18(%rbp)
je 0x8fb3f
callq 0x8f380
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x18(%rbp), %r8d
movl $0x4, %ecx
callq 0x8fa20
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8fb73
movl -0x1c(%rbp), %esi
leaq 0xb5829(%rip), %rdi     # 0x145397
callq 0x8f2a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %r9d
xorl %eax, %eax
movl %eax, %edx
movq $-0x1, %rcx
movl $0x53, %r8d
callq 0x8f730
cmpl $0x0, -0x18(%rbp)
je 0x8fba0
callq 0x8f380
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x18(%rbp), %r8d
movl $0x4, %ecx
callq 0x8fa20
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x8fbd4
movl -0x1c(%rbp), %esi
leaq 0xb57d3(%rip), %rdi     # 0x1453a2
callq 0x8f2a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %r9d
movabsq $-0x5555555555555556, %rdx # imm = 0xAAAAAAAAAAAAAAAA
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
movl $0x43, %r8d
callq 0x8f730
cmpl $0x0, -0x18(%rbp)
je 0x8fc0a
callq 0x8f380
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x18(%rbp), %r8d
movl $0x4, %ecx
callq 0x8fa20
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x8fac4
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)