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

```asm
<cocktailSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L5
L77:
  movl   $0x1,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L47
L82:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L45
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0xc(%rbp)
L45:
  addl   $0x1,-0x8(%rbp)
L47:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L82
  subl   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L69
L14:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L68
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0xc(%rbp)
L68:
  subl   $0x1,-0x8(%rbp)
L69:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jg     L14
  addl   $0x1,-0x1c(%rbp)
L5:
  cmpl   $0x0,-0xc(%rbp)
  jne    L53
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L77
L53:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void cocktailSort(int list[10], int bottom, int top) {
  int swapped = 0, i = 0, aux = 0;
  while (swapped == 0 && bottom < top) {
    swapped = 1;
    for (i = bottom; i < top; i++) {
      if (list[i] > list[i + 1]) {
        aux = list[i];
        list[i] = list[i + 1];
        list[i + 1] = aux;
        swapped = 0;
      }
    }
    top = top - 1;
    for (i = top; i > bottom; i--) {
      if (list[i] < list[i - 1]) {
        aux = list[i];
        list[i] = list[i - 1];
        list[i - 1] = aux;
        swapped = 0;
      }
    }
    bottom = bottom + 1;
  }
}
```