user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<normalizeURL>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L280
  cmp    $0x2f,%dl
  je     L280
  mov    $0x1,%eax
L416:
  mov    %eax,%r12d
  movzbl 0x0(%rbp,%rax,1),%ecx
  add    $0x1,%rax
  test   %cl,%cl
  je     L166
  cmp    $0x2f,%cl
  jne    L416
L166:
  mov    %rbp,%rbx
  mov    $0x0,%r13d
  jmp    L193
L280:
  test   %dl,%dl
  jne    L60
L377:
  movzbl 0x2(%rbp),%eax
  test   %al,%al
  je     L23
  mov    $0x2,%ebx
  mov    $0x2,%edx
  jmp    L7
L60:
  mov    $0x0,%r12d
  jmp    L166
L245:
  mov    %rbx,%rdi
  call   <percent_encoding@plt>
  jmp    L292
L220:
  add    $0x20,%eax
  mov    %al,(%rbx)
  jmp    L88
L364:
  movb   $0x0,(%rbx)
L88:
  add    $0x1,%r13d
  add    $0x1,%rbx
  movzbl (%rbx),%edx
  test   %dl,%dl
  je     L377
L193:
  cmp    $0x25,%dl
  je     L245
L292:
  movzbl (%rbx),%eax
  lea    -0x41(%rax),%edx
  cmp    $0x19,%dl
  ja     L186
  cmp    %r13d,%r12d
  jg     L220
L186:
  cmp    $0x23,%al
  je     L364
  cmpb   $0x3a,(%rbx)
  jne    L88
  cmp    $0x5,%r13d
  jle    L88
  cmpb   $0x38,0x1(%rbx)
  je     L376
L350:
  cmpb   $0x2f,0x1(%rbx)
  jne    L88
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  jmp    L88
L376:
  cmpb   $0x30,0x2(%rbx)
  jne    L88
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  jmp    L350
L347:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  jmp    L274
L1:
  movslq %r12d,%rax
  cmpb   $0x2f,-0x1(%rbp,%rax,1)
  je     L94
  lea    0x1(%rbx),%eax
  mov    %r12d,%r13d
  cmp    %r12d,%eax
  jl     L381
L167:
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  mov    %r13d,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jge    L167
  mov    %r12d,%ebx
L31:
  movslq %ebx,%rax
  cmpb   $0x2f,0x1(%rbp,%rax,1)
  je     L209
L274:
  add    $0x1,%ebx
  movslq %ebx,%rdx
  lea    0x0(%rbp,%rdx,1),%rcx
  movzbl (%rcx),%eax
  test   %al,%al
  je     L414
L7:
  cmp    $0x2e,%al
  jne    L274
  cmpb   $0x2f,-0x1(%rbp,%rdx,1)
  jne    L274
  movzbl 0x1(%rbp,%rdx,1),%eax
  test   %al,%al
  je     L347
  cmp    $0x2e,%al
  jne    L31
  cmpb   $0x2f,0x2(%rbp,%rdx,1)
  jne    L31
  lea    -0x2(%rbx),%r12d
  cmp    $0x1,%r12d
  jle    L1
  movslq %r12d,%rax
  add    %rbp,%rax
L93:
  cmpb   $0x2f,(%rax)
  je     L1
  sub    $0x1,%r12d
  sub    $0x1,%rax
  cmp    $0x1,%r12d
  jne    L93
  jmp    L1
L381:
  mov    %r12d,%ebx
  jmp    L31
L94:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  jmp    L31
L209:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <str_del@plt>
  jmp    L274
L23:
  lea    0x2(%rbp),%rcx
  mov    $0x2,%edx
L414:
  cmpb   $0x2f,-0x1(%rbp,%rdx,1)
  je     L342
  movb   $0x0,(%rcx)
L342:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void normalizeURL(char *url) {
  int i, j, k;
  int pos_sl = 0;
  int nb = 0;
  while (url[pos_sl] != '/' && nb <= 3 && url[pos_sl] != '\0')
    pos_sl++;
  i = 0;
  while (url[i] != '\0') {
    if (url[i] == '%') {
      percent_encoding(&url[i]);
    }
    if (url[i] >= 'A' && url[i] <= 'Z' && i < pos_sl)
      url[i] += 32;
    if (url[i] == '#')
      url[i] = '\0';
    if (url[i] == ':' && i > 5) {
      if (url[i + 1] == '8' && url[i + 2] == '0') {
        str_del(url, i);
        str_del(url, i);
        str_del(url, i);
      }
      if (url[i + 1] == '/')
        str_del(url, i);
    }
    i++;
  }
  i = 2;
  while (url[i] != '\0') {
    if (url[i] == '.' && url[i - 1] == '/') {
      if (url[i + 1] == '\0')
        str_del(url, i);
      else {
        if (url[i + 1] == '.' && url[i + 2] == '/') {
          j = i - 2;
          while (j > 1 && url[j] != '/')
            j--;
          if (url[j - 1] == '/')
            str_del(url, i);
          else {
            for (k = j; k < i + 2; k++) {
              str_del(url, j);
            }
            i -= i - j;
          }
        }
        if (url[i + 1] == '/') {
          str_del(url, i);
          str_del(url, i);
        }
      }
    }
    i++;
  }
  if (url[i - 1] != '/') {
    url[i] = '\0';
  }
}
```