user: Please show me the C implementation that matches the assembly code listed below:

```asm
<play_game>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movl   $0x0,0x30(%rsp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    $0x1,%ebp
  lea    D67(%rip),%r13
  lea    D29(%rip),%r12
  jmp    L46
L27:
  cmp    $0x1,%eax
  jg     L21
L17:
  movslq %ebx,%rax
  mov    (%rsp,%rax,4),%r14d
  cmp    $0x1,%r14d
  je     L5
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movslq %ebx,%rbx
  movl   $0x1,(%rsp,%rbx,4)
  add    $0x1,%ebp
L46:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L46
  mov    $0x0,%eax
  call   <roll_dice@plt>
  mov    %eax,%ebx
  cmp    $0xb,%eax
  je     L15
  jg     L32
  cmp    $0x3,%eax
  jle    L27
  cmp    $0x7,%eax
  jne    L17
L15:
  cmp    $0x1,%ebp
  jne    L16
  mov    %ebx,%esi
  lea    D38(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  mov    %ebp,%r14d
  jmp    L4
L32:
  cmp    $0xc,%eax
  jne    L17
L21:
  mov    %ebx,%esi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D69(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%r14d
L4:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L122
  mov    %r14d,%eax
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L5:
  mov    %ebx,%esi
  lea    D67(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  jmp    L4
L16:
  mov    %ebx,%esi
  lea    D81(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D69(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%r14d
  jmp    L4
L122:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D67
datatype: string
name: read_data
arguments: data_tag: D29
datatype: string
name: read_data
arguments: data_tag: D38
datatype: string
name: read_data
arguments: data_tag: D89
datatype: string
name: read_data
arguments: data_tag: D99
datatype: string
name: read_data
arguments: data_tag: D69
datatype: string
name: read_data
arguments: data_tag: D81
datatype: string

tool: D67: you rolled %d


tool: D29: you point is %d


tool: D38: you rolled %d on first roll.



tool: D89: you win

tool: D99: you rolled: %d



tool: D69: you lose

tool: D81: you rolled %d more than once


assistant: ```c
bool play_game() {
  int trial, sum;
  bool points_table[6 + 6 + 1] = {0};
  srand((unsigned)time(NULL));
  for (trial = 1;; trial++) {
    while (getchar() != '\n') {
    }
    sum = roll_dice();
    switch (sum) {
    case 2:
    case 3:
    case 12: {
      printf("you rolled: %d\n\n", sum);
      printf("you lose\n");
      return false;
    }
    case 7:
    case 11: {
      if (trial == 1) {
        printf("you rolled %d on first roll.\n\n", sum);
        printf("you win\n");
        return true;
      } else if ((sum == 7 || sum == 11) && trial != 1) {
        printf("you rolled %d more than once\n", sum);
        printf("you lose\n");
        return false;
      }
    }
    default: {
      if (points_table[sum] == true) {
        printf("you rolled %d\n", sum);
        printf("you win\n");
        return true;
      } else {
        printf("you rolled %d\n", sum);
        printf("you point is %d\n", sum);
        points_table[sum] = true;
      }
    }
    }
  }
}
```