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

```asm
<playerDiscards>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0xb,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x40(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  movslq %eax,%rdx
  mov    %rdx,%rcx
  mov    $0x0,%ebx
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L62:
  cmp    %rdx,%rsp
  je     L108
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L62
L108:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L92
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L92:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x38(%rbp)
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x48(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <getLine@plt>
  mov    %eax,-0x48(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L46
L140:
  movsbl -0x4d(%rbp),%eax
  sub    $0x31,%eax
  mov    %eax,-0x44(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  js     L46
  cmpl   $0x4,-0x44(%rbp)
  jg     L46
  mov    -0x44(%rbp),%eax
  cltq
  movl   $0x1,-0x30(%rbp,%rax,4)
L46:
  mov    -0x4c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4c(%rbp)
  mov    -0x38(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  test   %al,%al
  je     L89
  cmpb   $0xa,-0x4d(%rbp)
  je     L89
  mov    -0x4c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jge    L89
  mov    $0x1,%eax
  jmp    L117
L89:
  mov    $0x0,%eax
L117:
  mov    %al,-0x4d(%rbp)
  cmpb   $0x0,-0x4d(%rbp)
  jne    L140
  movl   $0x0,-0x4c(%rbp)
  jmp    L27
L103:
  mov    -0x4c(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L65
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0x0,%eax
  call   <dealACard@plt>
  mov    %eax,(%rbx)
L65:
  addl   $0x1,-0x4c(%rbp)
L27:
  cmpl   $0x4,-0x4c(%rbp)
  jle    L103
  mov    -0x60(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sortHand@plt>
  mov    -0x68(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <rankHand@plt>
  mov    %r12,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L123
  call   <__stack_chk_fail@plt>
L123:
  lea    -0x10(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D3
datatype: string

tool: D3: Choose cards to throw (eg 145): 

assistant: ```c
void playerDiscards(const int wDeck[][13], int *playerHand, int *playerHandRank) {
  int playerToDiscard[5] = {0};
  int arrLen = 5 * 2 + 1;
  char input[arrLen];
  printf("Choose cards to throw (eg 145): ");
  arrLen = getLine(input, arrLen);
  char c;
  int cardPos, i = 0;
  while (c = input[i++] != '\0' && c != '\n' && i < arrLen) {
    cardPos = c - 49;
    if (cardPos >= 0 && cardPos < 5)
      playerToDiscard[cardPos] = 1;
  }
  for (i = 0; i < 5; i++)
    if (playerToDiscard[i] == 1)
      playerHand[i] = dealACard();
  sortHand(wDeck, playerHand);
  rankHand(wDeck, playerHand, playerHandRank);
}
```