// File: /workspace/github_c_makefile_star2_O0/janmojzis[P]mcencrypt/poly1305.c
// Function: poly1305_blocks
void poly1305_blocks(poly1305_ctx *ctx, const unsigned char *m, unsigned long long n) {

    unsigned long long d0, d1, d2, d3, d4;
    unsigned long c;
    unsigned long h0 = ctx->h[0];
    unsigned long h1 = ctx->h[1];
    unsigned long h2 = ctx->h[2];
    unsigned long h3 = ctx->h[3];
    unsigned long h4 = ctx->h[4];
    unsigned long r0 = ctx->r[0];
    unsigned long r1 = ctx->r[1];
    unsigned long r2 = ctx->r[2];
    unsigned long r3 = ctx->r[3];
    unsigned long r4 = ctx->r[4];
    unsigned long s1 = ctx->s[1];
    unsigned long s2 = ctx->s[2];
    unsigned long s3 = ctx->s[3];
    unsigned long s4 = ctx->s[4];

    while (n > 0) {

        /* h += m[i] */
        if (n >= 16) {
            h0 += (unpack(m     )     ) & 0x3ffffff;
            h1 += (unpack(m +  3) >> 2) & 0x3ffffff;
            h2 += (unpack(m +  6) >> 4) & 0x3ffffff;
            h3 += (unpack(m +  9) >> 6) & 0x3ffffff;
            h4 += (unpack(m + 12) >> 8) | 16777216;
            m += 16;
            n -= 16;
        }
        else {
            unsigned char mm[16];
            long long i;
            for (i = 0; i < 16; ++i) mm[i] = 0;
            for (i = 0; i <  n; ++i) mm[i] = m[i];
            mm[i] = 1;
            h0 += (unpack(mm     )     ) & 0x3ffffff;
            h1 += (unpack(mm +  3) >> 2) & 0x3ffffff;
            h2 += (unpack(mm +  6) >> 4) & 0x3ffffff;
            h3 += (unpack(mm +  9) >> 6) & 0x3ffffff;
            h4 += (unpack(mm + 12) >> 8);
            m += n;
            n = 0;
        }

        /* h *= r */
        d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1);
        d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2);
        d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3);
        d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4);
        d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0);

        /* (partial) h %= p */
                      c = (unsigned long)(d0 >> 26); h0 = (unsigned long)d0 & 0x3ffffff;
        d1 += c;      c = (unsigned long)(d1 >> 26); h1 = (unsigned long)d1 & 0x3ffffff;
        d2 += c;      c = (unsigned long)(d2 >> 26); h2 = (unsigned long)d2 & 0x3ffffff;
        d3 += c;      c = (unsigned long)(d3 >> 26); h3 = (unsigned long)d3 & 0x3ffffff;
        d4 += c;      c = (unsigned long)(d4 >> 26); h4 = (unsigned long)d4 & 0x3ffffff;
        h0 += c * 5;  c =                (h0 >> 26); h0 =                h0 & 0x3ffffff;
        h1 += c;
    }

    ctx->h[0] = h0;
    ctx->h[1] = h1;
    ctx->h[2] = h2;
    ctx->h[3] = h3;
    ctx->h[4] = h4;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0xce03
cmpq $0x10, -0x18(%rbp)
jb 0xca79
movq -0x10(%rbp), %rdi
callq 0xc8a0
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
addq $0x3, %rdi
callq 0xc8a0
shrq $0x2, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
addq $0x6, %rdi
callq 0xc8a0
shrq $0x4, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9, %rdi
callq 0xc8a0
shrq $0x6, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
callq 0xc8a0
shrq $0x8, %rax
orq $0x1000000, %rax        # imm = 0x1000000
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x10, %rax
movq %rax, -0x18(%rbp)
jmp 0xcbb8
movq $0x0, -0xd8(%rbp)
cmpq $0x10, -0xd8(%rbp)
jge 0xcab1
movq -0xd8(%rbp), %rax
movb $0x0, -0xd0(%rbp,%rax)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0xca84
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcaf9
movq -0x10(%rbp), %rax
movq -0xd8(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0xd8(%rbp), %rax
movb %cl, -0xd0(%rbp,%rax)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0xcabc
movq -0xd8(%rbp), %rax
movb $0x1, -0xd0(%rbp,%rax)
leaq -0xd0(%rbp), %rdi
callq 0xc8a0
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x3, %rdi
callq 0xc8a0
shrq $0x2, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x6, %rdi
callq 0xc8a0
shrq $0x4, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x9, %rdi
callq 0xc8a0
shrq $0x6, %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0xc, %rdi
callq 0xc8a0
shrq $0x8, %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x50(%rbp), %rax
imulq -0x78(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq -0xb8(%rbp), %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
imulq -0xb0(%rbp), %rcx
addq %rcx, %rax
movq -0x68(%rbp), %rcx
imulq -0xa8(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
imulq -0xa0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rax
imulq -0x80(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq -0x78(%rbp), %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
imulq -0xb8(%rbp), %rcx
addq %rcx, %rax
movq -0x68(%rbp), %rcx
imulq -0xb0(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
imulq -0xa8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x50(%rbp), %rax
imulq -0x88(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq -0x80(%rbp), %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
imulq -0x78(%rbp), %rcx
addq %rcx, %rax
movq -0x68(%rbp), %rcx
imulq -0xb8(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
imulq -0xb0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rax
imulq -0x90(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq -0x88(%rbp), %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
imulq -0x80(%rbp), %rcx
addq %rcx, %rax
movq -0x68(%rbp), %rcx
imulq -0x78(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
imulq -0xb8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rax
imulq -0x98(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq -0x90(%rbp), %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
imulq -0x88(%rbp), %rcx
addq %rcx, %rax
movq -0x68(%rbp), %rcx
imulq -0x80(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
imulq -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x70(%rbp)
imulq $0x5, -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x1a, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
andq $0x3ffffff, %rax        # imm = 0x3FFFFFF
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0xc9b3
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x70(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)