// File: /workspace/github_c_makefile_star2_O0/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: modL
static void modL(u8 *r, i64 x[64])
{
    for (unsigned i = 63; i >= 32; i--) {
        i64 carry = 0;
        FOR (j, i-32, i-12) {
            x[j] += carry - 16 * x[i] * L[j - (i - 32)];
            carry = (x[j] + 128) >> 8;
            x[j] -= carry * (1 << 8);
        }
        x[i-12] += carry;
        x[i] = 0;
    }
    i64 carry = 0;
    FOR (i, 0, 32) {
        x[i] += carry - (x[31] >> 4) * L[i];
        carry = x[i] >> 8;
        x[i] &= 255;
    }
    FOR (i, 0, 32) {
        x[i] -= carry * L[i];
    }
    FOR (i, 0, 32) {
        x[i+1] += x[i] >> 8;
        r[i  ]  = x[i] & 255;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x3f, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jb 0xfec2
movq $0x0, -0x20(%rbp)
movl -0x14(%rbp), %eax
subl $0x20, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0xc, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0xfe8d
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shlq $0x4, %rax
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %ecx
subl $0x20, %ecx
movl %ecx, %ecx
subq %rcx, %rsi
leaq 0x3081(%rip), %rcx      # 0x12eb0
imulq (%rcx,%rsi,8), %rax
subq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x80, %rax
sarq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
shlq $0x8, %rsi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xfdf1
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0xc, %ecx
movl %ecx, %ecx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfdd3
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x20, -0x38(%rbp)
jae 0xff48
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
sarq $0x4, %rax
movq -0x38(%rbp), %rsi
leaq 0x2fb9(%rip), %rcx      # 0x12eb0
imulq (%rcx,%rsi,8), %rax
subq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
sarq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
andq $0xff, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xfed2
movq $0x0, -0x40(%rbp)
cmpq $0x20, -0x40(%rbp)
jae 0xff8c
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rcx
leaq 0x2f4a(%rip), %rax      # 0x12eb0
imulq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xff50
movq $0x0, -0x48(%rbp)
cmpq $0x20, -0x48(%rbp)
jae 0xffea
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
sarq $0x8, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
addq 0x8(%rax,%rcx,8), %rdx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xff94
popq %rbp
retq
nopl (%rax)