user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x44(%rbp),%rsi
  push   %r13
  push   %r12
  push   %rbx
  lea    D5(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jle    L174
  lea    -0x3c(%rbp),%rax
  movl   $0x1,-0x54(%rbp)
  mov    %rax,-0x68(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  nopl   0x0(%rax)
L160:
  mov    -0x68(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  xor    %eax,%eax
  mov    %rsp,%r14
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  movslq -0x40(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rax,%rsi
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L91
L115:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L115
L91:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L75
  orq    $0x0,-0x8(%rsp,%rdx,1)
L75:
  mov    %rsp,%r12
  test   %esi,%esi
  jle    L213
  mov    %r12,%r13
  xor    %r15d,%r15d
  cs nopw 0x0(%rax,%rax,1)
L97:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  mov    -0x40(%rbp),%esi
  add    $0x4,%r13
  cmp    %r15d,%esi
  jg     L97
L213:
  mov    %r12,%rdi
  call   <bubble_sort@plt>
  mov    -0x40(%rbp),%ecx
  mov    %ecx,%esi
  sub    -0x3c(%rbp),%esi
  test   %esi,%esi
  jle    L150
  lea    -0x1(%rsi),%edi
  cmp    $0x2,%edi
  jbe    L78
  mov    %esi,%edx
  pxor   %xmm2,%xmm2
  pxor   %xmm4,%xmm4
  movslq %ecx,%rax
  shr    $0x2,%edx
  lea    -0x10(%r12,%rax,4),%rax
  sub    $0x1,%edx
  mov    %rax,%r8
  shl    $0x4,%rdx
  sub    %rdx,%r8
  lea    -0x10(%r8),%rdx
  nopw   0x0(%rax,%rax,1)
L17:
  movdqu (%rax),%xmm5
  movdqa %xmm4,%xmm1
  sub    $0x10,%rax
  pshufd $0x1b,%xmm5,%xmm0
  pcmpgtd %xmm0,%xmm1
  movdqa %xmm0,%xmm3
  punpckldq %xmm1,%xmm3
  punpckhdq %xmm1,%xmm0
  paddq  %xmm3,%xmm0
  paddq  %xmm0,%xmm2
  cmp    %rdx,%rax
  jne    L17
  movdqa %xmm2,%xmm0
  mov    %esi,%eax
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%eax
  paddq  %xmm0,%xmm2
  lea    0x1(%rax),%r9d
  movq   %xmm2,%rdx
  cmp    %eax,%esi
  je     L39
  mov    %ecx,%r8d
  add    $0x2,%eax
  sub    %r9d,%r8d
  movslq %r8d,%r8
  movslq (%r12,%r8,4),%r8
  add    %r8,%rdx
  cmp    %eax,%esi
  jl     L39
L140:
  mov    %ecx,%r8d
  sub    %eax,%r8d
  add    $0x1,%eax
  movslq %r8d,%r8
  movslq (%r12,%r8,4),%r8
  add    %r8,%rdx
  cmp    %eax,%esi
  jl     L73
  sub    %eax,%ecx
  movslq %ecx,%rcx
  movslq (%r12,%rcx,4),%rax
  add    %rax,%rdx
L73:
  cmp    $0x2,%edi
  jbe    L171
L39:
  mov    %esi,%ecx
  pxor   %xmm2,%xmm2
  pxor   %xmm4,%xmm4
  mov    %r12,%rax
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  add    %r12,%rcx
  nopw   0x0(%rax,%rax,1)
L25:
  movdqu (%rax),%xmm0
  movdqa %xmm4,%xmm1
  add    $0x10,%rax
  pcmpgtd %xmm0,%xmm1
  movdqa %xmm0,%xmm3
  punpckhdq %xmm1,%xmm3
  punpckldq %xmm1,%xmm0
  paddq  %xmm3,%xmm0
  paddq  %xmm0,%xmm2
  cmp    %rcx,%rax
  jne    L25
  movdqa %xmm2,%xmm0
  mov    %esi,%ecx
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%ecx
  paddq  %xmm0,%xmm2
  movq   %xmm2,%rax
  test   $0x3,%sil
  je     L55
L189:
  movslq %ecx,%rdi
  lea    (%r12,%rdi,4),%rdi
  movslq (%rdi),%r8
  add    %r8,%rax
  lea    0x1(%rcx),%r8d
  cmp    %r8d,%esi
  jle    L55
  movslq 0x4(%rdi),%r8
  add    $0x2,%ecx
  add    %r8,%rax
  cmp    %ecx,%esi
  jle    L55
  movslq 0x8(%rdi),%rcx
  add    %rcx,%rax
L55:
  sub    %rax,%rdx
  mov    %rdx,%rsi
L0:
  lea    D10(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rsp
  addl   $0x1,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  jge    L160
L174:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L130
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L150:
  xor    %esi,%esi
  jmp    L0
L78:
  lea    -0x1(%rcx),%eax
  cltq
  movslq (%r12,%rax,4),%rdx
  mov    $0x2,%eax
  cmp    $0x1,%esi
  jne    L140
L171:
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L189
L130:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
type_guessed: string
name: extract_symbolic_data
arguments: label: D20
type_guessed: string
name: extract_symbolic_data
arguments: label: D10
type_guessed: string

tool: D5: %d

tool: D20: %d %d

tool: D10: %llu


assistant: ```c
int main() {
  int cases, len, m;
  scanf("%d", &cases);
  for (int i = 1; i <= cases; ++i) {
    scanf("%d %d", &len, &m);
    int arr[len];
    for (int i = 0; i < len; ++i)
      scanf("%d", &arr[i]);
    bubble_sort(arr, len);
    int diff = len - m;
    unsigned long long int min = 0, max = 0;
    for (int i = 1; i <= diff; ++i)
      max += arr[len - i];
    for (int i = 0; i < diff; ++i)
      min += arr[i];
    printf("%llu\n", max - min);
  }
  return 0;
}
```