user: 请将以下的汇编代码转换成C语言代码:

```asm
<merge_lists>:
  endbr64
  push   %r14
  mov    %rdi,%rax
  push   %r12
  push   %rbp
  push   %rbx
  mov    (%rdi),%edi
  mov    0x4(%rax),%r11d
  test   %edi,%edi
  jle    L128
  test   %r11d,%r11d
  jle    L128
  mov    %rdx,%rbp
  mov    %rcx,%r12
  mov    %rsi,%rbx
  mov    $0x1,%ecx
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L142
  nopl   0x0(%rax,%rax,1)
L29:
  je     L192
L9:
  lea    (%rdi,%rdx,1),%esi
  add    $0x1,%edx
  movslq %esi,%rsi
  mov    %rsi,-0x8(%r9,%rcx,8)
  mov    %ecx,%esi
  add    $0x1,%rcx
  cmp    %r11d,%edx
  jge    L162
L214:
  cmp    %edi,%eax
  jge    L162
L142:
  movslq %edx,%r10
  movslq %eax,%rsi
  mov    (%r12,%r10,4),%r14d
  cmp    %r14d,(%rbx,%rsi,4)
  jge    L29
  mov    %rsi,-0x8(%r9,%rcx,8)
  add    $0x1,%eax
L207:
  mov    %ecx,%esi
  add    $0x1,%rcx
  cmp    %r11d,%edx
  jl     L214
L162:
  cmp    %eax,%edi
  jle    L158
  mov    %edi,%ebx
  sub    %eax,%ebx
  lea    -0x1(%rbx),%ecx
  cmp    $0x2,%ecx
  jbe    L120
  movslq %esi,%rcx
  movd   %eax,%xmm7
  movdqa D0(%rip),%xmm3
  pxor   %xmm5,%xmm5
  lea    (%r9,%rcx,8),%r8
  mov    %ebx,%ecx
  pshufd $0x0,%xmm7,%xmm1
  shr    $0x2,%ecx
  paddd  D38(%rip),%xmm1
  lea    -0x1(%rcx),%r10d
  lea    0x20(%r8),%rcx
  shl    $0x5,%r10
  add    %rcx,%r10
  jmp    L96
  nopl   0x0(%rax,%rax,1)
L105:
  add    $0x20,%rcx
L96:
  movdqa %xmm1,%xmm0
  movdqa %xmm5,%xmm2
  paddd  %xmm3,%xmm1
  pcmpgtd %xmm0,%xmm2
  movdqa %xmm0,%xmm4
  punpckldq %xmm2,%xmm4
  punpckhdq %xmm2,%xmm0
  movups %xmm4,(%r8)
  movups %xmm0,0x10(%r8)
  mov    %rcx,%r8
  cmp    %rcx,%r10
  jne    L105
  mov    %ebx,%r8d
  and    $0xfffffffc,%r8d
  add    %r8d,%eax
  lea    (%rsi,%r8,1),%ecx
  cmp    %r8d,%ebx
  je     L153
L140:
  movslq %ecx,%rcx
  movslq %eax,%r10
  mov    %r10,(%r9,%rcx,8)
  lea    0x0(,%rcx,8),%r8
  lea    0x1(%rax),%ecx
  cmp    %ecx,%edi
  jle    L153
  movslq %ecx,%rcx
  add    $0x2,%eax
  mov    %rcx,0x8(%r9,%r8,1)
  cmp    %eax,%edi
  jle    L153
  cltq
  mov    %rax,0x10(%r9,%r8,1)
L153:
  add    %ebx,%esi
L158:
  cmp    %edx,%r11d
  jle    L77
  mov    %r11d,%r8d
  sub    %edx,%r8d
  lea    -0x1(%r8),%eax
  cmp    $0x2,%eax
  jbe    L145
  mov    %r8d,%ecx
  movd   %edx,%xmm7
  pxor   %xmm5,%xmm5
  movslq %esi,%rax
  shr    $0x2,%ecx
  pshufd $0x0,%xmm7,%xmm1
  lea    (%r9,%rax,8),%rax
  movdqa D0(%rip),%xmm3
  movd   %edi,%xmm7
  shl    $0x5,%rcx
  paddd  D38(%rip),%xmm1
  pshufd $0x0,%xmm7,%xmm6
  add    %rax,%rcx
  nopl   0x0(%rax,%rax,1)
L129:
  movdqa %xmm1,%xmm0
  movdqa %xmm5,%xmm2
  paddd  %xmm3,%xmm1
  add    $0x20,%rax
  paddd  %xmm6,%xmm0
  pcmpgtd %xmm0,%xmm2
  movdqa %xmm0,%xmm4
  punpckldq %xmm2,%xmm4
  punpckhdq %xmm2,%xmm0
  movups %xmm4,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rcx
  jne    L129
  mov    %r8d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%edx
  add    %eax,%esi
  cmp    %r8d,%eax
  je     L77
L145:
  lea    (%rdi,%rdx,1),%eax
  movslq %esi,%rsi
  cltq
  lea    0x0(,%rsi,8),%rcx
  mov    %rax,(%r9,%rsi,8)
  lea    0x1(%rdx),%eax
  cmp    %eax,%r11d
  jle    L77
  add    %edi,%eax
  add    $0x2,%edx
  cltq
  mov    %rax,0x8(%r9,%rcx,1)
  cmp    %edx,%r11d
  jle    L77
  add    %edx,%edi
  movslq %edi,%rdi
  mov    %rdi,0x10(%r9,%rcx,1)
L77:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  ret
  xchg   %ax,%ax
L192:
  mov    (%r8,%r10,4),%r14d
  cmp    %r14d,0x0(%rbp,%rsi,4)
  jge    L9
  mov    %rsi,-0x8(%r9,%rcx,8)
  add    $0x1,%eax
  jmp    L207
  nopl   0x0(%rax)
L128:
  xor    %esi,%esi
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L162
L120:
  mov    %esi,%ecx
  jmp    L140
```

tool_calls: name: retrieve_data
arguments: tag: D0
datatype: byte[16]
name: retrieve_data
arguments: tag: D38
datatype: byte[16]

tool: {"D0": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D38": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

assistant: ```c
void merge_lists(int *nl, int *l11, int *l12, int *l21, int *l22, long *idx) {
  int i1 = 0, i2 = 0, i = 0, ii;
  const int n1 = nl[0], n2 = nl[1];
  i = 0;
  while (i2 < n2 && i1 < n1) {
    if ((l11[i1] < l21[i2]) || (l11[i1] == l21[i2] && l12[i1] < l22[i2])) {
      idx[i] = i1;
      i1++;
    } else {
      idx[i] = n1 + i2;
      i2++;
    }
    i++;
  }
  for (ii = i1; i1 < n1; ii++) {
    idx[i] = i1;
    i++;
    i1++;
  }
  for (ii = i2; i2 < n2; ii++) {
    idx[i] = n1 + i2;
    i++;
    i2++;
  }
}
```