ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<getNombreMes>:
  endbr64
  cmp    $0xc,%edi
  ja     L2
  lea    D21(%rip),%rdx
  mov    %edi,%edi
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D99(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D91(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D87(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D26(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D115(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D63(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D100(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D109(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D111(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D113(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D64(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D70(%rip),%rax
  ret
L2:
  xor    %eax,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D99
data_type: string
name: disassemble_data
arguments: data_label: D91
data_type: string
name: disassemble_data
arguments: data_label: D87
data_type: string
name: disassemble_data
arguments: data_label: D26
data_type: string
name: disassemble_data
arguments: data_label: D115
data_type: string
name: disassemble_data
arguments: data_label: D63
data_type: string
name: disassemble_data
arguments: data_label: D100
data_type: string
name: disassemble_data
arguments: data_label: D109
data_type: string
name: disassemble_data
arguments: data_label: D111
data_type: string
name: disassemble_data
arguments: data_label: D113
data_type: string
name: disassemble_data
arguments: data_label: D64
data_type: string
name: disassemble_data
arguments: data_label: D70
data_type: string

tool: D99: ENERO

tool: D91: FEBRERO

tool: D87: MARZO

tool: D26: ABRIL

tool: D115: MAYO

tool: D63: JUNIO

tool: D100: JULIO

tool: D109: AGOSTO

tool: D111: SEPTIEMBRE

tool: D113: OCTUBRE

tool: D64: NOVIEMBRE

tool: D70: DICIEMBRE

assistant: ```c
char *getNombreMes(int num) {
  char *mes;
  switch (num) {
  case 1:
    mes = "ENERO";
    break;
  case 2:
    mes = "FEBRERO";
    break;
  case 3:
    mes = "MARZO";
    break;
  case 4:
    mes = "ABRIL";
    break;
  case 5:
    mes = "MAYO";
    break;
  case 6:
    mes = "JUNIO";
    break;
  case 7:
    mes = "JULIO";
    break;
  case 8:
    mes = "AGOSTO";
    break;
  case 9:
    mes = "SEPTIEMBRE";
    break;
  case 10:
    mes = "OCTUBRE";
    break;
  case 11:
    mes = "NOVIEMBRE";
    break;
  case 12:
    mes = "DICIEMBRE";
    break;
  }
  return mes;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<create_directory_if_missing>:
  endbr64
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    D7(%rip),%rbx
  mov    (%rbx),%esi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L68
  mov    D11(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x80,%eax
  je     L30
  xor    %r12d,%r12d
  cmp    $0x81,%eax
  sete   %r12b
L68:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L30:
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L68
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  call   <dirname@plt>
  cmpb   $0x2e,(%rax)
  mov    %rax,%rdi
  jne    L17
  movzbl 0x1(%rax),%r12d
  test   %r12d,%r12d
  jne    L17
L28:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L17:
  call   <create_directory_if_missing>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L28
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <mkdir@plt>
  test   %rax,%rax
  sete   %r12b
  jmp    L28
```

assistant: ```c
bool create_directory_if_missing(char *dir) {
  if (!mkdir(dir, S_IRWXU))
    return true;
  switch (errno) {
  case EEXIST:
    return true;
  case ENOENT:
    break;
  default:
    return false;
  }
  char *dir_copy, *dir_parent;
  if ((NULL == ((dir_copy) = malloc((strlen(dir) + 1) * sizeof(*(dir_copy))))))
    return false;
  strcpy(dir_copy, dir);
  dir_parent = dirname(dir_copy);
  if (!strcmp(dir_parent, ".")) {
    free(dir_copy);
    return false;
  }
  bool success = create_directory_if_missing(dir_parent) && (0 == mkdir(dir, S_IRWXU));
  free(dir_copy);
  return success;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<create_directory_if_missing>:
  endbr64
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    D8(%rip),%rbx
  mov    (%rbx),%esi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L56
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x80,%eax
  je     L31
  xor    %r12d,%r12d
  cmp    $0x81,%eax
  sete   %r12b
L56:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L31:
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L56
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  call   <dirname@plt>
  cmpb   $0x2e,(%rax)
  mov    %rax,%rdi
  jne    L14
  movzbl 0x1(%rax),%r12d
  test   %r12d,%r12d
  jne    L14
L60:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L14:
  call   <create_directory_if_missing>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L60
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <mkdir@plt>
  test   %rax,%rax
  sete   %r12b
  jmp    L60
```

assistant: ```c
bool create_directory_if_missing(char *dir) {
  if (!mkdir(dir, S_IRWXU))
    return true;
  switch (errno) {
  case EEXIST:
    return true;
  case ENOENT:
    break;
  default:
    return false;
  }
  char *dir_copy, *dir_parent;
  if ((NULL == ((dir_copy) = malloc((strlen(dir) + 1) * sizeof(*(dir_copy))))))
    return false;
  strcpy(dir_copy, dir);
  dir_parent = dirname(dir_copy);
  if (!strcmp(dir_parent, ".")) {
    free(dir_copy);
    return false;
  }
  bool success = create_directory_if_missing(dir_parent) && (0 == mkdir(dir, S_IRWXU));
  free(dir_copy);
  return success;
}
```
user: Translate the below assembly code into C programming language:

```asm
<getUserInput>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movq   $0x4,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  jmp    L26
L11:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x8(%rbp),%rdx
  add    %rax,%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x10(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jb     L26
  shlq   -0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
L26:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %al,-0x19(%rbp)
  mov    D3(%rip),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x19(%rbp)
  je     L32
  cmpb   $0xd,-0x19(%rbp)
  je     L32
  cmpb   $0xa,-0x19(%rbp)
  jne    L11
L32:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x8(%rbp),%rdx
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  leave
  ret
```

assistant: ```c
*getUserInput() {
  size_t size = 4;
  size_t len = 0;
  char *str = malloc(sizeof(char) * size);
  char c;
  while (EOF != (c = getchar()) && c != '\r' && c != '\n') {
    str[len++] = c;
    if (len >= size) {
      str = realloc(str, sizeof(char) * (size *= 2));
    }
  }
  str[len++] = '\0';
  return realloc(str, sizeof(char) * len);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<getUserInput>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x4,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    $0x0,%ebx
  mov    $0x4,%r13d
  jmp    L44
L58:
  mov    %rbp,%rbx
L44:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    D4(%rip),%rdx
  cmp    %al,(%rdx)
  je     L6
  cmp    $0xd,%al
  je     L6
  cmp    $0xa,%al
  je     L6
  lea    0x1(%rbx),%rbp
  mov    %al,(%r12,%rbx,1)
  cmp    %rbp,%r13
  ja     L58
  add    %r13,%r13
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <realloc@plt>
  mov    %rax,%r12
  jmp    L58
L6:
  movb   $0x0,(%r12,%rbx,1)
  lea    0x1(%rbx),%esi
  mov    %r12,%rdi
  call   <realloc@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
*getUserInput() {
  size_t size = 4;
  size_t len = 0;
  char *str = malloc(sizeof(char) * size);
  char c;
  while (EOF != (c = getchar()) && c != '\r' && c != '\n') {
    str[len++] = c;
    if (len >= size) {
      str = realloc(str, sizeof(char) * (size *= 2));
    }
  }
  str[len++] = '\0';
  return realloc(str, sizeof(char) * len);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<getUserInput>:
  endbr64
  push   %r13
  mov    $0x4,%edi
  push   %r12
  mov    $0x4,%r12d
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    D8(%rip),%r13
  mov    %rax,%rbp
  nopw   0x0(%rax,%rax,1)
L49:
  xor    %eax,%eax
  call   <getchar@plt>
  lea    0x0(%rbp,%rbx,1),%rdx
  add    $0x1,%rbx
  cmp    %al,0x0(%r13)
  je     L19
  cmp    $0xd,%al
  je     L19
  cmp    $0xa,%al
  je     L19
  mov    %al,(%rdx)
  cmp    %rbx,%r12
  ja     L49
  add    %r12,%r12
  mov    %rbp,%rdi
  mov    %r12d,%esi
  call   <realloc@plt>
  mov    %rax,%rbp
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L19:
  movb   $0x0,(%rdx)
  add    $0x8,%rsp
  mov    %ebx,%esi
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <realloc@plt>
```

assistant: ```c
*getUserInput() {
  size_t size = 4;
  size_t len = 0;
  char *str = malloc(sizeof(char) * size);
  char c;
  while (EOF != (c = getchar()) && c != '\r' && c != '\n') {
    str[len++] = c;
    if (len >= size) {
      str = realloc(str, sizeof(char) * (size *= 2));
    }
  }
  str[len++] = '\0';
  return realloc(str, sizeof(char) * len);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<getUserInput>:
  endbr64
  push   %r13
  mov    $0x4,%edi
  push   %r12
  mov    $0x4,%r12d
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    D2(%rip),%r13
  mov    %rax,%rbp
  nopw   0x0(%rax,%rax,1)
L1:
  xor    %eax,%eax
  call   <getchar@plt>
  lea    0x0(%rbp,%rbx,1),%rdx
  add    $0x1,%rbx
  cmp    %al,0x0(%r13)
  je     L49
  cmp    $0xd,%al
  je     L49
  cmp    $0xa,%al
  je     L49
  mov    %al,(%rdx)
  cmp    %rbx,%r12
  ja     L1
  add    %r12,%r12
  mov    %rbp,%rdi
  mov    %r12d,%esi
  call   <realloc@plt>
  mov    %rax,%rbp
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L49:
  movb   $0x0,(%rdx)
  add    $0x8,%rsp
  mov    %ebx,%esi
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <realloc@plt>
```

assistant: ```c
*getUserInput() {
  size_t size = 4;
  size_t len = 0;
  char *str = malloc(sizeof(char) * size);
  char c;
  while (EOF != (c = getchar()) && c != '\r' && c != '\n') {
    str[len++] = c;
    if (len >= size) {
      str = realloc(str, sizeof(char) * (size *= 2));
    }
  }
  str[len++] = '\0';
  return realloc(str, sizeof(char) * len);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<dc_dmp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void dc_dmp(char *bf, int sz) {
  if (0) {
    int i, j;
    printf("\n");
    if (sz > 32)
      sz = 32;
    for (i = 0; i < sz;) {
      for (j = 0; j < 16 && i < sz; j++, i++) {
        printf("%02X ", (char)bf[i], (char)bf[i]);
      }
      printf(" : ");
      for (; j > 0; j--) {
        char c = (char)bf[i - j];
        if (c > 30)
          printf("%c", c);
        else
          printf(" ");
      }
      printf("\n");
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<dc_dmp>:
  endbr64
  ret
```

assistant: ```c
void dc_dmp(char *bf, int sz) {
  if (0) {
    int i, j;
    printf("\n");
    if (sz > 32)
      sz = 32;
    for (i = 0; i < sz;) {
      for (j = 0; j < 16 && i < sz; j++, i++) {
        printf("%02X ", (char)bf[i], (char)bf[i]);
      }
      printf(" : ");
      for (; j > 0; j--) {
        char c = (char)bf[i - j];
        if (c > 30)
          printf("%c", c);
        else
          printf(" ");
      }
      printf("\n");
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<dc_dmp>:
  endbr64
  ret
```

assistant: ```c
void dc_dmp(char *bf, int sz) {
  if (0) {
    int i, j;
    printf("\n");
    if (sz > 32)
      sz = 32;
    for (i = 0; i < sz;) {
      for (j = 0; j < 16 && i < sz; j++, i++) {
        printf("%02X ", (char)bf[i], (char)bf[i]);
      }
      printf(" : ");
      for (; j > 0; j--) {
        char c = (char)bf[i - j];
        if (c > 30)
          printf("%c", c);
        else
          printf(" ");
      }
      printf("\n");
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<dc_dmp>:
  endbr64
  ret
```

assistant: ```c
void dc_dmp(char *bf, int sz) {
  if (0) {
    int i, j;
    printf("\n");
    if (sz > 32)
      sz = 32;
    for (i = 0; i < sz;) {
      for (j = 0; j < 16 && i < sz; j++, i++) {
        printf("%02X ", (char)bf[i], (char)bf[i]);
      }
      printf(" : ");
      for (; j > 0; j--) {
        char c = (char)bf[i - j];
        if (c > 30)
          printf("%c", c);
        else
          printf(" ");
      }
      printf("\n");
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<rtcp_xr_dlrr_get_ssrc_receiver>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  mov    -0x10(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  mov    -0x10(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%rax
  add    $0x1c,%rax
  mov    -0x10(%rbp),%rdx
  add    $0xc,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void rtcp_xr_dlrr_get_ssrc_receiver(const uint8_t *p_rtcp_xr_dlrr, uint8_t pi_ssrc[4]) {
  pi_ssrc[0] = p_rtcp_xr_dlrr[4];
  pi_ssrc[1] = p_rtcp_xr_dlrr[5];
  pi_ssrc[2] = p_rtcp_xr_dlrr[6];
  pi_ssrc[3] = p_rtcp_xr_dlrr[7];
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<rtcp_xr_dlrr_get_ssrc_receiver>:
  endbr64
  mov    0x10(%rdi),%eax
  mov    %eax,(%rsi)
  mov    0x14(%rdi),%eax
  mov    %eax,0x4(%rsi)
  mov    0x18(%rdi),%eax
  mov    %eax,0x8(%rsi)
  mov    0x1c(%rdi),%eax
  mov    %eax,0xc(%rsi)
  ret
```

assistant: ```c
void rtcp_xr_dlrr_get_ssrc_receiver(const uint8_t *p_rtcp_xr_dlrr, uint8_t pi_ssrc[4]) {
  pi_ssrc[0] = p_rtcp_xr_dlrr[4];
  pi_ssrc[1] = p_rtcp_xr_dlrr[5];
  pi_ssrc[2] = p_rtcp_xr_dlrr[6];
  pi_ssrc[3] = p_rtcp_xr_dlrr[7];
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<rtcp_xr_dlrr_get_ssrc_receiver>:
  endbr64
  mov    0x10(%rdi),%eax
  mov    %eax,(%rsi)
  mov    0x14(%rdi),%eax
  mov    %eax,0x4(%rsi)
  mov    0x18(%rdi),%eax
  mov    %eax,0x8(%rsi)
  mov    0x1c(%rdi),%eax
  mov    %eax,0xc(%rsi)
  ret
```

assistant: ```c
void rtcp_xr_dlrr_get_ssrc_receiver(const uint8_t *p_rtcp_xr_dlrr, uint8_t pi_ssrc[4]) {
  pi_ssrc[0] = p_rtcp_xr_dlrr[4];
  pi_ssrc[1] = p_rtcp_xr_dlrr[5];
  pi_ssrc[2] = p_rtcp_xr_dlrr[6];
  pi_ssrc[3] = p_rtcp_xr_dlrr[7];
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<rtcp_xr_dlrr_get_ssrc_receiver>:
  endbr64
  mov    0x10(%rdi),%eax
  mov    %eax,(%rsi)
  mov    0x14(%rdi),%eax
  mov    %eax,0x4(%rsi)
  mov    0x18(%rdi),%eax
  mov    %eax,0x8(%rsi)
  mov    0x1c(%rdi),%eax
  mov    %eax,0xc(%rsi)
  ret
```

assistant: ```c
void rtcp_xr_dlrr_get_ssrc_receiver(const uint8_t *p_rtcp_xr_dlrr, uint8_t pi_ssrc[4]) {
  pi_ssrc[0] = p_rtcp_xr_dlrr[4];
  pi_ssrc[1] = p_rtcp_xr_dlrr[5];
  pi_ssrc[2] = p_rtcp_xr_dlrr[6];
  pi_ssrc[3] = p_rtcp_xr_dlrr[7];
}
```
user: Translate the below assembly code into C programming language:

```asm
<add_dependencies>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <list_head@plt>
  mov    %rax,-0x30(%rbp)
  jmp    L18
L20:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <list_get_data@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <get_or_add_node@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <list_head@plt>
  mov    %rax,-0x28(%rbp)
  jmp    L31
L5:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <list_get_data@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <get_or_add_node@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <graph_add_dependency@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <list_next@plt>
  mov    %rax,-0x28(%rbp)
L31:
  cmpq   $0x0,-0x28(%rbp)
  jne    L5
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <list_next@plt>
  mov    %rax,-0x30(%rbp)
L18:
  cmpq   $0x0,-0x30(%rbp)
  jne    L20
  nop
  nop
  leave
  ret
```

assistant: ```c
void add_dependencies(struct graph *graph, struct list *dependents, struct list *dependencies) {
  struct list_item *dependent_item;
  dependent_item = list_head(dependents);
  while (dependent_item != NULL) {
    struct string *dependent_name;
    struct graph_node *dependent;
    struct list_item *dependency_item;
    dependent_name = list_get_data(dependent_item);
    dependent = get_or_add_node(graph, dependent_name);
    dependency_item = list_head(dependencies);
    while (dependency_item != NULL) {
      struct string *dependency_name;
      struct graph_node *dependency;
      dependency_name = list_get_data(dependency_item);
      dependency = get_or_add_node(graph, dependency_name);
      graph_add_dependency(graph, dependent, dependency);
      dependency_item = list_next(dependency_item);
    }
    dependent_item = list_next(dependent_item);
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<add_dependencies>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%rdi
  mov    %rdx,%r14
  call   <list_head@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L13
L16:
  mov    %r13,%rdi
  call   <list_get_data@plt>
  mov    %rax,%rsi
  mov    %rbp,%rdi
  call   <get_or_add_node@plt>
  mov    %rax,%r12
  mov    %r14,%rdi
  call   <list_head@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L6
L19:
  mov    %rbx,%rdi
  call   <list_get_data@plt>
  mov    %rax,%rsi
  mov    %rbp,%rdi
  call   <get_or_add_node@plt>
  mov    %rax,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <graph_add_dependency@plt>
  mov    %rbx,%rdi
  call   <list_next@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L19
L6:
  mov    %r13,%rdi
  call   <list_next@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L16
L13:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
void add_dependencies(struct graph *graph, struct list *dependents, struct list *dependencies) {
  struct list_item *dependent_item;
  dependent_item = list_head(dependents);
  while (dependent_item != NULL) {
    struct string *dependent_name;
    struct graph_node *dependent;
    struct list_item *dependency_item;
    dependent_name = list_get_data(dependent_item);
    dependent = get_or_add_node(graph, dependent_name);
    dependency_item = list_head(dependencies);
    while (dependency_item != NULL) {
      struct string *dependency_name;
      struct graph_node *dependency;
      dependency_name = list_get_data(dependency_item);
      dependency = get_or_add_node(graph, dependency_name);
      graph_add_dependency(graph, dependent, dependency);
      dependency_item = list_next(dependency_item);
    }
    dependent_item = list_next(dependent_item);
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<add_dependencies>:
  endbr64
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  call   <list_head@plt>
  test   %rax,%rax
  je     L5
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L29:
  mov    %r13,%rdi
  call   <list_get_data@plt>
  mov    %rbx,%rdi
  mov    %rax,%rsi
  call   <get_or_add_node@plt>
  mov    %r14,%rdi
  mov    %rax,%r12
  call   <list_head@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L24
  xchg   %ax,%ax
L9:
  mov    %rbp,%rdi
  call   <list_get_data@plt>
  mov    %rbx,%rdi
  mov    %rax,%rsi
  call   <get_or_add_node@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    %rax,%rdx
  call   <graph_add_dependency@plt>
  mov    %rbp,%rdi
  call   <list_next@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L9
L24:
  mov    %r13,%rdi
  call   <list_next@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L29
L5:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
void add_dependencies(struct graph *graph, struct list *dependents, struct list *dependencies) {
  struct list_item *dependent_item;
  dependent_item = list_head(dependents);
  while (dependent_item != NULL) {
    struct string *dependent_name;
    struct graph_node *dependent;
    struct list_item *dependency_item;
    dependent_name = list_get_data(dependent_item);
    dependent = get_or_add_node(graph, dependent_name);
    dependency_item = list_head(dependencies);
    while (dependency_item != NULL) {
      struct string *dependency_name;
      struct graph_node *dependency;
      dependency_name = list_get_data(dependency_item);
      dependency = get_or_add_node(graph, dependency_name);
      graph_add_dependency(graph, dependent, dependency);
      dependency_item = list_next(dependency_item);
    }
    dependent_item = list_next(dependent_item);
  }
}
```