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

```asm
<geturl>:
  endbr64
  push   %r12
  mov    $0x2,%edx
  mov    %rdi,%r12
  push   %rbp
  lea    0x1(%rdi),%rbp
  lea    D111(%rip),%rdi
  mov    %rbp,%rsi
  sub    $0x8,%rsp
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L105
  mov    $0x5,%edx
  mov    %rbp,%rsi
  lea    D14(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L25
L105:
  mov    %r12,%rdi
  lea    D19(%rip),%rsi
  call   <tagoption@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L120
  cmpb   $0x23,(%rax)
  je     L120
  mov    $0x7,%edx
  mov    %rax,%rsi
  lea    D27(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L120
  mov    $0x23,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L121
  mov    %r12,%rdi
  mov    $0x23,%esi
  call   <strchr@plt>
  movb   $0x0,(%rax)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L120:
  xor    %r12d,%r12d
L121:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L25:
  mov    $0x5,%edx
  mov    %rbp,%rsi
  lea    D115(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L105
  mov    $0x5,%edx
  mov    %rbp,%rsi
  lea    D124(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L105
  mov    $0x4,%edx
  mov    %rbp,%rsi
  lea    D118(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L42
  mov    $0x8,%edx
  mov    %rbp,%rsi
  lea    D60(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L42
  mov    $0x6,%edx
  mov    %rbp,%rsi
  lea    D116(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L42
  mov    $0x6,%edx
  mov    %rbp,%rsi
  lea    D30(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L42
  mov    $0x7,%edx
  mov    %rbp,%rsi
  lea    D17(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  je     L42
  mov    $0x5,%edx
  mov    %rbp,%rsi
  lea    D136(%rip),%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L120
  lea    D50(%rip),%rsi
L102:
  add    $0x8,%rsp
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  jmp    1090 <tagoption@plt>
  nopw   0x0(%rax,%rax,1)
L42:
  lea    D82(%rip),%rsi
  jmp    L102
```

tool_calls: name: parse_data
arguments: tag: D111
type_guessed: string
name: parse_data
arguments: tag: D14
type_guessed: string
name: parse_data
arguments: tag: D19
type_guessed: string
name: parse_data
arguments: tag: D27
type_guessed: string
name: parse_data
arguments: tag: D115
type_guessed: string
name: parse_data
arguments: tag: D124
type_guessed: string
name: parse_data
arguments: tag: D118
type_guessed: string
name: parse_data
arguments: tag: D60
type_guessed: string
name: parse_data
arguments: tag: D116
type_guessed: string
name: parse_data
arguments: tag: D30
type_guessed: string
name: parse_data
arguments: tag: D17
type_guessed: string
name: parse_data
arguments: tag: D136
type_guessed: string
name: parse_data
arguments: tag: D50
type_guessed: string
name: parse_data
arguments: tag: D82
type_guessed: string

tool: D111: a 

tool: D14: area 

tool: D19: href

tool: D27: mailto:

tool: D115: base 

tool: D124: link 

tool: D118: img 

tool: D60: bgsound 

tool: D116: embed 

tool: D30: frame 

tool: D17: iframe 

tool: D136: body 

tool: D50: background

tool: D82: src

assistant: ```c
char *geturl(char *tag) {
  char *tmp;
  if (0)
    printf("geturl: %s\n", tag);
  if (!strncasecmp("a ", tag + 1, 2) || !strncasecmp("area ", tag + 1, 5) || !strncasecmp("base ", tag + 1, 5) || !strncasecmp("link ", tag + 1, 5)) {
    tmp = tagoption(tag, "href");
    if (!tmp)
      return NULL;
    if (tmp[0] == '#')
      return NULL;
    if (!strncasecmp("mailto:", tmp, 7))
      return NULL;
    if (strchr(tmp, '#'))
      *strchr(tmp, '#') = '\0';
    return tmp;
  }
  if (!strncasecmp("img ", tag + 1, 4) || !strncasecmp("bgsound ", tag + 1, 8) || !strncasecmp("embed ", tag + 1, 6) || !strncasecmp("frame ", tag + 1, 6) || !strncasecmp("iframe ", tag + 1, 7))
    return tagoption(tag, "src");
  if (!strncasecmp("body ", tag + 1, 5))
    return tagoption(tag, "background");
  return NULL;
}
```