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

```asm
<create_work_threads>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8d,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x44(%rbp),%edx
  lea    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <init_pthread_attr@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L64
  mov    -0x1c(%rbp),%eax
  jmp    L42
L64:
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L12
L62:
  mov    -0x38(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  lea    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_create@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L65
  mov    -0x18(%rbp),%rax
  sub    -0x40(%rbp),%rax
  sar    $0x2,%rax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <strerror@plt>
  test   %rax,%rax
  je     L10
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <strerror@plt>
  jmp    L76
L10:
  lea    D13(%rip),%rax
L76:
  mov    -0x28(%rbp),%rdx
  mov    (%rdx),%edx
  mov    -0x1c(%rbp),%ecx
  mov    %rax,%r8
  mov    $0xa9,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <logError@plt>
  jmp    L9
L65:
  addq   $0x4,-0x18(%rbp)
L12:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L62
L9:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_attr_destroy@plt>
  mov    -0x1c(%rbp),%eax
L42:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D13
datatype: string
name: retrieve_data
arguments: tag: D16
datatype: string

tool: D13: Unkown error

tool: D16: file: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fatedier/studies/refs/heads/master/fastdfs-5.01/common/pthread_func.c, line: %d, create thread failed, startup threads: %d, errno: %d, error info: %s

assistant: ```c
int create_work_threads(int *count, void *(*start_func)(void *), void *arg, pthread_t *tids, const int stack_size) {
  int result;
  pthread_attr_t thread_attr;
  pthread_t *ptid;
  pthread_t *ptid_end;
  if ((result = init_pthread_attr(&thread_attr, stack_size)) != 0) {
    return result;
  }
  result = 0;
  ptid_end = tids + (*count);
  for (ptid = tids; ptid < ptid_end; ptid++) {
    if ((result = pthread_create(ptid, &thread_attr, start_func, arg)) != 0) {
      *count = ptid - tids;
      logError("file: "
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fatedier/studies/refs/heads/master/fastdfs-5.01/common/pthread_func.c"
               ", line: %d, "
               "create thread failed, startup threads: %d, "
               "errno: %d, error info: %s",
               169, *count, result, (strerror(result) != NULL ? strerror(result) : "Unkown error"));
      break;
    }
  }
  pthread_attr_destroy(&thread_attr);
  return result;
}
```