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

```asm
<one_step_small>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r10
  mov    %rsi,%r11
  mov    %rdx,%rbx
  mov    %rcx,%r12
  mov    %r8d,-0x54(%rbp)
  mov    %r9d,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %r9d,%eax
  cltq
  lea    0xf(,%rax,8),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L41:
  cmp    %rcx,%rsp
  je     L240
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L41
L240:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L70
  orq    $0x0,-0x8(%rsp,%rdx,1)
L70:
  mov    %rsp,%rdi
  mov    %rdi,-0x50(%rbp)
  mov    -0x58(%rbp),%eax
  test   %eax,%eax
  jle    L224
  lea    -0x1(%rax),%esi
  mov    %rsi,-0x60(%rbp)
  mov    %eax,%ecx
  mov    %rcx,-0x48(%rbp)
  mov    $0x0,%esi
L255:
  mov    (%r10,%rsi,8),%rdx
  mov    %rdx,%r8
  shr    $0x7,%r8
  mov    %rdx,%rax
  shl    $0x7,%rax
  and    %rax,%r8
  mov    %r8,%r14
  and    %rdx,%r14
  mov    %rdx,%r13
  shr    %r13
  lea    (%rdx,%rdx,1),%rax
  and    %rax,%r13
  mov    %r13,%r9
  and    %rdx,%r9
  mov    %r14,%rax
  shr    $0x7,%rax
  shl    $0x7,%r14
  or     %r14,%rax
  or     %r13,%r8
  and    %rdx,%r8
  or     %r8,%rax
  mov    %r9,%r8
  shr    %r8
  or     %r8,%rax
  add    %r9,%r9
  or     %r9,%rax
  and    %rdx,%rax
  mov    %rax,(%rdi,%rsi,8)
  add    $0x1,%rsi
  cmp    %rcx,%rsi
  jne    L255
  mov    -0x54(%rbp),%eax
  mov    $0x0,%r14d
  mov    $0x1,%r8d
  jmp    L103
L129:
  mov    %eax,-0x4(%r12,%rdi,4)
  mov    %edi,%eax
  add    $0x1,%rdi
  test   %rsi,%rsi
  je     L190
L138:
  test   %rcx,%rsi
  jne    L258
L82:
  add    %rcx,%rcx
  test   %rsi,%rcx
  je     L82
L258:
  mov    %r13d,-0x4(%r11,%rdi,4)
  mov    %rcx,%rdx
L154:
  lea    (%rdx,%rdx,1),%rax
  mov    %rdx,%r15
  shr    %r15
  or     %r15,%rax
  or     %rdx,%rax
  mov    %rdx,%r15
  shl    $0x7,%r15
  or     %r15,%rax
  mov    %rdx,%r15
  shr    $0x7,%r15
  or     %r15,%rax
  mov    %rdx,%r15
  and    %rsi,%rax
  mov    %rax,%rdx
  cmp    %rax,%r15
  jne    L154
  not    %rax
  and    %rax,%rsi
  mov    %rdx,%rax
  shr    %rax
  movabs $0x5555555555555555,%r9
  and    %r9,%rax
  mov    %rdx,%r15
  and    %r9,%r15
  add    %r15,%rax
  movabs $0x3333333333333333,%r15
  and    %rax,%r15
  shr    $0x2,%rax
  movabs $0x3333333333333333,%r9
  and    %r9,%rax
  add    %rax,%r15
  mov    %r15,%rax
  shr    $0x4,%rax
  add    %r15,%rax
  movabs $0xf0f0f0f0f0f0f0f,%r9
  and    %r9,%rax
  mov    %rax,%r15
  shr    $0x8,%r15
  add    %r15,%rax
  mov    %rax,%r15
  shr    $0x10,%r15
  add    %rax,%r15
  mov    %r15,%rax
  shr    $0x20,%rax
  add    %r15,%rax
  and    $0x7f,%eax
  mov    %eax,-0x4(%rbx,%rdi,4)
  mov    %rdx,%r15
  xor    $0x1f00,%r15
  mov    %r8d,%eax
  test   $0x1f00,%r15d
  je     L129
  mov    %rdx,%r15
  xor    $0xf8000,%r15
  test   $0xf8000,%r15d
  je     L129
  mov    %rdx,%r15
  xor    $0x7c00000,%r15
  test   $0x7c00000,%r15d
  je     L129
  shr    $0x1d,%rdx
  and    $0x1f,%edx
  cmp    $0x1f,%rdx
  sete   %al
  movzbl %al,%eax
  jmp    L129
L190:
  add    $0x1,%r14
  cmp    -0x48(%rbp),%r14
  je     L253
L103:
  mov    %r14d,%r13d
  mov    -0x50(%rbp),%rdi
  mov    (%rdi,%r14,8),%rsi
  mov    %rsi,%rdx
  not    %rdx
  and    %rdx,(%r10,%r14,8)
  test   %rsi,%rsi
  je     L190
  add    $0x1,%eax
  movslq %eax,%rdi
  mov    $0x100,%ecx
  jmp    L138
L253:
  cmp    %eax,-0x54(%rbp)
  je     L117
  mov    (%r10),%rbx
  mov    -0x58(%rbp),%edi
  cmp    $0x1,%edi
  jle    L109
  lea    0x8(%r10),%rdx
  lea    -0x2(%rdi),%ecx
  lea    0x10(%r10,%rcx,8),%rcx
L197:
  or     (%rdx),%rbx
  add    $0x8,%rdx
  cmp    %rcx,%rdx
  jne    L197
L109:
  mov    -0x60(%rbp),%rdi
  lea    0x8(%r10,%rdi,8),%r11
  mov    -0x58(%rbp),%r13d
  lea    -0x2(%r13),%edx
  lea    0x10(%r10,%rdx,8),%r9
  movabs $0x3e0000000,%r12
  movabs $0xfffffe0fffffffff,%r8
  jmp    L131
L78:
  cmp    %rcx,%rbx
  je     L117
  mov    %rcx,%rbx
L131:
  mov    %rbx,%rsi
  shr    $0x7,%rsi
  or     %r12,%rsi
  mov    %r10,%rcx
  mov    %rbx,%rdi
  not    %rdi
L1:
  mov    (%rcx),%r14
  mov    %r14,%rdx
  shl    $0x7,%rdx
  and    %rdi,%rdx
  and    %r8,%rdx
  and    %rsi,%r14
  or     %r14,%rdx
  mov    %rdx,(%rcx)
  add    $0x8,%rcx
  cmp    %r11,%rcx
  jne    L1
  mov    (%r10),%rcx
  cmp    $0x1,%r13d
  jle    L78
  lea    0x8(%r10),%rdx
L107:
  or     (%rdx),%rcx
  add    $0x8,%rdx
  cmp    %rdx,%r9
  jne    L107
  jmp    L78
L224:
  mov    -0x54(%rbp),%eax
L117:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L66:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int one_step_small(unsigned long long *color_table, int *color_combo, int *num_drops_combo, int *isLine_combo, int finish, int num_colors) {
  unsigned long long isErase_tables[num_colors];
  int combo_counter = finish;
  int num_c;
  unsigned long long tmp, tmp2;
  for (num_c = 0; num_c < num_colors; num_c++) {
    unsigned long long color = color_table[num_c];
    unsigned long long n, w, s, e;
    n = color >> 7;
    w = color >> 1;
    s = color << 7;
    e = color << 1;
    tmp = (color & n & s);
    tmp = tmp | (tmp >> 7) | (tmp << 7);
    tmp2 = (color & w & e);
    tmp2 = tmp2 | (tmp2 >> 1) | (tmp2 << 1);
    isErase_tables[num_c] = (color & tmp) | (color & tmp2);
  }
  for (num_c = 0; num_c < num_colors; num_c++) {
    unsigned long long isErase_table = isErase_tables[num_c];
    color_table[num_c] = color_table[num_c] & (~isErase_table);
    unsigned long long p = 1L << (7 + 1);
    while (isErase_table) {
      while (!(isErase_table & p)) {
        p = p << 1;
      }
      tmp = p;
      color_combo[combo_counter] = num_c;
      unsigned long long tmp_old;
      do {
        tmp_old = tmp;
        tmp = (tmp | (tmp << 1) | (tmp >> 1) | (tmp << 7) | (tmp >> 7)) & isErase_table;
      } while (tmp_old != tmp);
      isErase_table = isErase_table & (~tmp);
      unsigned long long bits = tmp;
      bits = (bits & 0x5555555555555555LU) + ((bits >> 1) & 0x5555555555555555LU);
      bits = (bits & 0x3333333333333333LU) + ((bits >> 2) & 0x3333333333333333LU);
      bits = (bits + (bits >> 4)) & 0x0F0F0F0F0F0F0F0FLU;
      bits = bits + (bits >> 8);
      bits = bits + (bits >> 16);
      bits = (bits + (bits >> 32)) & 0x0000007F;
      num_drops_combo[combo_counter] = bits;
      isLine_combo[combo_counter] = ((tmp >> (7 + 1)) & 31) == 31 || ((tmp >> (7 * 2 + 1)) & 31) == 31 || ((tmp >> (7 * 3 + 1)) & 31) == 31 || ((tmp >> (7 * 4 + 1)) & 31) == 31;
      combo_counter++;
    }
  }
  if (finish != combo_counter) {
    unsigned long long exist_table = color_table[0];
    for (num_c = 1; num_c < num_colors; num_c++) {
      exist_table = exist_table | color_table[num_c];
    }
    unsigned long long exist_org;
    do {
      exist_org = exist_table;
      unsigned long long exist_u = (exist_table >> 7) | 16642998272L;
      for (num_c = 0; num_c < num_colors; num_c++) {
        unsigned long long color = color_table[num_c];
        unsigned long long color_u = color & exist_u;
        unsigned long long color_d = (color << 7) & (~exist_table) & (~2130303778816L);
        color_table[num_c] = color_u | color_d;
      }
      exist_table = color_table[0];
      for (num_c = 1; num_c < num_colors; num_c++) {
        exist_table = exist_table | color_table[num_c];
      }
    } while (exist_org != exist_table);
  }
  return combo_counter;
}
```