// File: /workspace/github_c_makefile_star2_O0/joewalnes[P]verifysignature/verifysignature.c
// Function: slide
void slide(signed char *r, const unsigned char *a) {
    int i;
    int b;
    int k;

    for (i = 0;i < 256;++i)
        r[i] = 1 & (a[i >> 3] >> (i & 7));

    for (i = 0;i < 256;++i) {
        if (r[i]) {
            for (b = 1;b <= 6 && i + b < 256;++b) {
                if (r[i + b]) {
                    if (r[i] + (r[i + b] << b) <= 15) {
                        r[i] += r[i + b] << b; r[i + b] = 0;
                    } else if (r[i] - (r[i + b] << b) >= -15) {
                        r[i] -= r[i + b] << b;
                        for (k = i + b;k < 256;++k) {
                            if (!r[k]) {
                                r[k] = 1;
                                break;
                            }
                            r[k] = 0;
                        }
                    } else {
                        break;
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xcc10
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x14(%rbp), %ecx
andl $0x7, %ecx
sarl %cl, %eax
andl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xcbd3
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xcda5
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0xcd95
movl $0x1, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x6, -0x18(%rbp)
movb %al, -0x1d(%rbp)
jg 0xcc59
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl $0x100, %eax            # imm = 0x100
setl %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0xcc65
jmp 0xcd93
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
cmpb $0x0, (%rax,%rcx)
je 0xcd83
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
addl -0x18(%rbp), %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %edx
movl -0x18(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
cmpl $0xf, %eax
jg 0xcce4
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %esi
movl -0x18(%rbp), %ecx
shll %cl, %esi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %edx
addl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0xcd81
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
addl -0x18(%rbp), %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %edx
movl -0x18(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
cmpl $-0xf, %eax
jl 0xcd7d
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %esi
movl -0x18(%rbp), %ecx
shll %cl, %esi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %edx
subl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x100, -0x1c(%rbp)     # imm = 0x100
jge 0xcd7b
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0xcd64
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0xcd7b
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xcd3f
jmp 0xcd7f
jmp 0xcd93
jmp 0xcd81
jmp 0xcd83
jmp 0xcd85
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xcc3d
jmp 0xcd95
jmp 0xcd97
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xcc17
popq %rbp
retq
nopw (%rax,%rax)