user: What would the C source look like for the assembly code provided here?

```asm
<gameplay>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %esi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rdi),%eax
  cmp    $0x2,%eax
  ja     L181
  lea    0x3(%rdi,%rdi,1),%edx
  mov    %edx,0x14(%rsp)
  lea    D204(%rip),%rdx
  mov    (%rdx,%rax,4),%eax
  mov    %eax,0x18(%rsp)
L181:
  xor    %eax,%eax
  call   <clearScreen@plt>
  lea    D59(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D249(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D196(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x14(%rsp),%esi
  lea    D78(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  lea    D245(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%esi
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%eax
  cmp    $0x3,%eax
  je     L123
  jg     L75
  cmp    $0x1,%eax
  je     L36
  cmp    $0x2,%eax
  jne    L139
  lea    D186(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  nopw   0x0(%rax,%rax,1)
L139:
  lea    D247(%rip),%rdi
  lea    D236(%rip),%r15
  call   <puts@plt>
  lea    0x2c(%rsp),%rax
  lea    0x30(%rsp),%r14
  mov    %rax,(%rsp)
  lea    0x34(%rsp),%rax
  lea    0x2b(%rsp),%r12
  mov    %rax,0x8(%rsp)
  lea    D195(%rip),%rbx
  lea    D115(%rip),%r13
  lea    D209(%rip),%rbp
  nopl   (%rax)
L153:
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rsp),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D41(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L64:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0x2b(%rsp),%eax
  cmp    $0x6e,%al
  je     L150
  jg     L87
  cmp    $0x4e,%al
  je     L150
  cmp    $0x59,%al
  jne    L86
L22:
  lea    D117(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <clearScreen@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D140(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x34(%rsp),%esi
  mov    0x18(%rsp),%r9d
  mov    0x10(%rsp),%r8d
  mov    0x1c(%rsp),%ecx
  mov    0x30(%rsp),%edx
  mov    0x2c(%rsp),%edi
  call   <cslls@plt>
  mov    0x34(%rsp),%r12d
  mov    $0xa,%edi
  mov    %eax,%ebp
  imul   %eax,%r12d
  mov    0x14(%rsp),%eax
  imul   0x2c(%rsp),%eax
  sub    %eax,%r12d
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  mov    %ebp,%esi
  lea    D142(%rip),%rdi
  call   <printf@plt>
  test   %r12d,%r12d
  js     L169
  mov    %r12d,%esi
  lea    D36(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L183:
  xor    %eax,%eax
  call   <getchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0x48,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L87:
  cmp    $0x79,%al
  je     L22
L86:
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L64
  nopl   0x0(%rax,%rax,1)
L150:
  lea    D20(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  jmp    L153
  nopw   0x0(%rax,%rax,1)
L75:
  cmpl   $0x4,0x10(%rsp)
  jne    L139
  lea    D82(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L139
  cs nopw 0x0(%rax,%rax,1)
L169:
  mov    %r12d,%esi
  lea    D158(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L183
  cs nopw 0x0(%rax,%rax,1)
L36:
  lea    D129(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L139
  nopl   0x0(%rax,%rax,1)
L123:
  lea    D92(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L139
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D204
datatype: string
name: read_data
arguments: data_label: D59
datatype: string
name: read_data
arguments: data_label: D249
datatype: string
name: read_data
arguments: data_label: D196
datatype: string
name: read_data
arguments: data_label: D78
datatype: string
name: read_data
arguments: data_label: D245
datatype: string
name: read_data
arguments: data_label: D8
datatype: string
name: read_data
arguments: data_label: D16
datatype: string
name: read_data
arguments: data_label: D186
datatype: string
name: read_data
arguments: data_label: D247
datatype: string
name: read_data
arguments: data_label: D236
datatype: string
name: read_data
arguments: data_label: D195
datatype: string
name: read_data
arguments: data_label: D115
datatype: string
name: read_data
arguments: data_label: D209
datatype: string
name: read_data
arguments: data_label: D11
datatype: string
name: read_data
arguments: data_label: D41
datatype: string
name: read_data
arguments: data_label: D117
datatype: string
name: read_data
arguments: data_label: D140
datatype: string
name: read_data
arguments: data_label: D142
datatype: string
name: read_data
arguments: data_label: D36
datatype: string
name: read_data
arguments: data_label: D173
datatype: string
name: read_data
arguments: data_label: D20
datatype: string
name: read_data
arguments: data_label: D82
datatype: string
name: read_data
arguments: data_label: D158
datatype: string
name: read_data
arguments: data_label: D129
datatype: string
name: read_data
arguments: data_label: D92
datatype: string

tool: D204: 

tool: D59: 

	  Manage your stand for today!

tool: D249: 
	

tool: D196: 
	Remember:

tool: D78: 
	Cost per glass: %ic

tool: D245: 
	Cost per signal: %ic

tool: D8: 
	Average competence price per glass: %ic

tool: D16: 
	Weather: 

tool: D186: sunny

tool: D247: 


tool: D236: 
	How many signals will you use? 

tool: D195: %d

tool: D115: 
	How many glasses of lemonade will you make? 

tool: D209:  %c

tool: D11: 
	How much cents per glass will you ask? 

tool: D41: 
	Are these values right? (Y/N)

tool: D117: 	OK 

tool: D140: 
	The sells for today were...

tool: D142: 
	You sold %i glasses.

tool: D36: 
	You won %i today

tool: D173: 	Option not recognised. Try again... 

tool: D20: 	Press ENTER to set values again 

tool: D82: stormy

tool: D158: 
	You lost %i today

tool: D129: hot

tool: D92: cloudy

assistant: ```c
int gameplay(int diff, int whr) {
  int numg, nums, prcg, cstg, totalp, slls, csts, prcc, prcs, x, y;
  switch (diff) {
  case 1:
    cstg = 5;
    prcs = 30;
    prcc = 20;
    break;
  case 2:
    cstg = 7;
    prcs = 40;
    prcc = 15;
    break;
  case 3:
    cstg = 9;
    prcs = 50;
    prcc = 12;
    break;
  }
  clearScreen();
  printf("\n\n\t  Manage your stand for today!");
  printf("\n\t");
  printf("\n\tRemember:");
  printf("\n\tCost per glass: %ic", cstg);
  printf("\n\tCost per signal: %ic", csts);
  printf("\n\tAverage competence price per glass: %ic", prcc);
  printf("\n\tWeather: ");
  switch (whr) {
  case 1:
    printf("hot");
    break;
  case 2:
    printf("sunny");
    break;
  case 3:
    printf("cloudy");
    break;
  case 4:
    printf("stormy");
    break;
  }
  printf("\n\n");
  do {
    x = 0;
    printf("\n\tHow many signals will you use? ");
    scanf("%d", &nums);
    printf("\n\tHow many glasses of lemonade will you make? ");
    scanf("%d", &numg);
    printf("\n\tHow much cents per glass will you ask? ");
    scanf("%d", &prcg);
    printf("\n");
    printf("\n\tAre these values right? (Y/N)");
    char slct;
    do {
      scanf(" %c", &slct);
      y = 1;
      switch (slct) {
      case 'Y':
      case 'y':
        printf("\tOK ");
        x = 0;
        y = 1;
        break;
      case 'N':
      case 'n':
        printf("\tPress ENTER to set values again ");
        x = 1;
        y = 1;
        getchar();
        break;
      default:
        printf("\tOption not recognised. Try again... ");
        y = 0;
        break;
      }
    } while (y == 0);
  } while (x == 1);
  clearScreen();
  printf("\n");
  printf("\n\tThe sells for today were...");
  slls = cslls(numg, prcg, nums, diff, whr, prcc);
  totalp = ((slls * prcg) - ((numg * cstg) + (nums * csts)));
  printf("\n");
  printf("\n");
  printf("\n\tYou sold %i glasses.", slls);
  if (totalp < 0) {
    printf("\n\tYou lost %i today", totalp);
  } else {
    printf("\n\tYou won %i today", totalp);
  }
  getchar();
  getchar();
  return totalp;
}
```