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

```asm
<GC_X_variable_stack>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  jmp    L27
L163:
  mov    -0x30(%rbp),%rax
  add    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  je     L7
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x38(%rbp)
  jne    L166
  jmp    L7
L114:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L131
  mov    -0x10(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x8(%rbp)
  addq   $0x10,-0x10(%rbp)
  subq   $0x2,-0x20(%rbp)
  mov    -0x30(%rbp),%rax
  add    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <SHALLOWER_STACK_ADDRESS@plt>
  test   %rax,%rax
  je     L11
  jmp    L26
L102:
  mov    -0x8(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X_source@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gcX@plt>
  addq   $0x8,-0x8(%rbp)
L26:
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  test   %rax,%rax
  jne    L102
  jmp    L11
L131:
  mov    -0x30(%rbp),%rax
  add    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <SHALLOWER_STACK_ADDRESS@plt>
  test   %rax,%rax
  je     L11
  mov    -0x8(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X_source@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gcX@plt>
L11:
  addq   $0x8,-0x10(%rbp)
L7:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  test   %rax,%rax
  jne    L114
  jmp    L99
L122:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L15
  mov    -0x10(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x8(%rbp)
  addq   $0x10,-0x10(%rbp)
  subq   $0x2,-0x20(%rbp)
  mov    -0x30(%rbp),%rax
  add    %rax,-0x8(%rbp)
  jmp    L33
L38:
  mov    -0x8(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X_source@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gcX@plt>
  addq   $0x8,-0x8(%rbp)
L33:
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  test   %rax,%rax
  jne    L38
  jmp    L178
L15:
  mov    -0x30(%rbp),%rax
  add    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X_source@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gcX@plt>
L178:
  addq   $0x8,-0x10(%rbp)
L166:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  test   %rax,%rax
  jne    L122
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
L27:
  cmpq   $0x0,-0x28(%rbp)
  jne    L163
L99:
  leave
  ret
```

assistant: ```c
void GC_X_variable_stack(void **var_stack, long delta, void *limit, void *stack_mem) {
  long size, count;
  void ***p, **a;
  while (var_stack) {
    var_stack = (void **)((char *)var_stack + delta);
    size = *(long *)(var_stack + 1);
    p = (void ***)(var_stack + 2);
    if ((var_stack == limit) || (var_stack + size + 2 == limit)) {
      while (size--) {
        a = *p;
        if (!a) {
          count = ((long *)p)[2];
          a = ((void ***)p)[1];
          p += 2;
          size -= 2;
          a = (void **)((char *)a + delta);
          if (SHALLOWER_STACK_ADDRESS(a, limit)) {
            while (count--) {
              X_source(stack_mem, a);
              gcX(a);
              a++;
            }
          }
        } else {
          a = (void **)((char *)a + delta);
          if (SHALLOWER_STACK_ADDRESS(a, limit)) {
            X_source(stack_mem, a);
            gcX(a);
          }
        }
        p++;
      }
      return;
    }
    while (size--) {
      a = *p;
      if (!a) {
        count = ((long *)p)[2];
        a = ((void ***)p)[1];
        p += 2;
        size -= 2;
        a = (void **)((char *)a + delta);
        while (count--) {
          X_source(stack_mem, a);
          gcX(a);
          a++;
        }
      } else {
        a = (void **)((char *)a + delta);
        X_source(stack_mem, a);
        gcX(a);
      }
      p++;
    }
    var_stack = *var_stack;
  }
}
```