// File: /workspace/github_c_makefile_star2_O1/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_mul
static void fe_mul(fe h, const fe f, const fe g)
{
    // Everything is unrolled and put in temporary variables.
    // We could roll the loop, but that would make curve25519 twice as slow.
    i32 f0 = f[0]; i32 f1 = f[1]; i32 f2 = f[2]; i32 f3 = f[3]; i32 f4 = f[4];
    i32 f5 = f[5]; i32 f6 = f[6]; i32 f7 = f[7]; i32 f8 = f[8]; i32 f9 = f[9];
    i32 g0 = g[0]; i32 g1 = g[1]; i32 g2 = g[2]; i32 g3 = g[3]; i32 g4 = g[4];
    i32 g5 = g[5]; i32 g6 = g[6]; i32 g7 = g[7]; i32 g8 = g[8]; i32 g9 = g[9];
    i32 F1 = f1*2; i32 F3 = f3*2; i32 F5 = f5*2; i32 F7 = f7*2; i32 F9 = f9*2;
    i32 G1 = g1*19;  i32 G2 = g2*19;  i32 G3 = g3*19;
    i32 G4 = g4*19;  i32 G5 = g5*19;  i32 G6 = g6*19;
    i32 G7 = g7*19;  i32 G8 = g8*19;  i32 G9 = g9*19;

    i64 h0 = f0*(i64)g0 + F1*(i64)G9 + f2*(i64)G8 + F3*(i64)G7 + f4*(i64)G6
        +    F5*(i64)G5 + f6*(i64)G4 + F7*(i64)G3 + f8*(i64)G2 + F9*(i64)G1;
    i64 h1 = f0*(i64)g1 + f1*(i64)g0 + f2*(i64)G9 + f3*(i64)G8 + f4*(i64)G7
        +    f5*(i64)G6 + f6*(i64)G5 + f7*(i64)G4 + f8*(i64)G3 + f9*(i64)G2;
    i64 h2 = f0*(i64)g2 + F1*(i64)g1 + f2*(i64)g0 + F3*(i64)G9 + f4*(i64)G8
        +    F5*(i64)G7 + f6*(i64)G6 + F7*(i64)G5 + f8*(i64)G4 + F9*(i64)G3;
    i64 h3 = f0*(i64)g3 + f1*(i64)g2 + f2*(i64)g1 + f3*(i64)g0 + f4*(i64)G9
        +    f5*(i64)G8 + f6*(i64)G7 + f7*(i64)G6 + f8*(i64)G5 + f9*(i64)G4;
    i64 h4 = f0*(i64)g4 + F1*(i64)g3 + f2*(i64)g2 + F3*(i64)g1 + f4*(i64)g0
        +    F5*(i64)G9 + f6*(i64)G8 + F7*(i64)G7 + f8*(i64)G6 + F9*(i64)G5;
    i64 h5 = f0*(i64)g5 + f1*(i64)g4 + f2*(i64)g3 + f3*(i64)g2 + f4*(i64)g1
        +    f5*(i64)g0 + f6*(i64)G9 + f7*(i64)G8 + f8*(i64)G7 + f9*(i64)G6;
    i64 h6 = f0*(i64)g6 + F1*(i64)g5 + f2*(i64)g4 + F3*(i64)g3 + f4*(i64)g2
        +    F5*(i64)g1 + f6*(i64)g0 + F7*(i64)G9 + f8*(i64)G8 + F9*(i64)G7;
    i64 h7 = f0*(i64)g7 + f1*(i64)g6 + f2*(i64)g5 + f3*(i64)g4 + f4*(i64)g3
        +    f5*(i64)g2 + f6*(i64)g1 + f7*(i64)g0 + f8*(i64)G9 + f9*(i64)G8;
    i64 h8 = f0*(i64)g8 + F1*(i64)g7 + f2*(i64)g6 + F3*(i64)g5 + f4*(i64)g4
        +    F5*(i64)g3 + f6*(i64)g2 + F7*(i64)g1 + f8*(i64)g0 + F9*(i64)G9;
    i64 h9 = f0*(i64)g9 + f1*(i64)g8 + f2*(i64)g7 + f3*(i64)g6 + f4*(i64)g5
        +    f5*(i64)g4 + f6*(i64)g3 + f7*(i64)g2 + f8*(i64)g1 + f9*(i64)g0;

#define CARRY                                                             \
    i64 c0, c1, c2, c3, c4, c5, c6, c7, c8, c9;                           \
    c0 = (h0 + (i64) (1<<25)) >> 26; h1 += c0;      h0 -= c0 * (1 << 26); \
    c4 = (h4 + (i64) (1<<25)) >> 26; h5 += c4;      h4 -= c4 * (1 << 26); \
    c1 = (h1 + (i64) (1<<24)) >> 25; h2 += c1;      h1 -= c1 * (1 << 25); \
    c5 = (h5 + (i64) (1<<24)) >> 25; h6 += c5;      h5 -= c5 * (1 << 25); \
    c2 = (h2 + (i64) (1<<25)) >> 26; h3 += c2;      h2 -= c2 * (1 << 26); \
    c6 = (h6 + (i64) (1<<25)) >> 26; h7 += c6;      h6 -= c6 * (1 << 26); \
    c3 = (h3 + (i64) (1<<24)) >> 25; h4 += c3;      h3 -= c3 * (1 << 25); \
    c7 = (h7 + (i64) (1<<24)) >> 25; h8 += c7;      h7 -= c7 * (1 << 25); \
    c4 = (h4 + (i64) (1<<25)) >> 26; h5 += c4;      h4 -= c4 * (1 << 26); \
    c8 = (h8 + (i64) (1<<25)) >> 26; h9 += c8;      h8 -= c8 * (1 << 26); \
    c9 = (h9 + (i64) (1<<24)) >> 25; h0 += c9 * 19; h9 -= c9 * (1 << 25); \
    c0 = (h0 + (i64) (1<<25)) >> 26; h1 += c0;      h0 -= c0 * (1 << 26); \
    h[0]=(i32)h0;  h[1]=(i32)h1;  h[2]=(i32)h2;  h[3]=(i32)h3;  h[4]=(i32)h4; \
    h[5]=(i32)h5;  h[6]=(i32)h6;  h[7]=(i32)h7;  h[8]=(i32)h8;  h[9]=(i32)h9; \

    CARRY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movslq 0x8(%rsi), %r10
movq %r10, -0x30(%rsp)
movslq 0xc(%rsi), %rax
movq %rax, -0x50(%rsp)
movslq 0x10(%rsi), %r14
movq %r14, -0x20(%rsp)
movslq 0x18(%rdx), %rcx
movq %rcx, 0x68(%rsp)
movslq 0x1c(%rdx), %r8
movslq 0x20(%rdx), %rdi
leaq (%rax,%rax), %r9
movq %r9, 0x40(%rsp)
leaq (%rcx,%rcx,8), %rax
leaq (%rcx,%rax,2), %rbx
movq %rbx, -0x48(%rsp)
movq %r8, 0x78(%rsp)
leaq (%r8,%r8,8), %rax
leaq (%r8,%rax,2), %r8
movq %r8, -0x70(%rsp)
movq %rdi, 0x88(%rsp)
leaq (%rdi,%rdi,8), %rax
leaq (%rdi,%rax,2), %rcx
movq %rcx, -0x78(%rsp)
movq %r8, %rax
imulq %r9, %rax
imulq %r14, %rbx
addq %rax, %rbx
movq %rcx, %rax
imulq %r10, %rax
addq %rax, %rbx
movslq 0x24(%rdx), %rcx
movq %rcx, 0x80(%rsp)
leaq (%rcx,%rcx,8), %rax
leaq (%rcx,%rax,2), %rcx
movq %rcx, -0x80(%rsp)
movslq 0x4(%rsi), %r12
leaq (%r12,%r12), %rdi
movq %rdi, 0x18(%rsp)
movq %r12, (%rsp)
movq %rcx, %rax
imulq %rdi, %rax
addq %rax, %rbx
movslq 0xc(%rdx), %rcx
movq %rcx, -0x10(%rsp)
leaq (%rcx,%rcx,8), %rax
leaq (%rcx,%rax,2), %r15
movq %r15, 0x28(%rsp)
movslq 0x10(%rdx), %rcx
movq %rcx, 0x48(%rsp)
leaq (%rcx,%rcx,8), %rax
leaq (%rcx,%rax,2), %rax
movq %rax, 0x20(%rsp)
movslq 0x18(%rsi), %rcx
movq %rcx, 0x38(%rsp)
imulq %rcx, %rax
movslq 0x1c(%rsi), %rcx
movq %rcx, -0x58(%rsp)
leaq (%rcx,%rcx), %rdi
movq %rdi, 0x8(%rsp)
imulq %rdi, %r15
addq %rax, %r15
movslq 0x14(%rdx), %rcx
movq %rcx, 0x60(%rsp)
leaq (%rcx,%rcx,8), %rax
leaq (%rcx,%rax,2), %rcx
movq %rcx, -0x40(%rsp)
movslq 0x14(%rsi), %rbp
leaq (%rbp,%rbp), %rdi
movq %rdi, -0x18(%rsp)
movq %rbp, -0x8(%rsp)
movq %rcx, %rax
imulq %rdi, %rax
addq %rax, %r15
movslq 0x8(%rdx), %rax
movq %rax, -0x60(%rsp)
leaq (%rax,%rax,8), %r8
leaq (%rax,%r8,2), %rdi
movslq (%rsi), %r14
movslq (%rdx), %rcx
movq %rcx, %r8
movq %rcx, -0x68(%rsp)
imulq %r14, %r8
movslq 0x20(%rsi), %rax
movq %rax, 0x30(%rsp)
movq %rdi, %r11
imulq %rax, %r11
addq %r8, %r11
movslq 0x24(%rsi), %r13
movslq 0x4(%rdx), %r9
movq %r9, -0x38(%rsp)
leaq (,%r13,2), %rsi
movq %rsi, 0x10(%rsp)
movq %r13, -0x28(%rsp)
movq %r9, %rdx
imulq %rsi, %rdx
leaq (%rdx,%rdx,8), %r8
leaq (%rdx,%r8,2), %rax
addq %r11, %rax
addq %r15, %rax
addq %rbx, %rax
movq %rax, 0x50(%rsp)
movq %r9, %rdx
imulq %r14, %rdx
movq %r14, 0x58(%rsp)
movq %rcx, %rbx
imulq %r12, %rbx
addq %rdx, %rbx
movq -0x80(%rsp), %rdx
movq -0x30(%rsp), %rax
imulq %rax, %rdx
movq -0x78(%rsp), %r15
imulq -0x50(%rsp), %r15
addq %rdx, %r15
movq -0x48(%rsp), %r12
movq %r12, %rdx
imulq %rbp, %rdx
movq -0x40(%rsp), %rbp
movq %rbp, %r8
movq 0x38(%rsp), %rsi
imulq %rsi, %r8
addq %rdx, %r8
movq -0x70(%rsp), %r9
movq %r9, %rdx
imulq -0x20(%rsp), %rdx
addq %rdx, %r8
movq 0x20(%rsp), %r10
movq %r10, %rdx
imulq -0x58(%rsp), %rdx
movq 0x28(%rsp), %r11
movq 0x30(%rsp), %rcx
imulq %rcx, %r11
addq %rdx, %r11
imulq %r13, %rdi
addq %rbx, %rdi
addq %r11, %rdi
addq %r8, %rdi
addq %r15, %rdi
movq %rdi, 0x70(%rsp)
movq -0x60(%rsp), %rdi
movq %rdi, %rdx
imulq %r14, %rdx
movq -0x68(%rsp), %r14
movq %r14, %rbx
imulq %rax, %rbx
addq %rdx, %rbx
movq -0x38(%rsp), %r13
movq %r13, %rdx
imulq 0x18(%rsp), %rdx
addq %rdx, %rbx
movq %r9, %rdx
imulq -0x18(%rsp), %rdx
movq %r12, %r8
imulq %rsi, %r8
addq %rdx, %r8
movq -0x78(%rsp), %rsi
movq %rsi, %rdx
movq -0x20(%rsp), %r15
imulq %r15, %rdx
addq %rdx, %r8
imulq 0x8(%rsp), %rbp
movq %r10, %r11
imulq %rcx, %r11
movq %rcx, %r10
addq %rbp, %r11
movq 0x28(%rsp), %rdx
imulq 0x10(%rsp), %rdx
addq %rbx, %rdx
addq %r11, %rdx
addq %r8, %rdx
movq %rdx, %rax
movq -0x80(%rsp), %rcx
movq %rcx, %rdx
movq 0x40(%rsp), %r9
imulq %r9, %rdx
addq %rdx, %rax
movq %rax, 0x28(%rsp)
movq -0x10(%rsp), %rax
movq %rax, %rdx
movq 0x58(%rsp), %r12
imulq %r12, %rdx
movq %rdi, %r8
imulq (%rsp), %r8
addq %rdx, %r8
movq -0x30(%rsp), %rbp
imulq %rbp, %r13
movq %r14, %r11
imulq -0x50(%rsp), %r11
addq %r13, %r11
addq %r8, %r11
movq %rsi, %rdx
imulq -0x8(%rsp), %rdx
movq -0x70(%rsp), %r13
movq %r13, %r8
movq 0x38(%rsp), %rsi
imulq %rsi, %r8
addq %rdx, %r8
movq %rcx, %rdx
imulq %r15, %rdx
movq %r15, %r14
addq %rdx, %r8
movq -0x48(%rsp), %rdx
imulq -0x58(%rsp), %rdx
movq -0x40(%rsp), %rbx
imulq %r10, %rbx
addq %rdx, %rbx
movq 0x20(%rsp), %rcx
imulq -0x28(%rsp), %rcx
addq %r11, %rcx
addq %rbx, %rcx
addq %r8, %rcx
movq %rcx, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, %rdx
movq %r12, %r15
imulq %r12, %rdx
movq %rax, %r8
imulq 0x18(%rsp), %r8
addq %rdx, %r8
movq -0x60(%rsp), %rdx
movq %rbp, %rbx
imulq %rbp, %rdx
movq -0x68(%rsp), %r11
imulq %r14, %r11
movq %r14, %rbp
addq %rdx, %r11
movq -0x38(%rsp), %rcx
movq %rcx, %rdx
imulq %r9, %rdx
addq %rdx, %r11
addq %r8, %r11
movq -0x78(%rsp), %r14
movq %r14, %rdx
imulq %rsi, %rdx
movq %r13, %r8
imulq 0x8(%rsp), %r8
addq %rdx, %r8
movq -0x80(%rsp), %rax
movq %rax, %rdx
imulq -0x18(%rsp), %rdx
addq %rdx, %r8
movq -0x48(%rsp), %r13
movq %r13, %rdx
imulq %r10, %rdx
movq -0x40(%rsp), %rsi
imulq 0x10(%rsp), %rsi
addq %rdx, %rsi
addq %r11, %rsi
addq %r8, %rsi
movq %rsi, -0x40(%rsp)
movq 0x60(%rsp), %r12
movq %r12, %rdx
imulq %r15, %rdx
movq %rdi, %r8
imulq (%rsp), %r8
addq %rdx, %r8
movq -0x10(%rsp), %r9
movq %r9, %rdx
imulq %rbx, %rdx
movq -0x60(%rsp), %r10
movq %r10, %r11
imulq -0x50(%rsp), %r11
addq %rdx, %r11
imulq %rbp, %rcx
movq -0x68(%rsp), %rdi
movq %rdi, %rbx
imulq -0x8(%rsp), %rbx
addq %rcx, %rbx
addq %r11, %rbx
addq %r8, %rbx
movq 0x38(%rsp), %rcx
imulq %rcx, %rax
movq %r14, %r8
movq %r14, %rbp
imulq -0x58(%rsp), %r8
addq %rax, %r8
movq -0x70(%rsp), %rdx
movq 0x30(%rsp), %rsi
imulq %rsi, %rdx
movq %r13, %r11
imulq -0x28(%rsp), %r11
addq %rdx, %r11
addq %rbx, %r11
addq %r8, %r11
movq %r11, -0x48(%rsp)
movq 0x68(%rsp), %rdx
imulq %r15, %rdx
movq %r12, %rbx
movq %r12, %r13
imulq 0x18(%rsp), %rbx
addq %rdx, %rbx
movq 0x48(%rsp), %r12
movq %r12, %rdx
movq -0x30(%rsp), %rax
imulq %rax, %rdx
movq %r9, %r8
imulq 0x40(%rsp), %r8
addq %rdx, %r8
movq -0x20(%rsp), %r9
imulq %r9, %r10
imulq %rcx, %rdi
movq %rcx, %r15
addq %r10, %rdi
movq -0x38(%rsp), %r14
movq %r14, %rdx
imulq -0x18(%rsp), %rdx
addq %rdx, %rdi
addq %r8, %rdi
movq -0x80(%rsp), %rdx
imulq 0x8(%rsp), %rdx
imulq %rsi, %rbp
addq %rdx, %rbp
movq -0x70(%rsp), %rcx
imulq 0x10(%rsp), %rcx
addq %rbx, %rcx
addq %rdi, %rcx
addq %rbp, %rcx
movq %rcx, -0x70(%rsp)
movq %r13, %rdx
imulq %rax, %rdx
movq %rax, %rdi
movq %r12, %r8
imulq -0x50(%rsp), %r8
addq %rdx, %r8
movq 0x68(%rsp), %rcx
movq %rcx, %rdx
imulq (%rsp), %rdx
addq %rdx, %r8
movq -0x10(%rsp), %r10
movq %r10, %rdx
imulq %r9, %rdx
movq -0x60(%rsp), %r11
imulq -0x8(%rsp), %r11
addq %rdx, %r11
movq %r14, %rdx
movq %r15, %rax
imulq %r15, %rdx
movq -0x68(%rsp), %r12
movq %r12, %rbx
imulq -0x58(%rsp), %rbx
addq %rdx, %rbx
addq %r11, %rbx
addq %r8, %rbx
movq 0x78(%rsp), %rsi
movq %rsi, %rdx
movq 0x58(%rsp), %rbp
imulq %rbp, %rdx
movq -0x78(%rsp), %r8
imulq -0x28(%rsp), %r8
addq %rdx, %r8
addq %rbx, %r8
movq -0x80(%rsp), %r11
movq %r11, %rdx
movq 0x30(%rsp), %r9
imulq %r9, %rdx
addq %rdx, %r8
movq %r8, -0x78(%rsp)
movq %rcx, %r15
movq %rcx, %rdx
imulq %rdi, %rdx
movq 0x40(%rsp), %r8
imulq %r13, %r8
addq %rdx, %r8
movq 0x18(%rsp), %rdx
imulq %rsi, %rdx
addq %rdx, %r8
movq %r8, %rbx
movq 0x48(%rsp), %r14
movq %r14, %rdx
movq -0x20(%rsp), %rcx
imulq %rcx, %rdx
movq -0x18(%rsp), %rdi
imulq %r10, %rdi
addq %rdx, %rdi
movq -0x60(%rsp), %r10
movq %r10, %rdx
imulq %rax, %rdx
movq %rax, %r13
movq %r12, %r8
imulq %r9, %r8
movq %r9, %r12
addq %rdx, %r8
movq 0x8(%rsp), %rdx
movq -0x38(%rsp), %r9
imulq %r9, %rdx
addq %rdx, %r8
addq %rdi, %r8
addq %rbx, %r8
imulq 0x10(%rsp), %r11
movq 0x88(%rsp), %rbx
movq %rbx, %rdx
imulq %rbp, %rdx
addq %rdx, %r11
addq %r8, %r11
movq %r11, -0x80(%rsp)
movq 0x80(%rsp), %r8
imulq %rbp, %r8
imulq (%rsp), %rbx
imulq -0x30(%rsp), %rsi
addq %rbx, %rsi
addq %r8, %rsi
movq %rsi, %rdx
imulq -0x50(%rsp), %r15
movq 0x60(%rsp), %rsi
imulq %rcx, %rsi
imulq -0x8(%rsp), %r14
addq %rsi, %r14
addq %r15, %r14
movq %r14, %rdi
movq -0x10(%rsp), %rax
imulq %r13, %rax
imulq -0x58(%rsp), %r10
addq %rax, %r10
imulq %r12, %r9
movq -0x68(%rsp), %r14
imulq -0x28(%rsp), %r14
addq %r9, %r14
addq %r10, %r14
addq %rdi, %r14
addq %rdx, %r14
movl $0x2000000, %eax        # imm = 0x2000000
movq 0x50(%rsp), %rdi
leaq (%rdi,%rax), %rdx
movq %rdx, %rcx
sarq $0x1a, %rcx
addq 0x70(%rsp), %rcx
movq $-0x4000000, %rsi       # imm = 0xFC000000
andq %rsi, %rdx
subq %rdx, %rdi
movq %rdi, 0x50(%rsp)
movq -0x40(%rsp), %rbp
leaq (%rax,%rbp), %rdx
movq %rdx, %r13
sarq $0x1a, %r13
addq -0x48(%rsp), %r13
andq %rsi, %rdx
subq %rdx, %rbp
movl $0x1000000, %ebx        # imm = 0x1000000
leaq (%rcx,%rbx), %rdx
movq %rdx, %rsi
sarq $0x19, %rsi
addq 0x28(%rsp), %rsi
movl $0xfe000000, %r8d       # imm = 0xFE000000
andl %r8d, %edx
subl %edx, %ecx
leaq (%rbx,%r13), %rdx
movq %rdx, %r11
sarq $0x19, %r11
addq -0x70(%rsp), %r11
andl %r8d, %edx
subl %edx, %r13d
leaq (%rsi,%rax), %r15
movq %r15, %r9
sarq $0x1a, %r9
addq 0x20(%rsp), %r9
movl $0xfc000000, %edx       # imm = 0xFC000000
andl %edx, %r15d
subl %r15d, %esi
leaq (%r11,%rax), %r12
movq %r12, %r15
sarq $0x1a, %r15
addq -0x78(%rsp), %r15
andl %edx, %r12d
subl %r12d, %r11d
leaq (%r9,%rbx), %r12
movq %r12, %rdi
sarq $0x19, %rdi
addq %rbp, %rdi
andl %r8d, %r12d
subl %r12d, %r9d
leaq (%r15,%rbx), %r12
movq %r12, %r10
sarq $0x19, %r10
addq -0x80(%rsp), %r10
andl %r8d, %r12d
subl %r12d, %r15d
leaq (%rdi,%rax), %rbp
movq %rbp, %r12
shrq $0x1a, %r12
addl %r13d, %r12d
andl %edx, %ebp
subl %ebp, %edi
leaq (%r10,%rax), %rbp
movq %rbp, %r13
sarq $0x1a, %r13
addq %r14, %r13
andl %edx, %ebp
subl %ebp, %r10d
addq %r13, %rbx
movq %rbx, %r14
sarq $0x19, %r14
leaq (%r14,%r14,8), %rbp
leaq (%r14,%rbp,2), %r14
addq 0x50(%rsp), %r14
andl %r8d, %ebx
subl %ebx, %r13d
addq %r14, %rax
movq %rax, %r8
shrq $0x1a, %r8
addl %ecx, %r8d
andl %edx, %eax
subl %eax, %r14d
movq 0x90(%rsp), %rax
movl %r14d, (%rax)
movl %r8d, 0x4(%rax)
movl %esi, 0x8(%rax)
movl %r9d, 0xc(%rax)
movl %edi, 0x10(%rax)
movl %r12d, 0x14(%rax)
movl %r11d, 0x18(%rax)
movl %r15d, 0x1c(%rax)
movl %r10d, 0x20(%rax)
movl %r13d, 0x24(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq