// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_invert
static void fe_invert(fe out, const fe z)
{
    fe t0, t1, t2, t3;
    fe_sq(t0, z );
    fe_sq(t1, t0);
    fe_sq(t1, t1);
    fe_mul(t1,  z, t1);
    fe_mul(t0, t0, t1);
    fe_sq(t2, t0);                                fe_mul(t1 , t1, t2);
    fe_sq(t2, t1); FOR (i, 1,   5) fe_sq(t2, t2); fe_mul(t1 , t2, t1);
    fe_sq(t2, t1); FOR (i, 1,  10) fe_sq(t2, t2); fe_mul(t2 , t2, t1);
    fe_sq(t3, t2); FOR (i, 1,  20) fe_sq(t3, t3); fe_mul(t2 , t3, t2);
    fe_sq(t2, t2); FOR (i, 1,  10) fe_sq(t2, t2); fe_mul(t1 , t2, t1);
    fe_sq(t2, t1); FOR (i, 1,  50) fe_sq(t2, t2); fe_mul(t2 , t2, t1);
    fe_sq(t3, t2); FOR (i, 1, 100) fe_sq(t3, t3); fe_mul(t2 , t3, t2);
    fe_sq(t2, t2); FOR (i, 1,  50) fe_sq(t2, t2); fe_mul(t1 , t2, t1);
    fe_sq(t1, t1); FOR (i, 1,   5) fe_sq(t1, t1); fe_mul(out, t1, t0);
    WIPE_BUFFER(t0);
    WIPE_BUFFER(t1);
    WIPE_BUFFER(t2);
    WIPE_BUFFER(t3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x90(%rsp), %r15
movq %r15, %rdi
callq 0x517b
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x517b
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
movq %r14, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x494b
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x494b
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x517b
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x494b
movq %r12, %rdi
movq %r14, %rsi
callq 0x517b
movl $0x4, %r14d
movq %r12, %rdi
movq %r12, %rsi
callq 0x517b
decq %r14
jne 0x56ea
movq %rsp, %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x494b
movq %r14, %rdi
movq %r15, %rsi
callq 0x517b
movl $0x9, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x5721
movq %rsp, %r15
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x494b
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x517b
movl $0x13, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x575a
leaq 0x60(%rsp), %rsi
movq %rsp, %r14
movq %r14, %rdi
movq %r14, %rdx
callq 0x494b
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
movl $0x9, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x578e
movq %rsp, %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x494b
movq %r14, %rdi
movq %r15, %rsi
callq 0x517b
movl $0x31, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x57c5
movq %rsp, %r15
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x494b
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x517b
movl $0x63, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x57fe
leaq 0x60(%rsp), %rsi
movq %rsp, %r14
movq %r14, %rdi
movq %r14, %rdx
callq 0x494b
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
movl $0x31, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x5832
movq %rsp, %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r14, %rdx
callq 0x494b
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
movl $0x4, %r15d
movq %r14, %rdi
movq %r14, %rsi
callq 0x517b
decq %r15
jne 0x5866
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rdx
movq %rbx, %rdi
callq 0x494b
xorl %eax, %eax
movb $0x0, 0x90(%rsp,%rax)
incq %rax
cmpq $0x28, %rax
jne 0x588d
xorl %eax, %eax
movb $0x0, 0x30(%rsp,%rax)
incq %rax
cmpq $0x28, %rax
jne 0x58a0
xorl %eax, %eax
movb $0x0, (%rsp,%rax)
incq %rax
cmpq $0x28, %rax
jne 0x58b0
xorl %eax, %eax
movb $0x0, 0x60(%rsp,%rax)
incq %rax
cmpq $0x28, %rax
jne 0x58bf
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq