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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movq   $0x737072,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movl   $0x0,0x38(%rsp)
  movb   $0x0,0x3c(%rsp)
  lea    D20(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%r12d
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  lea    D30(%rip),%r15
  jmp    L24
L108:
  add    $0x1,%r14d
  lea    D8(%rip),%rdi
  call   <puts@plt>
L15:
  mov    %r14d,%edx
  mov    %r13d,%esi
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%r12d
  je     L94
L24:
  mov    %r15,%rdi
  call   <puts@plt>
  lea    D47(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  lea    D6(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  sub    $0x1,%eax
  cltq
  movsbl 0x10(%rsp,%rax,1),%ebp
  mov    %ebp,%esi
  lea    D57(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <puts@plt>
  lea    D47(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%edi
  call   <generaterandomfunc@plt>
  lea    0x1(%rax),%edx
  mov    %edx,0xc(%rsp)
  cltq
  movsbl 0x10(%rsp,%rax,1),%ebx
  mov    %ebx,%esi
  lea    D79(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <greater@plt>
  cmp    $0x1,%eax
  je     L108
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <greater@plt>
  cmp    $0xffffffff,%eax
  je     L58
  add    $0x1,%r13d
  lea    D132(%rip),%rdi
  call   <puts@plt>
  jmp    L15
L58:
  add    $0x1,%r14d
  add    $0x1,%r13d
  lea    D45(%rip),%rdi
  call   <puts@plt>
  jmp    L15
L94:
  cmp    %r14d,%r13d
  jg     L84
  jge    L69
  lea    D46(%rip),%rdi
  call   <puts@plt>
L37:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L84:
  lea    D67(%rip),%rdi
  call   <puts@plt>
  jmp    L37
L69:
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L37
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D20
data_type: string
name: unpack_data
arguments: tag: D30
data_type: string
name: unpack_data
arguments: tag: D8
data_type: string
name: unpack_data
arguments: tag: D52
data_type: string
name: unpack_data
arguments: tag: D47
data_type: string
name: unpack_data
arguments: tag: D6
data_type: string
name: unpack_data
arguments: tag: D57
data_type: string
name: unpack_data
arguments: tag: D79
data_type: string
name: unpack_data
arguments: tag: D132
data_type: string
name: unpack_data
arguments: tag: D45
data_type: string
name: unpack_data
arguments: tag: D46
data_type: string
name: unpack_data
arguments: tag: D67
data_type: string
name: unpack_data
arguments: tag: D112
data_type: string

tool: D20: welcome to the rock paper scissor game

tool: D30: choose 1 for rock choose 2 for paper choose 3 for scissor 

tool: D8: cpu got it hurray

tool: D52: you : %d 
cpu : %d 


tool: D47: player no.1 turn 

tool: D6: %d

tool: D57: you choose  %c


tool: D79: cpu choose  %c


tool: D132: you got it hurray

tool: D45: its a draw 

tool: D46: cpu win 

tool: D67: you win 

tool: D112: match is draw

assistant: ```c
int main() {
  int playerscore = 0, compscore = 0, temp;
  char playerchar, compchar;
  char dict[45] = {'r', 'p', 's'};
  printf("welcome to the rock paper scissor game\n");
  for (int i = 0; i < 3; i++) {
    printf("choose 1 for rock choose 2 for paper choose 3 for scissor \n");
    printf("player no.1 turn \n");
    scanf("%d", &temp);
    playerchar = dict[temp - 1];
    printf("you choose  %c\n", playerchar);
    printf("choose 1 for rock choose 2 for paper choose 3 for scissor \n");
    printf("player no.1 turn \n");
    temp = generaterandomfunc(3) + 1;
    compchar = dict[temp - 1];
    printf("cpu choose  %c\n", compchar);
    if (greater(compchar, playerchar) == 1) {
      compscore += 1;
      printf("cpu got it hurray\n");
    } else if (greater(compchar, playerchar) == -1) {
      compscore += 1;
      playerscore += 1;
      printf("its a draw \n");
    } else {
      playerscore += 1;
      printf("you got it hurray\n");
    }
    printf("you : %d \ncpu : %d \n", playerscore, compscore);
  }
  if (playerscore > compscore) {
    printf("you win \n");
  } else if (compscore > playerscore) {
    printf("cpu win \n");
  } else {
    printf("match is draw");
  }
  return 0;
}
```