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

```asm
<get_repair_list>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    -0x38(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x34(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <math_pow@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x1c(%rbp)
  mov    $0x10,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L109
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L86
L109:
  mov    -0x38(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L57
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L86
L57:
  mov    -0x34(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L96
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L86
L96:
  mov    -0x18(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x20(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x20(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x20(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x24(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L26
L102:
  mov    -0x2c(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x2c(%rbp)
  mov    -0x28(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x28(%rbp)
  mov    -0x24(%rbp),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x24(%rbp)
  subl   $0x1,-0x30(%rbp)
L26:
  cmpl   $0x0,-0x30(%rbp)
  jg     L102
  mov    -0x38(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x3c(%rbp)
  jne    L107
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  movl   $0x1,-0x24(%rbp)
L107:
  mov    -0x28(%rbp),%r9d
  mov    -0x2c(%rbp),%r8d
  mov    -0x38(%rbp),%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x3c(%rbp),%esi
  mov    -0x10(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x24(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <get_data_list@plt>
  add    $0x10,%rsp
  cmpl   $0x0,-0x3c(%rbp)
  jne    L24
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%ecx
  mov    -0x8(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <get_f0_parity_list@plt>
  jmp    L55
L24:
  mov    -0x24(%rbp),%r8d
  mov    -0x28(%rbp),%edi
  mov    -0x2c(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%esi
  mov    -0x8(%rbp),%rax
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_parity_list@plt>
L55:
  mov    -0x18(%rbp),%rax
L86:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D23
datatype: string

tool: D23: ERROR : fail to malloc !


assistant: ```c
int **get_repair_list(int m, int k, int fnode) {
  int **dplist;
  int *dptr;
  int *pptr;
  int num_per_node;
  int r;
  int i;
  int cirlen, brklen, durlen;
  r = (math_pow((m), (k - 1)));
  num_per_node = r / m;
  if ((dplist = (int **)malloc(2 * sizeof(int *))) == NULL) {
    printf("ERROR : fail to malloc !\n");
    return 0;
  }
  if ((dptr = (int *)malloc((k - 1) * num_per_node * sizeof(int))) == NULL) {
    printf("ERROR : fail to malloc !\n");
    return 0;
  }
  if ((pptr = (int *)malloc(m * num_per_node * sizeof(int))) == NULL) {
    printf("ERROR : fail to malloc !\n");
    return 0;
  }
  dplist[0] = dptr;
  dplist[1] = pptr;
  cirlen = r * m;
  brklen = r + r / m;
  durlen = r / m;
  i = fnode;
  while (i >= 1) {
    cirlen = cirlen / m;
    brklen = brklen / m;
    durlen = durlen / m;
    --i;
  }
  if (fnode == k - 1) {
    cirlen = m;
    brklen = m;
    durlen = 1;
  }
  get_data_list(dptr, fnode, m, k, cirlen, brklen, durlen);
  if (fnode == 0) {
    get_f0_parity_list(pptr, m, k);
  } else {
    get_parity_list(pptr, m, k, cirlen, brklen, durlen);
  }
  return dplist;
}
```