user: 请将以下的汇编代码转换成C语言代码:

```asm
<cmd_line_cd>:
  endbr64
  push   %rbp
  lea    D9(%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     L57
  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     L46
L15:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L15
L46:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L22
  orq    $0x0,-0x8(%rsp,%rdx,1)
L22:
  mov    %r12,%rsi
  mov    %rsp,%rdi
  lea    D27(%rip),%r13
  call   <strcpy@plt>
  lea    D10(%rip),%rsi
  mov    %rsp,%rdi
  call   <strtok@plt>
  cmpb   $0x0,(%rax)
  mov    %rax,%r12
  je     L7
  mov    %r13,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L7
  lea    -0x120(%rbp),%r13
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <get_abs_path@plt>
  cmpb   $0x0,-0x120(%rbp)
  je     L84
  mov    $0x3,%esi
  mov    %r13,%rdi
  call   <iso_dopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L8
  mov    %r13,%rdi
  call   <set_cur_path@plt>
L120:
  mov    %r12,%rdi
  call   <iso_dclose@plt>
  jmp    L44
  cs nopw 0x0(%rax,%rax,1)
L57:
  lea    D57(%rip),%rdi
  call   <puts@plt>
L44:
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  lea    -0x10(%rbp),%rsp
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopl   (%rax)
L7:
  mov    %r13,%rdi
  call   <set_cur_path@plt>
  jmp    L44
  nopw   0x0(%rax,%rax,1)
L84:
  lea    D33(%rip),%rdi
  call   <puts@plt>
  jmp    L44
  cs nopw 0x0(%rax,%rax,1)
L8:
  mov    %r13,%rsi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L120
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D9
data_type: string
name: parse_data
arguments: label: D27
data_type: string
name: parse_data
arguments: label: D10
data_type: string
name: parse_data
arguments: label: D57
data_type: string
name: parse_data
arguments: label: D33
data_type: string
name: parse_data
arguments: label: D2
data_type: string

tool: D9: --HELP

tool: D27: /

tool: D10:  

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

tool: D33: cd: root has no parent

tool: D2: 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;
}
```