user: Demonstrate the C code that generates the assembly output below:

```asm
<get_link_category>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  test   %rdi,%rdi
  je     L41
  lea    D113(%rip),%rsi
  mov    %rdi,%rbp
  call   <strstr@plt>
  test   %rax,%rax
  jne    L38
  lea    D107(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L111
  lea    D120(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  xor    %eax,%eax
L59:
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L38:
  mov    %r13d,%esi
  mov    %r12,%rdi
  lea    D159(%rip),%rdx
  call   <snprintf@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L111:
  lea    D65(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L69
  lea    D93(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L39
  lea    D141(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  xor    %eax,%eax
  jmp    L59
  xchg   %ax,%ax
L69:
  mov    %r13d,%esi
  mov    %r12,%rdi
  lea    D5(%rip),%rdx
  call   <snprintf@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L39:
  lea    D4(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L64
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L40
  lea    D146(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L123
L40:
  lea    D84(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  xor    %eax,%eax
  jmp    L59
  nopl   (%rax)
L64:
  lea    D91(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  xor    %eax,%eax
  jmp    L59
L123:
  lea    D32(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L69
  lea    D48(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  xor    %eax,%eax
  jmp    L59
L41:
  lea    D5(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  mov    $0xffffffff,%eax
  jmp    L59
```

tool_calls: name: disassemble_data
arguments: data_tag: D113
datatype: string
name: disassemble_data
arguments: data_tag: D107
datatype: string
name: disassemble_data
arguments: data_tag: D120
datatype: string
name: disassemble_data
arguments: data_tag: D159
datatype: string
name: disassemble_data
arguments: data_tag: D65
datatype: string
name: disassemble_data
arguments: data_tag: D93
datatype: string
name: disassemble_data
arguments: data_tag: D141
datatype: string
name: disassemble_data
arguments: data_tag: D5
datatype: string
name: disassemble_data
arguments: data_tag: D4
datatype: string
name: disassemble_data
arguments: data_tag: D24
datatype: string
name: disassemble_data
arguments: data_tag: D146
datatype: string
name: disassemble_data
arguments: data_tag: D84
datatype: string
name: disassemble_data
arguments: data_tag: D91
datatype: string
name: disassemble_data
arguments: data_tag: D32
datatype: string
name: disassemble_data
arguments: data_tag: D48
datatype: string

tool: D113: .rm

tool: D107: .ram

tool: D120: ram

tool: D159: rm

tool: D65: .mp3

tool: D93: .wma

tool: D141: wma

tool: D5: mp3

tool: D4: .asf

tool: D24: .swf

tool: D146: .flash

tool: D84: swf

tool: D91: asf

tool: D32: .rtsp

tool: D48: rtsp

assistant: ```c
int get_link_category(const char *link, char *type, int size) {
  if (NULL == link) {
    snprintf(type, size, "mp3");
    return -1;
  }
  if (strstr(link, ".rm")) {
    snprintf(type, size, "rm");
  } else if (strstr(link, ".ram")) {
    snprintf(type, size, "ram");
  } else if (strstr(link, ".mp3")) {
    snprintf(type, size, "mp3");
  } else if (strstr(link, ".wma")) {
    snprintf(type, size, "wma");
  } else if (strstr(link, ".asf")) {
    snprintf(type, size, "asf");
  } else if (strstr(link, ".swf") || strstr(link, ".flash")) {
    snprintf(type, size, "swf");
  } else if (strstr(link, ".rtsp")) {
    snprintf(type, size, "rtsp");
  } else {
    snprintf(type, size, "mp3");
  }
  return 0;
}
```