user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<gob_encode_array_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9d,-0x44(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gob_start_struct@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_unsigned_int@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gob_encode_common_type@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  movl   $0x1,-0x10(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  jne    L25
  addl   $0x1,-0x10(%rbp)
  jmp    L11
L25:
  mov    -0x10(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_unsigned_int@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x40(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_int@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
L11:
  cmpl   $0x0,-0x44(%rbp)
  jne    L39
  addl   $0x1,-0x10(%rbp)
  jmp    L2
L39:
  mov    -0x10(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_unsigned_int@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x44(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_int@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
L2:
  mov    -0x30(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gob_end_struct@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  sub    %rax,-0x30(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  leave
  ret
```

assistant: ```c
int gob_encode_array_type(char *buf, size_t buf_size, const char *name, int id, int elem_type, int len) {
  int total_size = 0;
  char *write_ptr = buf;
  int num_bytes = gob_start_struct(write_ptr, buf_size);
  write_ptr += num_bytes;
  buf_size -= num_bytes;
  total_size += num_bytes;
  num_bytes = gob_encode_unsigned_int(write_ptr, buf_size, 1);
  write_ptr += num_bytes;
  buf_size -= num_bytes;
  total_size += num_bytes;
  num_bytes = gob_encode_common_type(write_ptr, buf_size, name, id);
  write_ptr += num_bytes;
  buf_size -= num_bytes;
  total_size += num_bytes;
  int field_delta = 1;
  if (elem_type == 0) {
    field_delta++;
  } else {
    num_bytes = gob_encode_unsigned_int(write_ptr, buf_size, field_delta);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
    num_bytes = gob_encode_int(write_ptr, buf_size, elem_type);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
  }
  if (len == 0) {
    field_delta++;
  } else {
    num_bytes = gob_encode_unsigned_int(write_ptr, buf_size, field_delta);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
    num_bytes = gob_encode_int(write_ptr, buf_size, len);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
  }
  num_bytes = gob_end_struct(write_ptr, buf_size);
  write_ptr += num_bytes;
  buf_size -= num_bytes;
  total_size += num_bytes;
  return total_size;
}
```