user: What is the c source code of the assembly code below?

```asm
<GC_X_variable_stack>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,0x8(%rsp)
  test   %rdi,%rdi
  je     L160
  lea    (%rdi,%rsi,1),%rax
  mov    %rsi,%r14
  mov    %rcx,%r13
  mov    %rax,(%rsp)
  mov    0x8(%rax),%r12
  lea    0x10(%rax),%rbp
  cmp    %rax,%rdx
  je     L139
  lea    0x10(%rax,%r12,8),%rax
  cmp    %rax,%rdx
  jne    L10
  jmp    L139
  xchg   %ax,%ax
L57:
  lea    (%rax,%r14,1),%r12
  mov    %r13,%rdi
  mov    %r12,%rsi
  call   <X_source@plt>
  mov    %r12,%rdi
  mov    %rbx,%r12
  call   <gcX@plt>
L154:
  add    $0x8,%rbp
L10:
  lea    -0x1(%r12),%rbx
  test   %r12,%r12
  je     L157
  mov    0x0(%rbp),%rax
  test   %rax,%rax
  jne    L57
  mov    0x8(%rbp),%rdx
  mov    0x10(%rbp),%rbx
  sub    $0x3,%r12
  add    $0x10,%rbp
  lea    (%rdx,%r14,1),%r15
  test   %rbx,%rbx
  je     L154
  xchg   %ax,%ax
L146:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <X_source@plt>
  mov    %r15,%rdi
  add    $0x8,%r15
  call   <gcX@plt>
  sub    $0x1,%rbx
  jne    L146
  jmp    L154
  nop
L62:
  lea    (%rax,%r14,1),%r15
  mov    0x8(%rsp),%rsi
  mov    %rbx,%r12
  mov    %r15,%rdi
  call   <SHALLOWER_STACK_ADDRESS@plt>
  test   %rax,%rax
  jne    L176
L31:
  add    $0x8,%rbp
L139:
  lea    -0x1(%r12),%rbx
  test   %r12,%r12
  je     L160
L49:
  mov    0x0(%rbp),%rax
  test   %rax,%rax
  jne    L62
  mov    0x8(%rbp),%r15
  mov    0x10(%rbp),%rbx
  sub    $0x3,%r12
  add    $0x10,%rbp
  mov    0x8(%rsp),%rsi
  add    %r14,%r15
  mov    %r15,%rdi
  call   <SHALLOWER_STACK_ADDRESS@plt>
  test   %rax,%rax
  je     L31
  test   %rbx,%rbx
  je     L31
  nopw   0x0(%rax,%rax,1)
L107:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <X_source@plt>
  mov    %r15,%rdi
  add    $0x8,%r15
  call   <gcX@plt>
  sub    $0x1,%rbx
  jne    L107
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L157:
  mov    (%rsp),%rax
  mov    (%rax),%r15
  test   %r15,%r15
  je     L160
  lea    (%r15,%r14,1),%rax
  mov    %rax,(%rsp)
  mov    0x8(%rax),%r12
  lea    0x10(%rax),%rbp
  cmp    0x8(%rsp),%rax
  je     L139
  lea    0x10(%rax,%r12,8),%rax
  cmp    %rax,0x8(%rsp)
  jne    L10
  lea    -0x1(%r12),%rbx
  test   %r12,%r12
  jne    L49
L160:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L176:
  mov    %r13,%rdi
  mov    %r15,%rsi
  call   <X_source@plt>
  mov    %r15,%rdi
  call   <gcX@plt>
  jmp    L31
```

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;
  }
}
```