user: Converte this assembly snippet into its equivalent C code:

```asm
<fcontract>:
  endbr64
  mov    %rdi,%r8
  mov    %rsi,%rcx
  mov    $0x2,%r9d
  jmp    L32
L15:
  mov    (%rax),%edi
  mov    %edi,%esi
  sar    $0x1f,%esi
  and    %edi,%esi
  mov    %esi,%r10d
  sar    $0x1a,%r10d
  and    $0xfc000000,%esi
  sub    %esi,%edi
  mov    %edi,(%rax)
  add    %r10d,0x4(%rax)
L31:
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    $0x9,%edx
  je     L49
L7:
  test   $0x1,%dl
  je     L15
  mov    (%rax),%edi
  mov    %edi,%esi
  sar    $0x1f,%esi
  and    %edi,%esi
  mov    %esi,%r10d
  sar    $0x19,%r10d
  and    $0xfe000000,%esi
  sub    %esi,%edi
  mov    %edi,(%rax)
  add    %r10d,0x4(%rax)
  jmp    L31
L49:
  mov    0x24(%rcx),%esi
  mov    %esi,%eax
  sar    $0x1f,%eax
  and    %esi,%eax
  mov    %eax,%edx
  sar    $0x19,%edx
  and    $0xfe000000,%eax
  sub    %eax,%esi
  mov    %esi,0x24(%rcx)
  lea    (%rdx,%rdx,8),%eax
  lea    (%rdx,%rax,2),%eax
  add    (%rcx),%eax
  mov    %eax,(%rcx)
  sub    $0x1,%r9d
  je     L51
L32:
  mov    %rcx,%rax
  mov    $0x0,%edx
  jmp    L7
L51:
  cltd
  and    %eax,%edx
  mov    %edx,%edi
  sar    $0x1a,%edi
  and    $0xfc000000,%edx
  sub    %edx,%eax
  mov    %eax,(%rcx)
  mov    %edi,%eax
  add    0x4(%rcx),%eax
  shl    $0x2,%eax
  mov    %eax,0x4(%rcx)
  shll   $0x3,0x8(%rcx)
  shll   $0x5,0xc(%rcx)
  shll   $0x6,0x10(%rcx)
  shll   0x18(%rcx)
  shll   $0x3,0x1c(%rcx)
  shll   $0x4,0x20(%rcx)
  shl    $0x6,%esi
  mov    %esi,0x24(%rcx)
  movl   $0x0,(%r8)
  movl   $0x0,0x40(%r8)
  movzbl (%rcx),%eax
  mov    %eax,(%r8)
  mov    (%rcx),%eax
  movzbl %ah,%eax
  mov    %eax,0x4(%r8)
  movzbl 0x2(%rcx),%eax
  mov    %eax,0x8(%r8)
  mov    (%rcx),%eax
  shr    $0x18,%eax
  mov    %eax,0xc(%r8)
  movzbl 0x4(%rcx),%edx
  or     %edx,%eax
  mov    %eax,0xc(%r8)
  movzbl 0x5(%rcx),%eax
  mov    %eax,0x10(%r8)
  movzbl 0x6(%rcx),%eax
  mov    %eax,0x14(%r8)
  movzbl 0x7(%rcx),%edx
  mov    %edx,0x18(%r8)
  movzbl 0x8(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x18(%r8)
  movzbl 0x9(%rcx),%eax
  mov    %eax,0x1c(%r8)
  movzbl 0xa(%rcx),%eax
  mov    %eax,0x20(%r8)
  movzbl 0xb(%rcx),%edx
  mov    %edx,0x24(%r8)
  movzbl 0xc(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x24(%r8)
  movzbl 0xd(%rcx),%eax
  mov    %eax,0x28(%r8)
  movzbl 0xe(%rcx),%eax
  mov    %eax,0x2c(%r8)
  movzbl 0xf(%rcx),%edx
  mov    %edx,0x30(%r8)
  movzbl 0x10(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x30(%r8)
  movzbl 0x11(%rcx),%eax
  mov    %eax,0x34(%r8)
  movzbl 0x12(%rcx),%eax
  mov    %eax,0x38(%r8)
  movzbl 0x13(%rcx),%eax
  mov    %eax,0x3c(%r8)
  movzbl 0x14(%rcx),%eax
  mov    %eax,0x40(%r8)
  movzbl 0x15(%rcx),%eax
  mov    %eax,0x44(%r8)
  movzbl 0x16(%rcx),%eax
  mov    %eax,0x48(%r8)
  movzbl 0x17(%rcx),%edx
  mov    %edx,0x4c(%r8)
  movzbl 0x18(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x4c(%r8)
  movzbl 0x19(%rcx),%eax
  mov    %eax,0x50(%r8)
  movzbl 0x1a(%rcx),%eax
  mov    %eax,0x54(%r8)
  movzbl 0x1b(%rcx),%edx
  mov    %edx,0x58(%r8)
  movzbl 0x1c(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x58(%r8)
  movzbl 0x1d(%rcx),%eax
  mov    %eax,0x5c(%r8)
  movzbl 0x1e(%rcx),%eax
  mov    %eax,0x60(%r8)
  movzbl 0x1f(%rcx),%edx
  mov    %edx,0x64(%r8)
  movzbl 0x20(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x64(%r8)
  movzbl 0x21(%rcx),%eax
  mov    %eax,0x68(%r8)
  movzbl 0x22(%rcx),%eax
  mov    %eax,0x6c(%r8)
  movzbl 0x23(%rcx),%edx
  mov    %edx,0x70(%r8)
  movzbl 0x24(%rcx),%eax
  or     %edx,%eax
  mov    %eax,0x70(%r8)
  movzbl 0x25(%rcx),%eax
  mov    %eax,0x74(%r8)
  movzbl 0x26(%rcx),%eax
  mov    %eax,0x78(%r8)
  movzbl 0x27(%rcx),%eax
  mov    %eax,0x7c(%r8)
  ret
```

assistant: ```c
void fcontract(uint8_t *output, int64_t *input) {
  int i;
  int j;
  for (j = 0; j < 2; ++j) {
    for (i = 0; i < 9; ++i) {
      if ((i & 1) == 1) {
        const int32_t mask = (int32_t)(input[i]) >> 31;
        const int32_t carry = -(((int32_t)(input[i]) & mask) >> 25);
        input[i] = (int32_t)(input[i]) + (carry << 25);
        input[i + 1] = (int32_t)(input[i + 1]) - carry;
      } else {
        const int32_t mask = (int32_t)(input[i]) >> 31;
        const int32_t carry = -(((int32_t)(input[i]) & mask) >> 26);
        input[i] = (int32_t)(input[i]) + (carry << 26);
        input[i + 1] = (int32_t)(input[i + 1]) - carry;
      }
    }
    const int32_t mask = (int32_t)(input[9]) >> 31;
    const int32_t carry = -(((int32_t)(input[9]) & mask) >> 25);
    input[9] = (int32_t)(input[9]) + (carry << 25);
    input[0] = (int32_t)(input[0]) - (carry * 19);
  }
  const int32_t mask = (int32_t)(input[0]) >> 31;
  const int32_t carry = -(((int32_t)(input[0]) & mask) >> 26);
  input[0] = (int32_t)(input[0]) + (carry << 26);
  input[1] = (int32_t)(input[1]) - carry;
  input[1] <<= 2;
  input[2] <<= 3;
  input[3] <<= 5;
  input[4] <<= 6;
  input[6] <<= 1;
  input[7] <<= 3;
  input[8] <<= 4;
  input[9] <<= 6;
  output[0] = 0;
  output[16] = 0;
  output[0 + 0] |= input[0] & 0xff;
  output[0 + 1] = (input[0] >> 8) & 0xff;
  output[0 + 2] = (input[0] >> 16) & 0xff;
  output[0 + 3] = (input[0] >> 24) & 0xff;
  ;
  output[3 + 0] |= input[1] & 0xff;
  output[3 + 1] = (input[1] >> 8) & 0xff;
  output[3 + 2] = (input[1] >> 16) & 0xff;
  output[3 + 3] = (input[1] >> 24) & 0xff;
  ;
  output[6 + 0] |= input[2] & 0xff;
  output[6 + 1] = (input[2] >> 8) & 0xff;
  output[6 + 2] = (input[2] >> 16) & 0xff;
  output[6 + 3] = (input[2] >> 24) & 0xff;
  ;
  output[9 + 0] |= input[3] & 0xff;
  output[9 + 1] = (input[3] >> 8) & 0xff;
  output[9 + 2] = (input[3] >> 16) & 0xff;
  output[9 + 3] = (input[3] >> 24) & 0xff;
  ;
  output[12 + 0] |= input[4] & 0xff;
  output[12 + 1] = (input[4] >> 8) & 0xff;
  output[12 + 2] = (input[4] >> 16) & 0xff;
  output[12 + 3] = (input[4] >> 24) & 0xff;
  ;
  output[16 + 0] |= input[5] & 0xff;
  output[16 + 1] = (input[5] >> 8) & 0xff;
  output[16 + 2] = (input[5] >> 16) & 0xff;
  output[16 + 3] = (input[5] >> 24) & 0xff;
  ;
  output[19 + 0] |= input[6] & 0xff;
  output[19 + 1] = (input[6] >> 8) & 0xff;
  output[19 + 2] = (input[6] >> 16) & 0xff;
  output[19 + 3] = (input[6] >> 24) & 0xff;
  ;
  output[22 + 0] |= input[7] & 0xff;
  output[22 + 1] = (input[7] >> 8) & 0xff;
  output[22 + 2] = (input[7] >> 16) & 0xff;
  output[22 + 3] = (input[7] >> 24) & 0xff;
  ;
  output[25 + 0] |= input[8] & 0xff;
  output[25 + 1] = (input[8] >> 8) & 0xff;
  output[25 + 2] = (input[8] >> 16) & 0xff;
  output[25 + 3] = (input[8] >> 24) & 0xff;
  ;
  output[28 + 0] |= input[9] & 0xff;
  output[28 + 1] = (input[9] >> 8) & 0xff;
  output[28 + 2] = (input[9] >> 16) & 0xff;
  output[28 + 3] = (input[9] >> 24) & 0xff;
  ;
}
```