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

```asm
<play_game>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x1,-0x48(%rbp)
L123:
  nop
L188:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L188
  mov    $0x0,%eax
  call   <roll_dice@plt>
  mov    %eax,-0x44(%rbp)
  cmpl   $0xc,-0x44(%rbp)
  je     L97
  cmpl   $0xc,-0x44(%rbp)
  jg     L101
  cmpl   $0xb,-0x44(%rbp)
  je     L155
  cmpl   $0xb,-0x44(%rbp)
  jg     L101
  cmpl   $0x3,-0x44(%rbp)
  jg     L115
  cmpl   $0x2,-0x44(%rbp)
  jge    L97
  jmp    L101
L115:
  cmpl   $0x7,-0x44(%rbp)
  je     L155
  jmp    L101
L97:
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L22
L155:
  cmpl   $0x1,-0x48(%rbp)
  jne    L6
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L22
L6:
  cmpl   $0x7,-0x44(%rbp)
  je     L197
  cmpl   $0xb,-0x44(%rbp)
  jne    L101
L197:
  cmpl   $0x1,-0x48(%rbp)
  je     L101
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L22
L101:
  mov    -0x44(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L47
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L22
L47:
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x44(%rbp),%eax
  cltq
  movl   $0x1,-0x40(%rbp,%rax,4)
  addl   $0x1,-0x48(%rbp)
  jmp    L123
L22:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L162
  call   <__stack_chk_fail@plt>
L162:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D11
type: string
name: disassemble_data
arguments: tag: D66
type: string
name: disassemble_data
arguments: tag: D13
type: string
name: disassemble_data
arguments: tag: D27
type: string
name: disassemble_data
arguments: tag: D30
type: string
name: disassemble_data
arguments: tag: D40
type: string
name: disassemble_data
arguments: tag: D39
type: string

tool: D11: you rolled: %d



tool: D66: you lose

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



tool: D27: you win

tool: D30: you rolled %d more than once


tool: D40: you rolled %d


tool: D39: you point is %d


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;
      }
    }
    }
  }
}
```