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

```asm
<set_filter_flags>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  test   %rdi,%rdi
  je     L563
  mov    %rdi,%rbx
  call   <strlen@plt>
  cmp    $0x1,%eax
  jle    L628
  mov    %rsp,%rdx
  lea    D66(%rip),%rsi
  mov    %rbx,%rdi
  call   <strtok_r@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L38
  mov    $0x0,%ebp
  lea    D73(%rip),%r12
  lea    D98(%rip),%r13
  lea    D267(%rip),%r14
  lea    D242(%rip),%r15
  jmp    L151
L419:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L371
  or     $0x2,%ebp
L102:
  mov    %rsp,%rdx
  lea    D66(%rip),%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L119
L151:
  cmpq   $0x0,(%rsp)
  je     L613
  movb   $0x2c,-0x1(%rbx)
L613:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L419
  or     $0x1,%ebp
  jmp    L102
L371:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L138
  or     $0x4,%ebp
  jmp    L102
L138:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L486
  or     $0x8,%ebp
  jmp    L102
L486:
  lea    D211(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L45
  or     $0x10,%ebp
  jmp    L102
L45:
  lea    D236(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L23
  or     $0x20,%ebp
  jmp    L102
L23:
  lea    D218(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L269
  or     $0x2000,%ebp
  jmp    L102
L269:
  lea    D81(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L195
  or     $0x4000,%ebp
  jmp    L102
L195:
  lea    D224(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L449
  or     $0xc000,%ebp
  jmp    L102
L449:
  lea    D54(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L631
  or     $0x10000,%ebp
  jmp    L102
L631:
  lea    D168(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L139
  or     $0x20000,%ebp
  jmp    L102
L139:
  lea    D325(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L342
  or     $0x40000,%ebp
  jmp    L102
L342:
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L580
  or     $0x80000,%ebp
  jmp    L102
L580:
  lea    D169(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L591
  or     $0x40,%ebp
  jmp    L102
L591:
  lea    D184(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L365
L581:
  or     $0xc0,%bpl
  jmp    L102
L365:
  lea    D36(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L581
  lea    D209(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L394
  test   $0x40,%bpl
  jne    L581
L394:
  lea    D92(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L255
L280:
  or     $0x140,%ebp
  jmp    L102
L255:
  lea    D71(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L280
  lea    D196(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L413
  test   $0x40,%bpl
  jne    L280
L413:
  lea    D124(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L174
L528:
  or     $0x240,%ebp
  jmp    L102
L174:
  lea    D260(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L528
  lea    D263(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L638
  test   $0x40,%bpl
  jne    L528
L638:
  lea    D176(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L344
  lea    D234(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L344
  lea    D317(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L554
  test   $0x40,%bpl
  je     L554
L344:
  or     $0x440,%ebp
  jmp    L102
L554:
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L635
  lea    D85(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L635
  lea    D259(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L291
  test   $0x40,%bpl
  je     L291
L635:
  or     $0x840,%ebp
  jmp    L102
L291:
  lea    D189(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L42
  lea    D126(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L42
  lea    D88(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L102
L42:
  or     $0x1040,%ebp
  jmp    L102
L563:
  mov    $0xffffffff,%ebp
  jmp    L119
L628:
  mov    $0xffffffff,%ebp
  jmp    L119
L38:
  mov    $0x0,%ebp
L119:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L587
  mov    %ebp,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L587:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D66
type_guessed: string
name: read_data
arguments: tag: D73
type_guessed: string
name: read_data
arguments: tag: D98
type_guessed: string
name: read_data
arguments: tag: D267
type_guessed: string
name: read_data
arguments: tag: D242
type_guessed: string
name: read_data
arguments: tag: D211
type_guessed: string
name: read_data
arguments: tag: D236
type_guessed: string
name: read_data
arguments: tag: D218
type_guessed: string
name: read_data
arguments: tag: D81
type_guessed: string
name: read_data
arguments: tag: D224
type_guessed: string
name: read_data
arguments: tag: D54
type_guessed: string
name: read_data
arguments: tag: D168
type_guessed: string
name: read_data
arguments: tag: D325
type_guessed: string
name: read_data
arguments: tag: D114
type_guessed: string
name: read_data
arguments: tag: D169
type_guessed: string
name: read_data
arguments: tag: D184
type_guessed: string
name: read_data
arguments: tag: D36
type_guessed: string
name: read_data
arguments: tag: D209
type_guessed: string
name: read_data
arguments: tag: D92
type_guessed: string
name: read_data
arguments: tag: D71
type_guessed: string
name: read_data
arguments: tag: D196
type_guessed: string
name: read_data
arguments: tag: D124
type_guessed: string
name: read_data
arguments: tag: D260
type_guessed: string
name: read_data
arguments: tag: D263
type_guessed: string
name: read_data
arguments: tag: D176
type_guessed: string
name: read_data
arguments: tag: D234
type_guessed: string
name: read_data
arguments: tag: D317
type_guessed: string
name: read_data
arguments: tag: D48
type_guessed: string
name: read_data
arguments: tag: D85
type_guessed: string
name: read_data
arguments: tag: D259
type_guessed: string
name: read_data
arguments: tag: D189
type_guessed: string
name: read_data
arguments: tag: D126
type_guessed: string
name: read_data
arguments: tag: D88
type_guessed: string

tool: D66: ,

tool: D73: @childCount

tool: D98: dc:creator

tool: D267: dc:date

tool: D242: dc:description

tool: D211: dlna

tool: D236: @refID

tool: D218: upnp:album

tool: D81: upnp:albumArtURI

tool: D224: upnp:albumArtURI@dlna:profileID

tool: D54: upnp:artist

tool: D168: upnp:genre

tool: D325: upnp:originalTrackNumber

tool: D114: upnp:searchClass

tool: D169: res

tool: D184: res@bitrate

tool: D36: @bitrate

tool: D209: bitrate

tool: D92: res@duration

tool: D71: @duration

tool: D196: duration

tool: D124: res@nrAudioChannels

tool: D260: @nrAudioChannels

tool: D263: nrAudioChannels

tool: D176: res@resolution

tool: D234: @resolution

tool: D317: resolution

tool: D48: res@sampleFrequency

tool: D85: @sampleFrequency

tool: D259: sampleFrequency

tool: D189: res@size

tool: D126: @size

tool: D88: size

assistant: ```c
u_int32_t set_filter_flags(char *filter) {
  char *item, *saveptr = NULL;
  u_int32_t flags = 0;
  if (!filter || (strlen(filter) <= 1))
    return 0xFFFFFFFF;
  item = strtok_r(filter, ",", &saveptr);
  while (item != NULL) {
    if (saveptr)
      *(item - 1) = ',';
    if (strcmp(item, "@childCount") == 0) {
      flags |= 0x00000001;
    } else if (strcmp(item, "dc:creator") == 0) {
      flags |= 0x00000002;
    } else if (strcmp(item, "dc:date") == 0) {
      flags |= 0x00000004;
    } else if (strcmp(item, "dc:description") == 0) {
      flags |= 0x00000008;
    } else if (strcmp(item, "dlna") == 0) {
      flags |= 0x00000010;
    } else if (strcmp(item, "@refID") == 0) {
      flags |= 0x00000020;
    } else if (strcmp(item, "upnp:album") == 0) {
      flags |= 0x00002000;
    } else if (strcmp(item, "upnp:albumArtURI") == 0) {
      flags |= 0x00004000;
    } else if (strcmp(item, "upnp:albumArtURI@dlna:profileID") == 0) {
      flags |= 0x00004000;
      flags |= 0x00008000;
    } else if (strcmp(item, "upnp:artist") == 0) {
      flags |= 0x00010000;
    } else if (strcmp(item, "upnp:genre") == 0) {
      flags |= 0x00020000;
    } else if (strcmp(item, "upnp:originalTrackNumber") == 0) {
      flags |= 0x00040000;
    } else if (strcmp(item, "upnp:searchClass") == 0) {
      flags |= 0x00080000;
    } else if (strcmp(item, "res") == 0) {
      flags |= 0x00000040;
    } else if ((strcmp(item, "res@bitrate") == 0) || (strcmp(item, "@bitrate") == 0) || ((strcmp(item, "bitrate") == 0) && (flags & 0x00000040))) {
      flags |= 0x00000040;
      flags |= 0x00000080;
    } else if ((strcmp(item, "res@duration") == 0) || (strcmp(item, "@duration") == 0) || ((strcmp(item, "duration") == 0) && (flags & 0x00000040))) {
      flags |= 0x00000040;
      flags |= 0x00000100;
    } else if ((strcmp(item, "res@nrAudioChannels") == 0) || (strcmp(item, "@nrAudioChannels") == 0) || ((strcmp(item, "nrAudioChannels") == 0) && (flags & 0x00000040))) {
      flags |= 0x00000040;
      flags |= 0x00000200;
    } else if ((strcmp(item, "res@resolution") == 0) || (strcmp(item, "@resolution") == 0) || ((strcmp(item, "resolution") == 0) && (flags & 0x00000040))) {
      flags |= 0x00000040;
      flags |= 0x00000400;
    } else if ((strcmp(item, "res@sampleFrequency") == 0) || (strcmp(item, "@sampleFrequency") == 0) || ((strcmp(item, "sampleFrequency") == 0) && (flags & 0x00000040))) {
      flags |= 0x00000040;
      flags |= 0x00000800;
    } else if ((strcmp(item, "res@size") == 0) || (strcmp(item, "@size") == 0) || (strcmp(item, "size") == 0)) {
      flags |= 0x00000040;
      flags |= 0x00001000;
    }
    item = strtok_r(NULL, ",", &saveptr);
  }
  return flags;
}
```