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

```asm
<parse_file_uri>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <alsaplayer_error@plt>
  cmpq   $0x0,-0x38(%rbp)
  jne    L147
  mov    $0x0,%eax
  jmp    L76
L147:
  mov    -0x38(%rbp),%rax
  mov    $0x5,%edx
  lea    D43(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L95
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <is_uri@plt>
  test   %eax,%eax
  jne    L128
L95:
  mov    $0x0,%eax
  jmp    L76
L128:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x5,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L155
L113:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x25,%eax
  jne    L67
  cmpl   $0x0,-0x24(%rbp)
  je     L99
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x25,(%rax)
  movl   $0x0,-0x24(%rbp)
  jmp    L2
L99:
  movl   $0x1,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L2
L67:
  cmpl   $0x0,-0x24(%rbp)
  je     L49
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  movzbl (%rcx),%edx
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  mov    -0x20(%rbp),%eax
  cltq
  movb   $0x0,-0xc(%rbp,%rax,1)
  cmpl   $0x2,-0x20(%rbp)
  jne    L83
  lea    -0x30(%rbp),%rdx
  lea    -0xc(%rbp),%rax
  lea    D49(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L142
  mov    -0x30(%rbp),%ecx
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L40
L142:
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <alsaplayer_error@plt>
L40:
  movl   $0x0,-0x24(%rbp)
  jmp    L83
L49:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
L83:
  nop
L2:
  addl   $0x1,-0x2c(%rbp)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L155:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L113
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <alsaplayer_error@plt>
  mov    -0x18(%rbp),%rax
L76:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L108
  call   <__stack_chk_fail@plt>
L108:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D28
type_infered: string
name: disassemble_data
arguments: label: D43
type_infered: string
name: disassemble_data
arguments: label: D49
type_infered: string
name: disassemble_data
arguments: label: D2
type_infered: string
name: disassemble_data
arguments: label: D48
type_infered: string

tool: D28: parsing: %s

tool: D43: file:

tool: D49: %x

tool: D2: unandled percent escape (%s)

tool: D48: parsed to: %s

assistant: ```c
char *parse_file_uri(const char *furi) {
  char *res;
  char escape[4];
  int r, w, t, percent, e, val;
  alsaplayer_error("parsing: %s", furi);
  if (!furi)
    return NULL;
  if ((strncmp(furi, "file:", 5) != 0) || !is_uri(furi)) {
    return NULL;
  }
  t = strlen(furi);
  res = malloc(t + 1);
  r = 5;
  w = 0;
  e = 0;
  percent = 0;
  while (r < t) {
    switch (furi[r]) {
    case '%':
      if (percent) {
        res[w++] = '%';
        percent = 0;
      } else {
        percent = 1;
        e = 0;
      }
      break;
    default:
      if (percent) {
        escape[e++] = furi[r];
        escape[e] = 0;
        if (e == 2) {
          if ((sscanf(escape, "%x", &val) == 1)) {
            res[w++] = val;
          } else {
            alsaplayer_error("unandled percent escape (%s)", escape);
          }
          percent = 0;
        }
      } else {
        res[w++] = furi[r];
      }
      break;
    }
    r++;
    res[w] = 0;
  }
  alsaplayer_error("parsed to: %s", res);
  return res;
}
```