user: What is the c source code of the assembly code below:

```asm
<select_task>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x50(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L59
L99:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L99
L59:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L4
L128:
  lea    0x3(%rsp),%rbx
  mov    %rbx,%rdx
  and    $0xfffffffffffffffc,%rbx
  shr    $0x2,%rdx
  test   %r12d,%r12d
  jle    L71
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L155
  mov    %r12d,%edx
  movdqa D6(%rip),%xmm0
  mov    %rbx,%rax
  shr    $0x2,%edx
  shl    $0x4,%rdx
  add    %rbx,%rdx
  nopw   0x0(%rax,%rax,1)
L186:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L186
  mov    %r12d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r12b
  je     L169
  movslq %eax,%rdx
  add    $0x1,%eax
  lea    (%rbx,%rdx,4),%rdx
  movl   $0x1,(%rdx)
  cmp    %eax,%r12d
  jle    L169
L182:
  add    $0x1,%eax
  movl   $0x1,0x4(%rdx)
  cmp    %eax,%r12d
  jle    L169
  movl   $0x1,0x8(%rdx)
L169:
  mov    %r12d,%r14d
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L192:
  mov    $0x1,%r15d
  cmp    $0x1,%r13d
  jle    L191
  nopl   0x0(%rax)
L19:
  mov    %rbx,%rsi
  mov    %r12d,%edi
  add    $0x1,%r15d
  call   <cycle_next@plt>
  mov    %eax,%edx
  cmp    %r15d,%r13d
  jne    L19
L191:
  movslq %edx,%rax
  mov    -0x50(%rbp),%rcx
  mov    %edx,-0x44(%rbp)
  sub    $0x1,%r14d
  movl   $0x0,(%rbx,%rax,4)
  lea    D2(%rip),%rdi
  mov    (%rcx,%rax,8),%rsi
  call   <printf@plt>
  mov    -0x44(%rbp),%edx
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <cycle_next@plt>
  mov    %eax,%edx
  cmp    $0x1,%r14d
  jne    L192
L121:
  xor    %eax,%eax
  jmp    L73
  nopl   (%rax)
L2:
  add    $0x1,%rax
  cmp    %eax,%r12d
  jle    L71
L73:
  mov    (%rbx,%rax,4),%ecx
  movslq %eax,%rdx
  test   %ecx,%ecx
  je     L2
  mov    -0x50(%rbp),%rax
  mov    (%rax,%rdx,8),%rax
L85:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L57
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L71:
  xor    %eax,%eax
  jmp    L85
L4:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L128
L155:
  movl   $0x1,0x0(,%rdx,4)
  cmp    $0x1,%r12d
  je     L121
  mov    %rbx,%rdx
  mov    $0x1,%eax
  jmp    L182
L57:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D6
data_type: byte[16]
name: retrieve_data
arguments: tag: D2
data_type: string

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

tool: D2: drop %s


assistant: ```c
char *select_task(char *tasks[], int size, int steps) {
  int i, curr = 0, tasks_left = size;
  bool used[size];
  for (i = 0; i < size; i++)
    used[i] = true;
  while (tasks_left > 1) {
    for (i = 1; i < steps; i++) {
      curr = cycle_next(size, used, curr);
    }
    used[curr] = false;
    printf("drop %s\n", tasks[curr]);
    tasks_left--;
    curr = cycle_next(size, used, curr);
  }
  for (i = 0; i < size; i++)
    if (used[i])
      return tasks[i];
  return NULL;
}
```