// File: /workspace/github_c_makefile_star2_O1/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_tobytes
static void fe_tobytes(u8 s[32], const fe h)
{
    i32 t[10];
    FOR (i, 0, 10) {
        t[i] = h[i];
    }
    i32 q = (19 * t[9] + (((i32) 1) << 24)) >> 25;
    FOR (i, 0, 5) {
        q += t[2*i  ]; q >>= 26;
        q += t[2*i+1]; q >>= 25;
    }
    t[0] += 19 * q;

    i32 c0 = t[0] >> 26; t[1] += c0; t[0] -= c0 * (1 << 26);
    i32 c1 = t[1] >> 25; t[2] += c1; t[1] -= c1 * (1 << 25);
    i32 c2 = t[2] >> 26; t[3] += c2; t[2] -= c2 * (1 << 26);
    i32 c3 = t[3] >> 25; t[4] += c3; t[3] -= c3 * (1 << 25);
    i32 c4 = t[4] >> 26; t[5] += c4; t[4] -= c4 * (1 << 26);
    i32 c5 = t[5] >> 25; t[6] += c5; t[5] -= c5 * (1 << 25);
    i32 c6 = t[6] >> 26; t[7] += c6; t[6] -= c6 * (1 << 26);
    i32 c7 = t[7] >> 25; t[8] += c7; t[7] -= c7 * (1 << 25);
    i32 c8 = t[8] >> 26; t[9] += c8; t[8] -= c8 * (1 << 26);
    i32 c9 = t[9] >> 25;             t[9] -= c9 * (1 << 25);

    store32_le(s +  0, ((u32)t[0] >>  0) | ((u32)t[1] << 26));
    store32_le(s +  4, ((u32)t[1] >>  6) | ((u32)t[2] << 19));
    store32_le(s +  8, ((u32)t[2] >> 13) | ((u32)t[3] << 13));
    store32_le(s + 12, ((u32)t[3] >> 19) | ((u32)t[4] <<  6));
    store32_le(s + 16, ((u32)t[5] >>  0) | ((u32)t[6] << 25));
    store32_le(s + 20, ((u32)t[6] >>  7) | ((u32)t[7] << 19));
    store32_le(s + 24, ((u32)t[7] >> 13) | ((u32)t[8] << 12));
    store32_le(s + 28, ((u32)t[8] >> 20) | ((u32)t[9] <<  6));

    WIPE_BUFFER(t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x20(%rsi), %rax
movq %rax, -0x28(%rsp)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, -0x38(%rsp)
movaps %xmm0, -0x48(%rsp)
movl -0x24(%rsp), %ebp
leal (%rbp,%rbp,8), %eax
leal 0x1000000(%rbp,%rax,2), %eax
sarl $0x19, %eax
xorl %ecx, %ecx
addl -0x48(%rsp,%rcx,8), %eax
sarl $0x1a, %eax
addl -0x44(%rsp,%rcx,8), %eax
incq %rcx
sarl $0x19, %eax
cmpq $0x5, %rcx
jne 0x595b
leal (%rax,%rax,8), %ecx
leal (%rax,%rcx,2), %ebx
addl -0x48(%rsp), %ebx
movl %ebx, %r14d
sarl $0x1a, %r14d
addl -0x44(%rsp), %r14d
movl $0x3ffffff, %edx        # imm = 0x3FFFFFF
movl %ebx, %ecx
andl %edx, %ecx
movl $0x3ffffff, %eax        # imm = 0x3FFFFFF
movl %ecx, -0x48(%rsp)
movl %ecx, %r10d
movl %r14d, %r13d
sarl $0x19, %r13d
addl -0x40(%rsp), %r13d
movl $0x1ffffff, %edx        # imm = 0x1FFFFFF
movl %r14d, %esi
andl %edx, %esi
movl %esi, -0x44(%rsp)
movl %r13d, %r9d
sarl $0x1a, %r9d
addl -0x3c(%rsp), %r9d
movl %r13d, %r11d
andl %eax, %r11d
movl %r11d, -0x40(%rsp)
movl %r9d, %r8d
sarl $0x19, %r8d
addl -0x38(%rsp), %r8d
movl %r9d, %ecx
andl %edx, %ecx
movl %ecx, -0x8(%rsp)
movl %ecx, -0x3c(%rsp)
movl %r8d, %ecx
sarl $0x1a, %ecx
addl -0x34(%rsp), %ecx
movl %r8d, %edx
andl %eax, %edx
movl %edx, -0x38(%rsp)
movl %ecx, %eax
movl %ecx, -0x14(%rsp)
sarl $0x19, %eax
addl -0x30(%rsp), %eax
movl %r14d, %r12d
shll $0x1a, %r12d
orl %r10d, %r12d
movl %ecx, %edx
movl $0x1ffffff, %ecx        # imm = 0x1FFFFFF
andl %ecx, %edx
movl %edx, -0x18(%rsp)
movl %edx, -0x34(%rsp)
movl %eax, -0x1c(%rsp)
movl %eax, %r15d
sarl $0x1a, %r15d
addl -0x2c(%rsp), %r15d
movl %r15d, -0x2c(%rsp)
movl %eax, %edx
movl $0x3ffffff, %eax        # imm = 0x3FFFFFF
andl %eax, %edx
movl %edx, -0x10(%rsp)
movl %edx, -0x30(%rsp)
movl %r15d, %r10d
sarl $0x19, %r10d
addl -0x28(%rsp), %r10d
movl %r10d, %edx
sarl $0x1a, %edx
addl %ebp, %edx
movl %r10d, -0x28(%rsp)
movl %r15d, %ebp
andl %ecx, %ebp
movl %ebp, -0x2c(%rsp)
andl %r10d, %eax
movl %eax, -0xc(%rsp)
movl %eax, -0x28(%rsp)
andl %edx, %ecx
movl %ecx, -0x4(%rsp)
movl %ecx, -0x24(%rsp)
movb %bl, (%rdi)
movb %bh, 0x1(%rdi)
shrl $0x10, %ebx
movb %bl, 0x2(%rdi)
shrl $0x18, %r12d
movb %r12b, 0x3(%rdi)
shrl $0x6, %esi
movl %r13d, %ecx
shll $0x13, %ecx
orl %esi, %ecx
movb %sil, 0x4(%rdi)
shrl $0xe, %r14d
movb %r14b, 0x5(%rdi)
shrl $0x10, %ecx
movb %cl, 0x6(%rdi)
shrl $0x5, %r13d
movb %r13b, 0x7(%rdi)
shrl $0xd, %r11d
movl %r9d, %eax
shll $0xd, %eax
orl %r11d, %eax
movb %r11b, 0x8(%rdi)
movb %ah, 0x9(%rdi)
movl -0x1c(%rsp), %r11d
movl %r11d, %eax
shll $0x19, %eax
addl -0x18(%rsp), %eax
movl %r9d, %ecx
shrl $0x3, %ecx
movb %cl, 0xa(%rdi)
shrl $0xb, %r9d
movb %r9b, 0xb(%rdi)
movl -0x8(%rsp), %esi
shrl $0x13, %esi
movl %r8d, %ecx
shll $0x6, %ecx
orl %esi, %ecx
movb %cl, 0xc(%rdi)
movl %r8d, %ecx
shrl $0x2, %ecx
movb %cl, 0xd(%rdi)
movl %r8d, %ecx
shrl $0xa, %ecx
movb %cl, 0xe(%rdi)
shrl $0x12, %r8d
movb %r8b, 0xf(%rdi)
movl -0x14(%rsp), %ecx
movb %cl, 0x10(%rdi)
movb %ch, 0x11(%rdi)
shrl $0x10, %ecx
movb %cl, 0x12(%rdi)
shrl $0x18, %eax
movb %al, 0x13(%rdi)
movl -0x10(%rsp), %ecx
shrl $0x7, %ecx
movl %r15d, %eax
shll $0x13, %eax
orl %ecx, %eax
movb %cl, 0x14(%rdi)
movl %r11d, %ecx
shrl $0xf, %ecx
movb %cl, 0x15(%rdi)
shrl $0x10, %eax
movb %al, 0x16(%rdi)
shrl $0x5, %r15d
movb %r15b, 0x17(%rdi)
shrl $0xd, %ebp
movl %r10d, %eax
shll $0xc, %eax
orl %ebp, %eax
movb %bpl, 0x18(%rdi)
movb %ah, 0x19(%rdi)
movl %r10d, %eax
shrl $0x4, %eax
movb %al, 0x1a(%rdi)
shrl $0xc, %r10d
movb %r10b, 0x1b(%rdi)
movl -0xc(%rsp), %ecx
shrl $0x14, %ecx
movl %edx, %eax
shll $0x6, %eax
orl %ecx, %eax
movb %al, 0x1c(%rdi)
movl %edx, %eax
shrl $0x2, %eax
movb %al, 0x1d(%rdi)
shrl $0xa, %edx
movb %dl, 0x1e(%rdi)
movl -0x4(%rsp), %eax
shrl $0x12, %eax
movb %al, 0x1f(%rdi)
xorl %eax, %eax
movb $0x0, -0x48(%rsp,%rax)
incq %rax
cmpq $0x28, %rax
jne 0x5ba4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq