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

```asm
<strip_directory_from_filename>:
  endbr64
  mov    D4(%rip),%rax
  mov    %rdi,%rcx
  mov    %rsi,%rdi
  movslq (%rax),%rsi
  test   %esi,%esi
  jle    L221
  xor    %eax,%eax
  mov    $0xffffffff,%r9d
  jmp    L182
  cs nopw 0x0(%rax,%rax,1)
L49:
  test   %dl,%dl
  je     L177
  cmp    $0xa,%dl
  je     L177
L217:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L221
L182:
  movzbl (%rcx,%rax,1),%edx
  mov    %eax,%r8d
  cmp    $0x2f,%dl
  jne    L49
  mov    %eax,%r9d
  jmp    L217
  nopw   0x0(%rax,%rax,1)
L177:
  lea    0x1(%r9),%esi
  cmp    %r8d,%esi
  jge    L221
  movslq %r9d,%r10
  sub    %r9d,%eax
  mov    %rdi,%r9
  lea    0x2(%rcx,%r10,1),%r11
  lea    -0x2(%rax),%edx
  sub    %r11,%r9
  cmp    $0xe,%r9
  jbe    L197
  cmp    $0x6,%edx
  jbe    L197
  push   %rbx
  lea    -0x1(%rax),%r11d
  cmp    $0xe,%edx
  jbe    L90
  mov    %r11d,%r9d
  lea    0x1(%rcx,%r10,1),%rbx
  xor    %edx,%edx
  shr    $0x4,%r9d
  shl    $0x4,%r9
  nopl   0x0(%rax)
L180:
  movdqu (%rbx,%rdx,1),%xmm0
  movups %xmm0,(%rdi,%rdx,1)
  add    $0x10,%rdx
  cmp    %r9,%rdx
  jne    L180
  mov    %r11d,%edx
  and    $0xfffffff0,%edx
  mov    %edx,%r9d
  add    %edx,%esi
  cmp    %edx,%r11d
  je     L99
  sub    %edx,%eax
  lea    -0x1(%rax),%ebx
  sub    $0x2,%eax
  cmp    $0x6,%eax
  jbe    L69
L26:
  add    %rcx,%r10
  mov    0x1(%rdx,%r10,1),%rax
  mov    %rax,(%rdi,%rdx,1)
  mov    %ebx,%eax
  and    $0xfffffff8,%eax
  add    %eax,%esi
  add    %eax,%r9d
  cmp    %eax,%ebx
  je     L99
L69:
  movslq %esi,%rax
  movzbl (%rcx,%rax,1),%edx
  movslq %r9d,%rax
  mov    %dl,(%rdi,%rax,1)
  lea    0x1(%rsi),%eax
  lea    0x1(%r9),%edx
  cmp    %eax,%r8d
  jle    L99
  cltq
  movslq %edx,%rdx
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdi,%rdx,1)
  lea    0x2(%rsi),%eax
  lea    0x2(%r9),%edx
  cmp    %eax,%r8d
  jle    L99
  cltq
  movslq %edx,%rdx
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdi,%rdx,1)
  lea    0x3(%rsi),%eax
  lea    0x3(%r9),%edx
  cmp    %eax,%r8d
  jle    L99
  cltq
  movslq %edx,%rdx
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdi,%rdx,1)
  lea    0x4(%rsi),%eax
  lea    0x4(%r9),%edx
  cmp    %eax,%r8d
  jle    L99
  cltq
  movslq %edx,%rdx
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdi,%rdx,1)
  lea    0x5(%rsi),%eax
  lea    0x5(%r9),%edx
  cmp    %eax,%r8d
  jle    L99
  cltq
  movslq %edx,%rdx
  add    $0x6,%esi
  add    $0x6,%r9d
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdi,%rdx,1)
  cmp    %esi,%r8d
  jle    L99
  movslq %esi,%rsi
  movslq %r9d,%r9
  movzbl (%rcx,%rsi,1),%eax
  mov    %al,(%rdi,%r9,1)
L99:
  movslq %r11d,%r11
  pop    %rbx
  add    %r11,%rdi
  movb   $0x0,(%rdi)
  ret
  nopw   0x0(%rax,%rax,1)
L197:
  mov    %rdi,%r9
  movslq %esi,%rsi
  sub    %r10,%r9
  nopl   0x0(%rax)
L82:
  movzbl (%rcx,%rsi,1),%edx
  mov    %dl,-0x1(%r9,%rsi,1)
  add    $0x1,%rsi
  cmp    %esi,%r8d
  jg     L82
  lea    -0x1(%rax),%r11d
  movslq %r11d,%r11
  add    %r11,%rdi
L221:
  movb   $0x0,(%rdi)
  ret
L90:
  mov    %r11d,%ebx
  xor    %edx,%edx
  xor    %r9d,%r9d
  jmp    L26
```

assistant: ```c
void strip_directory_from_filename(char *input_filename, char *output_filename) {
  int i;
  int end_index = 0;
  int last_forward_slash_index = -1;
  for (i = 0; i < FILENAME_MAX; i++) {
    if (input_filename[i] == '/') {
      last_forward_slash_index = i;
    }
    if (input_filename[i] == '\0' || input_filename[i] == '\n') {
      end_index = i;
      break;
    }
  }
  int current_index = 0;
  for (i = last_forward_slash_index + 1; i < end_index; i++) {
    output_filename[current_index] = input_filename[i];
    current_index++;
  }
  output_filename[current_index] = '\0';
}
```