user: Converte this assembly snippet into its equivalent C code:

```asm
<NormalizeURL>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jg     L75
  mov    $0x0,%eax
  jmp    L50
L75:
  mov    -0x4(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L80
  mov    -0x4(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  subl   $0x1,-0x4(%rbp)
L80:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jg     L191
  mov    $0x0,%eax
  jmp    L50
L191:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L104
L207:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L192
  subl   $0x1,-0xc(%rbp)
L104:
  cmpl   $0x0,-0xc(%rbp)
  jns    L207
  jmp    L97
L192:
  nop
L97:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L120
L43:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L78
  subl   $0x1,-0x8(%rbp)
L120:
  cmpl   $0x0,-0x8(%rbp)
  jns    L43
  jmp    L93
L78:
  nop
L93:
  cmpl   $0x6,-0x8(%rbp)
  jle    L105
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jle    L105
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x4(%rbp)
  jle    L105
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  lea    D15(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L60
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  lea    D7(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L60
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  lea    D23(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L60
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  lea    D39(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L60
  mov    $0x0,%eax
  jmp    L50
L60:
  nop
L105:
  mov    $0x1,%eax
L50:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D15
type_infered: string
name: extract_symbolic_data
arguments: tag: D7
type_infered: string
name: extract_symbolic_data
arguments: tag: D23
type_infered: string
name: extract_symbolic_data
arguments: tag: D39
type_infered: string

tool: D15: .htm

tool: D7: .HTM

tool: D23: .php

tool: D39: .jsp

assistant: ```c
int NormalizeURL(char *URL) {
  int len = strlen(URL);
  if (len <= 1)
    return 0;
  if (URL[len - 1] == '/') {
    URL[len - 1] = 0;
    len--;
  }
  int i, j;
  len = strlen(URL);
  if (len < 2)
    return 0;
  for (i = len - 1; i >= 0; i--)
    if (URL[i] == '.')
      break;
  for (j = len - 1; j >= 0; j--)
    if (URL[j] == '/')
      break;
  if ((j >= 7) && (i > j) && ((i + 2) < len)) {
    if ((!strncmp((URL + i), ".htm", 4)) || (!strncmp((URL + i), ".HTM", 4)) || (!strncmp((URL + i), ".php", 4)) || (!strncmp((URL + i), ".jsp", 4))) {
      len = len;
    } else {
      return 0;
    }
  }
  return 1;
}
```