user: What is the c source code of the assembly code below?

```asm
<get_full_path>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7e,%al
  jne    L33
  mov    -0x48(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L33
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rbx,%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D10(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L278
L33:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L247
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rbx,%rax
  add    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D35(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L278
L247:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L278:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x38(%rbp)
L243:
  mov    -0x38(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L267
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L267
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L267
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L267
  mov    -0x38(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L267
  mov    -0x38(%rbp),%rax
  sub    $0x2,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L62
L227:
  subq   $0x1,-0x30(%rbp)
L62:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L201
  mov    -0x30(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  ja     L227
L201:
  mov    -0x30(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jae    L307
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L154
L307:
  mov    -0x30(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L154
  mov    -0x30(%rbp),%rax
  movb   $0x2f,(%rax)
L154:
  addq   $0x2,-0x38(%rbp)
  jmp    L217
L267:
  mov    -0x38(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L51
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L51
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L51
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L51
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  addq   $0x1,-0x38(%rbp)
  jmp    L217
L51:
  mov    -0x38(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L26
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L26
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L26
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L217
L26:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L235
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L235
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L372
L164:
  addq   $0x1,-0x38(%rbp)
L372:
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L164
  jmp    L217
L235:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L242
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L242
  mov    -0x38(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L217
L242:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
L217:
  mov    -0x38(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  je     L213
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L355:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x30(%rbp)
  addq   $0x1,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L355
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x38(%rbp)
L213:
  addq   $0x1,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L162
  mov    -0x38(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jae    L243
L162:
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D0
type: string
name: parse_data
arguments: tag: D10
type: string
name: parse_data
arguments: tag: D4
type: string
name: parse_data
arguments: tag: D35
type: string

tool: D0: HOME

tool: D10: %s%s

tool: D4: PWD

tool: D35: %s/%s

assistant: ```c
char *get_full_path(char *ipath) {
  char *i, *j, *k;
  char *opath, *tmp;
  if (*ipath == '~' && *(ipath + 1) == '/') {
    tmp = getenv("HOME");
    opath = (char *)malloc(strlen(tmp) + strlen(ipath) + 1);
    sprintf(opath, "%s%s", tmp, ipath + 1);
  } else if (*ipath != '/') {
    tmp = getenv("PWD");
    opath = (char *)malloc(strlen(tmp) + strlen(ipath) + 2);
    sprintf(opath, "%s/%s", tmp, ipath);
  } else {
    opath = (char *)malloc(strlen(ipath) + 1);
    strcpy(opath, ipath);
  }
  i = opath;
  do {
    if (i > ipath && *(i + 1) == '.' && *(i - 1) == '/' && *i == '.' && *(i + 2) == '/') {
      j = i - 2;
      while (*j != '/' && j > opath) {
        j--;
      };
      if (j < opath) {
        j = opath;
      } else if (j == opath) {
        *j = '/';
      }
      i += 2;
    } else if (i > ipath && *i == '.' && *(i - 1) == '/' && *(i + 1) == '/') {
      j = i - 1;
      i += 1;
    } else if (i > ipath && *i == '/' && *(i - 1) == '/') {
      j = i - 1;
    } else if (*i == '/' && *(i + 1) == '/') {
      j = i;
      while (*(i + 1) == '/') {
        i += 1;
      }
    } else if (*i == '/' && *(i + 1) == '\0') {
      *i = '\0';
    } else {
      j = i;
    }
    if (i != j) {
      k = j;
      do {
        *j = *i;
        j++;
        i++;
      } while (*i != '\0');
      *j = '\0';
      i = k;
    }
    i++;
  } while (*i != '\0' && i >= opath);
  return opath;
}
```