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

```asm
<cmd_line_cd>:
  endbr64
  push   %rbp
  lea    D6(%rip),%rsi
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  mov    %rdi,%r12
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  call   <strcmp@plt>
  test   %rax,%rax
  je     L76
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rsp,%rcx
  add    $0x10,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L5
L40:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L40
L5:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L9
  orq    $0x0,-0x8(%rsp,%rdx,1)
L9:
  mov    %r12,%rsi
  mov    %rsp,%rdi
  lea    D1(%rip),%r13
  call   <strcpy@plt>
  lea    D36(%rip),%rsi
  mov    %rsp,%rdi
  call   <strtok@plt>
  cmpb   $0x0,(%rax)
  mov    %rax,%r12
  je     L111
  mov    %r13,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L111
  lea    -0x120(%rbp),%r13
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <get_abs_path@plt>
  cmpb   $0x0,-0x120(%rbp)
  je     L2
  mov    $0x3,%esi
  mov    %r13,%rdi
  call   <iso_dopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L108
  mov    %r13,%rdi
  call   <set_cur_path@plt>
L23:
  mov    %r12,%rdi
  call   <iso_dclose@plt>
  jmp    L44
  cs nopw 0x0(%rax,%rax,1)
L76:
  lea    D52(%rip),%rdi
  call   <puts@plt>
L44:
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  lea    -0x10(%rbp),%rsp
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopl   (%rax)
L111:
  mov    %r13,%rdi
  call   <set_cur_path@plt>
  jmp    L44
  nopw   0x0(%rax,%rax,1)
L2:
  lea    D14(%rip),%rdi
  call   <puts@plt>
  jmp    L44
  cs nopw 0x0(%rax,%rax,1)
L108:
  mov    %r13,%rsi
  lea    D57(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L23
L73:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D6
data_type: string
name: parse_data
arguments: label: D1
data_type: string
name: parse_data
arguments: label: D36
data_type: string
name: parse_data
arguments: label: D52
data_type: string
name: parse_data
arguments: label: D14
data_type: string
name: parse_data
arguments: label: D57
data_type: string

tool: D6: --HELP

tool: D1: /

tool: D36:  

tool: D52: Change the current working directory
usage: cd <directory path>

tool: D14: cd: root has no parent

tool: D57: cd: no such path %s


assistant: ```c
void cmd_line_cd(const char *arg_line) {
  if (strcmp(arg_line, "--HELP") == 0) {
    printf("Change the current working directory\nusage: cd <directory path>\n");
    return;
  }
  char line_copy[strlen(arg_line) + 1];
  strcpy(line_copy, arg_line);
  char *first_word = strtok(line_copy, " ");
  if (strlen(first_word) == 0 || strcmp(first_word, "/") == 0) {
    set_cur_path("/");
    return;
  }
  char abs_path[256];
  get_abs_path(first_word, abs_path);
  if (!abs_path[0]) {
    printf("cd: root has no parent\n");
    return;
  }
  struct iso_dir *dir = iso_dopen(abs_path, 3);
  if (!dir) {
    printf("cd: no such path %s\n", abs_path);
  } else {
    set_cur_path(abs_path);
  }
  iso_dclose(dir);
  return;
}
```