user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movb   $0x78,-0x1a(%rbp)
  movb   $0x78,-0x19(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  lea    D133(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D117(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1a(%rbp),%rax
  mov    %rax,%rsi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl -0x1a(%rbp),%eax
  cmp    $0x79,%al
  jne    L107
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x19(%rbp),%rax
  mov    %rax,%rsi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl -0x19(%rbp),%eax
  cmp    $0x72,%al
  jne    L107
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%esi
  sar    $0x1f,%esi
  mov    %eax,%ecx
  sub    %esi,%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,%ecx
  lea    0x1(%rcx),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D85(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x1,-0xc(%rbp)
  jne    L93
  mov    -0x18(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L57
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L63
L57:
  mov    -0x18(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L107
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L107
L93:
  movzbl -0x19(%rbp),%eax
  cmp    $0x68,%al
  jne    L107
  mov    -0x18(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L92
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L63
L92:
  mov    -0x18(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L27
  lea    D114(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L63
L27:
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L107:
  mov    $0x0,%eax
L63:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L78
  call   <__stack_chk_fail@plt>
L78:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D133
datatype: string
name: read_data
arguments: data_tag: D147
datatype: string
name: read_data
arguments: data_tag: D117
datatype: string
name: read_data
arguments: data_tag: D84
datatype: string
name: read_data
arguments: data_tag: D37
datatype: string
name: read_data
arguments: data_tag: D53
datatype: string
name: read_data
arguments: data_tag: D128
datatype: string
name: read_data
arguments: data_tag: D52
datatype: string
name: read_data
arguments: data_tag: D56
datatype: string
name: read_data
arguments: data_tag: D85
datatype: string
name: read_data
arguments: data_tag: D79
datatype: string
name: read_data
arguments: data_tag: D39
datatype: string
name: read_data
arguments: data_tag: D78
datatype: string
name: read_data
arguments: data_tag: D114
datatype: string
name: read_data
arguments: data_tag: D107
datatype: string

tool: D133: 
welcome to a game  of pigthrones

tool: D147: ---------------------------

tool: D117:   made by dominick hera   

tool: D84: 
do you and your friend want to play a game? (y/n) :

tool: D37: %c

tool: D53: please set the game total: 

tool: D128: %d

tool: D52: do you want to (r)oll or (h)old? : 

tool: D56: 
%c

tool: D85: %d


tool: D79: Player one wins! weo weo weo

tool: D39: Player two wins! weo weo weo

tool: D78: Player one wins! weo weo weo 

tool: D114: Player two wins! weo weo weo 

tool: D107: it's now the next players turn

assistant: ```c
int main(void) {
  srand((int)time(0));
  char charAnswer = 'x';
  char rollAnswer = 'x';
  int gameTotal = 0;
  int playerOneTotal = 0;
  int playerTwoTotal = 0;
  int randomNumber = 0;
  printf("\nwelcome to a game  of pigthrones\n");
  printf("---------------------------\n");
  printf("  made by dominick hera   \n");
  printf("\ndo you and your friend want to play a game? (y/n) :");
  scanf("%c", &charAnswer);
  if (charAnswer == 'y') {
    printf("please set the game total: \n");
    scanf("%d", &gameTotal);
    printf("do you want to (r)oll or (h)old? : \n");
    scanf("\n%c", &rollAnswer);
    if (rollAnswer == 'r') {
      randomNumber = ((rand() % 6) + 1);
      printf("%d\n", randomNumber);
      if (randomNumber == 1) {
        if (playerOneTotal >= gameTotal) {
          printf("Player one wins! weo weo weo");
          return 0;
        } else if (playerTwoTotal >= gameTotal) {
          printf("Player two wins! weo weo weo");
        }
      } else if (rollAnswer == 'h') {
        if (playerOneTotal >= gameTotal) {
          printf("Player one wins! weo weo weo \n");
          return 0;
        } else if (playerTwoTotal >= gameTotal) {
          printf("Player two wins! weo weo weo \n");
          return 0;
        } else {
          printf("it's now the next players turn");
        }
      }
    }
  }
  return 0;
}
```