user: Translate the below assembly code into C programming language:

```asm
<gob_encode_string_int_helper>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0xc(%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)
  movl   $0x1,-0x10(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L27
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L39
L27:
  addl   $0x1,-0x10(%rbp)
  jmp    L37
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    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <gob_encode_string@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)
L37:
  cmpl   $0x0,-0x3c(%rbp)
  je     L15
  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    -0x3c(%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)
L15:
  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_string_int_helper(char *buf, size_t buf_size, const char *name, int id) {
  int total_size = 0;
  int num_bytes = 0;
  char *write_ptr = buf;
  num_bytes = gob_start_struct(write_ptr, buf_size);
  write_ptr += num_bytes;
  buf_size -= num_bytes;
  total_size += num_bytes;
  int fieldDelta = 1;
  if (name == NULL || *name == '\0') {
    fieldDelta++;
  } else {
    num_bytes = gob_encode_unsigned_int(write_ptr, buf_size, fieldDelta);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
    num_bytes = gob_encode_string(write_ptr, buf_size, name);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
  }
  if (id != 0) {
    num_bytes = gob_encode_unsigned_int(write_ptr, buf_size, fieldDelta);
    write_ptr += num_bytes;
    buf_size -= num_bytes;
    total_size += num_bytes;
    num_bytes = gob_encode_int(write_ptr, buf_size, id);
    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;
}
```