user: Please show me the C implementation that matches the assembly code listed below:

```asm
<display_sequence>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edx,0xc(%rsp)
  mov    %rcx,0x10(%rsp)
  cmp    %edx,%r8d
  je     L319
  movzbl (%rdi),%eax
  mov    %rdi,%rbx
  test   %al,%al
  je     L189
  movslq %r8d,%rdx
  mov    %rsi,%r12
  lea    D9(%rip),%r15
  mov    %r9d,%ebp
  lea    (%rcx,%rdx,4),%rsi
  mov    %rsi,0x18(%rsp)
  lea    0x1(%r8),%esi
  movslq %esi,%rdx
  mov    %esi,0x28(%rsp)
  lea    (%rcx,%rdx,4),%rdi
  mov    %rdi,0x20(%rsp)
  lea    0x2(%r8),%edi
  movslq %edi,%rdx
  mov    %edi,0x2c(%rsp)
  lea    (%rcx,%rdx,4),%rdx
  mov    %rdx,0x38(%rsp)
  lea    0x3(%r8),%edx
  mov    %edx,0x50(%rsp)
  movslq %edx,%rdx
  lea    (%rcx,%rdx,4),%rdx
  mov    %rdx,0x48(%rsp)
  lea    0x4(%rcx),%rdx
  mov    %edi,%ecx
  lea    (%rdx,%rcx,4),%rdi
  mov    %esi,%ecx
  lea    (%rdx,%rcx,4),%rsi
  mov    %rdi,0x60(%rsp)
  mov    %rsi,0x40(%rsp)
  mov    0xc(%rsp),%esi
  lea    -0x1(%rsi),%ecx
  lea    0x4(%r8),%esi
  lea    (%rdx,%rcx,4),%rdi
  lea    0x4(%r12),%rcx
  mov    %esi,0x54(%rsp)
  mov    %rdi,0x30(%rsp)
  mov    %rcx,0x58(%rsp)
L17:
  mov    %ebp,%r14d
  add    $0x1,%rbx
  add    $0x1,%ebp
  cmp    %al,(%r12)
  je     L184
L169:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L17
L189:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L184:
  mov    0x18(%rsp),%rax
  mov    0xc(%rsp),%edi
  mov    %ebp,(%rax)
  cmp    %edi,0x28(%rsp)
  je     L140
  movzbl (%rbx),%eax
  test   %al,%al
  je     L189
  sub    %ebx,%r14d
  mov    %rbx,0x68(%rsp)
  mov    %rbx,%r13
  add    $0x2,%r14d
  mov    %ebp,0x70(%rsp)
  mov    %r12,%rbp
  mov    %r14d,%ebx
L298:
  lea    (%rbx,%r13,1),%r14d
  add    $0x1,%r13
  cmp    %al,0x1(%rbp)
  je     L268
L176:
  movzbl 0x0(%r13),%eax
  test   %al,%al
  jne    L298
L217:
  mov    %rbp,%r12
  mov    0x68(%rsp),%rbx
  mov    0x70(%rsp),%ebp
  jmp    L169
  nopl   0x0(%rax)
L319:
  test   %r8d,%r8d
  jle    L175
  lea    -0x1(%r8),%eax
  mov    %rcx,%rbx
  lea    D9(%rip),%rbp
  lea    0x4(%rcx,%rax,4),%r12
  nopl   0x0(%rax,%rax,1)
L307:
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbx,%r12
  jne    L307
L175:
  add    $0x88,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <putchar@plt>
L268:
  mov    0x20(%rsp),%rax
  mov    0x2c(%rsp),%esi
  mov    %r14d,(%rax)
  cmp    %esi,0xc(%rsp)
  je     L192
  movzbl 0x0(%r13),%eax
  test   %al,%al
  je     L217
  mov    %ebx,0x74(%rsp)
  mov    %r13,%r12
L266:
  mov    %r14d,%r10d
  add    $0x1,%r12
  add    $0x1,%r14d
  cmp    %al,0x2(%rbp)
  je     L11
L183:
  movzbl (%r12),%eax
  test   %al,%al
  jne    L266
L247:
  mov    0x74(%rsp),%ebx
  jmp    L176
  nopl   0x0(%rax,%rax,1)
L192:
  mov    0xc(%rsp),%edx
  mov    0x10(%rsp),%r14
  mov    0x40(%rsp),%r12
  test   %edx,%edx
  jle    L107
  nopw   0x0(%rax,%rax,1)
L165:
  mov    (%r14),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x4,%r14
  call   <printf@plt>
  cmp    %r14,%r12
  jne    L165
L107:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L176
  nopl   (%rax)
L140:
  mov    0x28(%rsp),%ecx
  mov    0x10(%rsp),%r13
  mov    0x30(%rsp),%r14
  test   %ecx,%ecx
  jle    L295
  nopw   0x0(%rax,%rax,1)
L232:
  mov    0x0(%r13),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %r13,%r14
  jne    L232
L295:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L169
  xchg   %ax,%ax
L11:
  mov    0x38(%rsp),%rax
  mov    0x50(%rsp),%ecx
  mov    %r14d,(%rax)
  cmp    %ecx,0xc(%rsp)
  je     L92
  movzbl (%r12),%edx
  test   %dl,%dl
  je     L247
  sub    %r12d,%r10d
  mov    %r12,%rbx
  add    $0x2,%r10d
L213:
  lea    (%r10,%rbx,1),%r9d
  add    $0x1,%rbx
  cmp    %dl,0x3(%rbp)
  je     L315
  movzbl (%rbx),%edx
  test   %dl,%dl
  jne    L213
  jmp    L183
  nopw   0x0(%rax,%rax,1)
L315:
  mov    0x48(%rsp),%rax
  mov    0xc(%rsp),%edx
  mov    %rbx,%rdi
  mov    %r10d,0x78(%rsp)
  mov    0x54(%rsp),%r8d
  mov    0x10(%rsp),%rcx
  mov    %r9d,(%rax)
  mov    0x58(%rsp),%rsi
  call   <display_sequence>
  movzbl (%rbx),%edx
  mov    0x78(%rsp),%r10d
  test   %dl,%dl
  jne    L213
  jmp    L183
  nopl   0x0(%rax)
L92:
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%rbx
  test   %eax,%eax
  jle    L221
  mov    %rbp,0x78(%rsp)
  mov    %rbx,%rbp
  mov    0x60(%rsp),%rbx
  nopw   0x0(%rax,%rax,1)
L297:
  mov    0x0(%rbp),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x4,%rbp
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L297
  mov    0x78(%rsp),%rbp
L221:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L183
```

tool_calls: name: disassemble_data
arguments: label: D9
datatype: string

tool: D9: %d

assistant: ```c
void display_sequence(char *str0, char *str1, int len_str1, int *tab, int depth, int pos) {
  if (depth == len_str1) {
    int i;
    for (i = 0; i < depth; ++i)
      printf("%d", tab[i]);
    printf("\n");
  } else {
    while (*str0) {
      if (*str0 == *str1) {
        tab[depth] = pos + 1;
        display_sequence(str0 + 1, str1 + 1, len_str1, tab, depth + 1, pos + 1);
      }
      ++str0;
      ++pos;
    }
  }
}
```