// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x14(%rsp)
testl %edx, %edx
je 0x735c2
movl %ecx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
xorl %r13d, %r13d
movl %ecx, 0xc(%rsp)
incl %r13d
testl %ebx, %ebx
je 0x734eb
leaq 0x5804b(%rip), %rdi     # 0xcb40f
movl %r13d, %esi
callq 0x72dec
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x72f21
movl %eax, %r12d
addl %ebp, %r12d
leaq 0x57e76(%rip), %rbp     # 0xcb25c
movq %rbp, %rdi
xorl %eax, %eax
callq 0x260a0
leaq 0x58028(%rip), %rdi     # 0xcb41f
movl %r13d, %esi
callq 0x72dec
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x73003
movq %rbp, %rdi
xorl %eax, %eax
callq 0x260a0
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movl $0x4, %ecx
movl %ebx, %r8d
callq 0x73304
movl %eax, %ebx
addl %r12d, %ebx
leaq 0x57ff3(%rip), %rdi     # 0xcb42b
movl %r13d, %esi
callq 0x72dec
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
movl $0x53, %r8d
movl 0xc(%rsp), %r9d
callq 0x73128
movq %rbp, %r12
movq %rbp, %rdi
xorl %eax, %eax
callq 0x260a0
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movl $0x4, %ecx
movl 0xc(%rsp), %r8d
callq 0x73304
movl %eax, %ebp
addl %ebx, %ebp
movl 0xc(%rsp), %ebx
leaq 0x57fa3(%rip), %rdi     # 0xcb436
movl %r13d, %esi
callq 0x72dec
movq %r15, %rdi
movq %r14, %rsi
movabsq $-0x5555555555555556, %rdx # imm = 0xAAAAAAAAAAAAAAAA
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
movl $0x43, %r8d
movl %ebx, %r9d
callq 0x73128
movq %r12, %rdi
xorl %eax, %eax
callq 0x260a0
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movl $0x4, %ecx
movl %ebx, %r8d
callq 0x73304
movl %eax, %r12d
jmp 0x735b2
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x72f21
movl %eax, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x73003
movl $0x4, %r12d
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7324c
addl %eax, %ebx
decl %r12d
jne 0x73511
addl %ebp, 0x10(%rsp)
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
movl $0x53, %r8d
xorl %r9d, %r9d
callq 0x73128
movl $0x4, %r12d
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7324c
addl %eax, %ebp
decl %r12d
jne 0x7354e
addl %ebx, 0x10(%rsp)
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
movabsq $-0x5555555555555556, %rdx # imm = 0xAAAAAAAAAAAAAAAA
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
movl $0x43, %r8d
xorl %r9d, %r9d
callq 0x73128
movl $0x4, %ebx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7324c
addl %eax, %r12d
decl %ebx
jne 0x73596
addl 0x10(%rsp), %ebp
movl 0xc(%rsp), %ebx
addl %r12d, %ebp
cmpl 0x14(%rsp), %r13d
jne 0x733b2
jmp 0x735c4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq