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

```asm
<RankOfElement>:
  endbr64
  mov    %rdi,%rcx
  mov    %rsi,%rdi
  test   %rdx,%rdx
  je     L193
  lea    -0x1(%rdx),%rax
  mov    (%rcx,%rdx,4),%r9d
  cmp    $0x2,%rax
  jbe    L116
  mov    %rdx,%rsi
  movd   %r9d,%xmm7
  pxor   %xmm1,%xmm1
  mov    %rcx,%rax
  shr    $0x2,%rsi
  movdqa D18(%rip),%xmm2
  pshufd $0x0,%xmm7,%xmm5
  pxor   %xmm3,%xmm3
  shl    $0x4,%rsi
  add    %rcx,%rsi
L159:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  pcmpgtd %xmm5,%xmm0
  pandn  %xmm2,%xmm0
  movdqa %xmm0,%xmm4
  punpckhdq %xmm3,%xmm0
  punpckldq %xmm3,%xmm4
  paddq  %xmm4,%xmm0
  paddq  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L159
  movdqa %xmm1,%xmm0
  mov    %rdx,%rsi
  psrldq $0x8,%xmm0
  and    $0xfffffffffffffffc,%rsi
  paddq  %xmm0,%xmm1
  mov    %esi,%eax
  movq   %xmm1,%r8
  cmp    %rsi,%rdx
  je     L40
L211:
  cmp    (%rcx,%rsi,4),%r9d
  jge    L119
L102:
  lea    0x1(%rax),%esi
  movslq %esi,%rsi
  cmp    %rsi,%rdx
  jbe    L40
  lea    0x0(,%rsi,4),%r10
  cmp    (%rcx,%rsi,4),%r9d
  jge    L91
L22:
  add    $0x2,%eax
  cltq
  cmp    %rax,%rdx
  jbe    L40
  cmp    0x4(%rcx,%r10,1),%r9d
  jge    L226
L40:
  movslq %edx,%r9
  mov    %edx,%eax
  cmp    %r9,%rdi
  jbe    L191
  mov    %rdi,%r10
  mov    (%rcx,%rdx,4),%r11d
  sub    %r9,%r10
  lea    -0x1(%r10),%rsi
  cmp    $0x2,%rsi
  jbe    L74
  movd   %r11d,%xmm7
  lea    (%rcx,%r9,4),%rax
  pxor   %xmm1,%xmm1
  mov    %r10,%rsi
  shr    $0x2,%rsi
  movdqa D18(%rip),%xmm2
  pshufd $0x0,%xmm7,%xmm5
  pxor   %xmm3,%xmm3
  shl    $0x4,%rsi
  add    %rax,%rsi
  nopw   0x0(%rax,%rax,1)
L220:
  movdqu (%rax),%xmm6
  movdqa %xmm5,%xmm0
  add    $0x10,%rax
  pcmpgtd %xmm6,%xmm0
  pand   %xmm2,%xmm0
  movdqa %xmm0,%xmm4
  punpckhdq %xmm3,%xmm0
  punpckldq %xmm3,%xmm4
  paddq  %xmm4,%xmm0
  paddq  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L220
  movdqa %xmm1,%xmm0
  mov    %r10,%rsi
  psrldq $0x8,%xmm0
  and    $0xfffffffffffffffc,%rsi
  paddq  %xmm0,%xmm1
  add    %rsi,%r9
  movq   %xmm1,%rax
  add    %rax,%r8
  lea    (%rdx,%rsi,1),%eax
  cmp    %rsi,%r10
  je     L191
L74:
  cmp    %r11d,(%rcx,%r9,4)
  jl     L28
L138:
  lea    0x1(%rax),%edx
  movslq %edx,%rdx
  cmp    %rdi,%rdx
  jae    L191
  lea    0x0(,%rdx,4),%rsi
  cmp    %r11d,(%rcx,%rdx,4)
  jl     L158
L173:
  add    $0x2,%eax
  cltq
  cmp    %rdi,%rax
  jae    L191
  cmp    0x4(%rcx,%rsi,1),%r11d
  jle    L191
  add    $0x1,%r8
L191:
  mov    %r8,%rax
  ret
  nopl   0x0(%rax)
L28:
  add    $0x1,%r8
  jmp    L138
  cs nopw 0x0(%rax,%rax,1)
L119:
  add    $0x1,%r8
  jmp    L102
  nopl   0x0(%rax)
L91:
  add    $0x1,%r8
  jmp    L22
  nopl   0x0(%rax)
L158:
  add    $0x1,%r8
  jmp    L173
  cs nopw 0x0(%rax,%rax,1)
L226:
  add    $0x1,%r8
  jmp    L40
  nopl   0x0(%rax)
L193:
  xor    %r8d,%r8d
  jmp    L40
L116:
  xor    %eax,%eax
  xor    %r8d,%r8d
  xor    %esi,%esi
  jmp    L211
```

tool_calls: name: parse_data
arguments: data_label: D18
data_type: byte[16]

tool: {"D18": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
size_t RankOfElement(const int *array, size_t length, size_t index) {
  size_t count = 0;
  for (int i = 0; i < index; i++) {
    if (array[i] <= array[index]) {
      count++;
    }
  }
  for (int i = index; i < length; i++) {
    if (array[i] < array[index]) {
      count++;
    }
  }
  return count;
}
```