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

```asm
<residue_idx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %rsi,(%rsp)
  mov    %rdx,%r14
  mov    %rcx,0x10(%rsp)
  mov    %r8,%r15
  mov    %r9,0x8(%rsp)
  mov    $0xc,%ecx
  mov    $0x0,%edx
  mov    %rdi,%rsi
  mov    $0x1,%edi
  call   <cmatrix@plt>
  mov    %rax,%r13
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <lvector@plt>
  mov    %rax,%r12
  test   %rbp,%rbp
  jle    L87
  mov    $0x1,%ebx
  mov    %rax,0x18(%rsp)
  mov    0x10(%rsp),%r12
  jmp    L53
L49:
  mov    (%r14,%rbx,8),%rax
  movzbl 0x2(%rax),%r9d
L70:
  movsbl (%r12,%rbx,1),%ecx
  mov    (%r15,%rbx,8),%rdx
  mov    0x0(%r13,%rbx,8),%rdi
  movsbl %r9b,%r9d
  mov    (%rsp),%rax
  mov    (%rax,%rbx,8),%r8
  lea    D0(%rip),%rsi
  call   <sprintf@plt>
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jl     L37
L53:
  mov    $0x20,%r9d
  test   %r14,%r14
  jne    L49
  jmp    L70
L37:
  mov    0x18(%rsp),%r12
L87:
  cmp    $0x1,%rbp
  jle    L98
  mov    $0x1,%ebx
L128:
  mov    0x0(%r13,%rbx,8),%rsi
  mov    0x8(%r13,%rbx,8),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  mov    %rax,(%r12,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jne    L128
  movq   $0x1,(%r12,%rbx,8)
L54:
  mov    $0x0,%esi
  mov    $0x1,%eax
L29:
  cmpq   $0x1,(%r12,%rax,8)
  sbb    $0xffffffffffffffff,%rsi
  add    $0x1,%rax
  cmp    %rax,%rbp
  jge    L29
  mov    $0x2,%ecx
  mov    $0x1,%edx
  mov    $0x1,%edi
  call   <lmatrix@plt>
  mov    %rax,%rbx
  mov    $0x0,%esi
  mov    $0x1,%eax
  jmp    L140
L98:
  movq   $0x1,(%r12,%rbp,8)
  je     L54
  mov    $0x2,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <lmatrix@plt>
  mov    %rax,%rbx
  mov    $0x0,%esi
  jmp    L80
L150:
  add    $0x1,%rax
  cmp    %rax,%rbp
  jl     L48
L140:
  cmpq   $0x0,(%r12,%rax,8)
  je     L150
  add    $0x1,%rsi
  mov    (%rbx,%rsi,8),%rdx
  mov    %rax,0x10(%rdx)
  jmp    L150
L48:
  cmp    $0x1,%rsi
  jle    L80
  lea    0x8(%rbx),%rax
  lea    (%rbx,%rsi,8),%rdi
L123:
  mov    0x8(%rax),%rcx
  mov    (%rax),%rdx
  mov    0x10(%rdx),%rdx
  add    $0x1,%rdx
  mov    %rdx,0x8(%rcx)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L123
L80:
  mov    0x8(%rbx),%rax
  movq   $0x1,0x8(%rax)
  mov    0x8(%rsp),%rax
  mov    %rsi,(%rax)
  mov    $0xc,%r8d
  mov    $0x0,%ecx
  mov    %rbp,%rdx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <free_cmatrix@plt>
  mov    %rbp,%rdx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <free_lvector@plt>
  mov    %rbx,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D0
type_guessed: string

tool: D0: %3s%c%4ld%c

assistant: ```c
long **residue_idx(long num, long *ResSeq, char **Miscs, char *ChainID, char **ResName, long *num_residue) {
  char iCode;
  char **bidx;
  long i, n, **seidx, *temp;
  bidx = cmatrix(1, num, 0, 12);
  temp = lvector(1, num);
  for (i = 1; i <= num; i++) {
    iCode = (Miscs == NULL) ? ' ' : Miscs[i][2];
    sprintf(bidx[i], "%3s%c%4ld%c", ResName[i], ChainID[i], ResSeq[i], iCode);
  }
  for (i = 1; i < num; i++)
    temp[i] = strcmp(bidx[i + 1], bidx[i]) ? 1 : 0;
  temp[num] = 1;
  n = 0;
  for (i = 1; i <= num; i++)
    if (temp[i])
      ++n;
  seidx = lmatrix(1, n, 1, 2);
  n = 0;
  for (i = 1; i <= num; i++)
    if (temp[i])
      seidx[++n][2] = i;
  for (i = 2; i <= n; i++)
    seidx[i][1] = seidx[i - 1][2] + 1;
  seidx[1][1] = 1;
  *num_residue = n;
  free_cmatrix(bidx, 1, num, 0, 12);
  free_lvector(temp, 1, num);
  return seidx;
}
```