user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<effect_wormsqueeze>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%r12d
  mov    %esi,%ebp
  mov    %edx,%esi
  mov    %edx,0x18(%rsp)
  mov    %r8d,0x1c(%rsp)
  imul   $0x3e8,%ecx,%eax
  cltd
  idiv   %r8d
  mov    %eax,0x14(%rsp)
  cmp    $0xffffffff,%esi
  mov    $0x0,%r14d
  mov    $0x7,%eax
  cmove  %eax,%r14d
  mov    $0x9,%eax
  mov    %eax,%ebx
  sub    %edi,%ebx
  mov    %ebx,0x10(%rsp)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idiv   %ebx
  mov    %edx,%r15d
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idiv   %ebx
  mov    %edx,0x4(%rsp)
  cmpl   $0x0,0x14(%rsp)
  jle    L67
  movl   $0x0,0xc(%rsp)
  jmp    L68
L5:
  mov    0x4(%rsp),%eax
  lea    (%rax,%rbx,1),%esi
  lea    (%r15,%r13,1),%edi
  mov    %r14d,%edx
  call   <setvoxel@plt>
L81:
  lea    0x1(%rbx),%eax
  cmp    %eax,%r12d
  je     L131
  mov    %eax,%ebx
L27:
  cmp    $0x3,%ebp
  je     L5
  cmp    $0x2,%ebp
  je     L24
  cmp    $0x1,%ebp
  jne    L81
  lea    (%r15,%rbx,1),%edx
  mov    0x8(%rsp),%esi
  mov    %r14d,%edi
  call   <setvoxel@plt>
  jmp    L81
L24:
  mov    0x4(%rsp),%eax
  lea    (%rbx,%rax,1),%edx
  lea    0x0(%r13,%r15,1),%edi
  mov    %r14d,%esi
  call   <setvoxel@plt>
  jmp    L81
L131:
  lea    0x1(%r13),%eax
  cmp    %ebx,%r13d
  je     L142
  mov    %eax,%r13d
L11:
  mov    $0x0,%ebx
  mov    0x4(%rsp),%eax
  add    %r13d,%eax
  mov    %eax,0x8(%rsp)
  jmp    L27
L142:
  mov    0x1c(%rsp),%edi
  call   <delay_ms@plt>
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %eax,0x14(%rsp)
  je     L67
L68:
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,2),%edx
  sub    %edx,%eax
  sub    $0x1,%eax
  movslq %ebx,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %ebx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,2),%edx
  sub    %edx,%ebx
  lea    -0x1(%r15,%rbx,1),%edx
  cmp    0x10(%rsp),%edx
  jge    L75
  test   %edx,%edx
  cmovg  %edx,%r15d
L75:
  mov    0x4(%rsp),%ecx
  add    %ecx,%eax
  cmp    0x10(%rsp),%eax
  jge    L8
  test   %eax,%eax
  cmovle %ecx,%eax
  mov    %eax,0x4(%rsp)
L8:
  mov    0x18(%rsp),%esi
  mov    %ebp,%edi
  call   <shift@plt>
  mov    $0x0,%r13d
  test   %r12d,%r12d
  jg     L11
  jmp    L142
L67:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void effect_wormsqueeze(int size, int axis, int direction, int seconds, int delay) {
  int x, y, i, j, k, dx, dy;
  int cube_size;
  int origin = 0;
  int iterations = seconds * 1000 / delay;
  if (direction == -1)
    origin = 7;
  cube_size = 8 - (size - 1);
  x = rand() % cube_size;
  y = rand() % cube_size;
  for (i = 0; i < iterations; i++) {
    dx = ((rand() % 3) - 1);
    dy = ((rand() % 3) - 1);
    if ((x + dx) > 0 && (x + dx) < cube_size)
      x += dx;
    if ((y + dy) > 0 && (y + dy) < cube_size)
      y += dy;
    shift(axis, direction);
    for (j = 0; j < size; j++) {
      for (k = 0; k < size; k++) {
        if (axis == 3)
          setvoxel(x + j, y + k, origin);
        if (axis == 2)
          setvoxel(x + j, origin, y + k);
        if (axis == 1)
          setvoxel(origin, y + j, x + k);
      }
    }
    delay_ms(delay);
  }
}
```