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

```asm
<Setup>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x24(%rsi),%rax
  mov    %rdi,%rcx
L13:
  mov    (%rax),%edi
  mov    %edi,(%rcx)
  mov    %rax,%rdi
  sub    $0x4,%rax
  add    $0x4,%rcx
  cmp    %rsi,%rdi
  jne    L13
  movl   $0x0,0x28(%rbx)
  movl   $0x0,0x2c(%rbx)
  lea    0x24(%rdx),%rax
  lea    0x30(%rbx),%rcx
L16:
  mov    (%rax),%esi
  mov    %esi,(%rcx)
  mov    %rax,%rsi
  sub    $0x4,%rax
  add    $0x4,%rcx
  cmp    %rdx,%rsi
  jne    L16
  movl   $0x0,0x58(%rbx)
  lea    0x5c(%rbx),%rax
  lea    0x90(%rbx),%rdx
L41:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L41
  movl   $0xe,0x90(%rbx)
  mov    $0x90,%ebp
  lea    0x14(%rsp),%r12
L39:
  mov    0x1c(%rbx),%ecx
  mov    0x20(%rbx),%edx
  mov    0x28(%rbx),%edi
  mov    0x2c(%rbx),%r9d
  mov    0x50(%rbx),%r8d
  mov    0x54(%rbx),%esi
  lea    0x0(,%rcx,4),%eax
  mov    %edx,%r10d
  sar    $0x6,%r10d
  xor    %r10d,%eax
  mov    %edi,%r10d
  shl    $0x5,%r10d
  xor    %r10d,%eax
  mov    %r9d,%r10d
  sar    $0x3,%r10d
  xor    %r10d,%eax
  mov    %r8d,%r10d
  shl    $0x6,%r10d
  xor    %r10d,%eax
  mov    %esi,%r10d
  sar    $0x2,%r10d
  xor    %r10d,%eax
  lea    0x0(,%rdi,8),%r10d
  mov    %r9d,%r11d
  sar    $0x5,%r11d
  xor    %r11d,%r10d
  shl    $0x4,%edi
  sar    $0x4,%r9d
  xor    %r9d,%edi
  and    %r10d,%edi
  xor    %edi,%eax
  mov    %eax,0xc(%rsp)
  mov    0x58(%rbx),%edi
  mov    0x4c(%rbx),%eax
  shl    $0x5,%eax
  sar    $0x3,%r8d
  xor    %r8d,%eax
  mov    %esi,%r8d
  shl    $0x4,%r8d
  xor    %r8d,%eax
  mov    %edi,%r8d
  sar    $0x4,%r8d
  xor    %r8d,%eax
  mov    0x80(%rbx),%r8d
  shl    $0x7,%r8d
  xor    %r8d,%eax
  mov    0x84(%rbx),%r8d
  sar    %r8d
  xor    %r8d,%eax
  lea    0x0(,%rsi,4),%r8d
  mov    %edi,%r9d
  sar    $0x6,%r9d
  xor    %r9d,%r8d
  shl    $0x3,%esi
  sar    $0x5,%edi
  xor    %edi,%esi
  and    %r8d,%esi
  xor    %esi,%eax
  mov    %eax,0x10(%rsp)
  mov    0x8c(%rbx),%esi
  mov    0x90(%rbx),%edi
  mov    0x78(%rbx),%eax
  shl    $0x2,%eax
  mov    0x7c(%rbx),%r8d
  sar    $0x6,%r8d
  xor    %r8d,%eax
  mov    %esi,%r8d
  shl    $0x7,%r8d
  xor    %r8d,%eax
  mov    %edi,%r8d
  sar    %r8d
  xor    %r8d,%eax
  shl    $0x5,%ecx
  xor    %ecx,%eax
  sar    $0x3,%edx
  xor    %edx,%eax
  mov    %esi,%edx
  shl    $0x5,%edx
  mov    %edi,%ecx
  sar    $0x3,%ecx
  xor    %ecx,%edx
  shl    $0x6,%esi
  sar    $0x2,%edi
  xor    %edi,%esi
  and    %esi,%edx
  xor    %edx,%eax
  mov    %eax,0x14(%rsp)
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  mov    %r12,%rcx
  mov    %rbx,%rdi
  call   <Rotate@plt>
  sub    $0x1,%ebp
  jne    L39
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void Setup(uint8_t *state, uint8_t *key, uint8_t *iv) {
  uint8_t i;
  uint8_t t1, t2, t3;
  uint8_t x1, x2, x3, x4, x5;
  for (i = 0; i < 10; i++) {
    state[i] = key[9 - i];
  }
  state[10] = 0x00;
  state[11] = 0x00;
  for (i = 0; i < 10; i++) {
    state[i + 12] = iv[9 - i];
  }
  state[22] = 0x00;
  for (i = 23; i < 36; i++) {
    state[i] = 0x00;
  }
  state[36] = 0x0E;
  for (i = 0; i < 144; i++) {
    x1 = (state[7] << 2) ^ (state[8] >> 6);
    x2 = (state[10] << 3) ^ (state[11] >> 5);
    x3 = (state[10] << 4) ^ (state[11] >> 4);
    x4 = (state[10] << 5) ^ (state[11] >> 3);
    x5 = (state[20] << 6) ^ (state[21] >> 2);
    t1 = x1 ^ (x2 & x3) ^ x4 ^ x5;
    x1 = (state[19] << 5) ^ (state[20] >> 3);
    x2 = (state[21] << 2) ^ (state[22] >> 6);
    x3 = (state[21] << 3) ^ (state[22] >> 5);
    x4 = (state[21] << 4) ^ (state[22] >> 4);
    x5 = (state[32] << 7) ^ (state[33] >> 1);
    t2 = x1 ^ (x2 & x3) ^ x4 ^ x5;
    x1 = (state[30] << 2) ^ (state[31] >> 6);
    x2 = (state[35] << 5) ^ (state[36] >> 3);
    x3 = (state[35] << 6) ^ (state[36] >> 2);
    x4 = (state[35] << 7) ^ (state[36] >> 1);
    x5 = (state[7] << 5) ^ (state[8] >> 3);
    t3 = x1 ^ (x2 & x3) ^ x4 ^ x5;
    Rotate(state, &t1, &t2, &t3);
  }
}
```