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

```asm
<main>:
  endbr64
  push   %rbx
  xor    %edi,%edi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  lea    D53(%rip),%rdi
  movb   $0x78,0x2(%rsp)
  movb   $0x78,0x3(%rsp)
  movl   $0x0,0x4(%rsp)
  call   <puts@plt>
  lea    D126(%rip),%rdi
  call   <puts@plt>
  lea    D103(%rip),%rdi
  call   <puts@plt>
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  lea    0x2(%rsp),%rsi
  lea    D110(%rip),%rdi
  call   <scanf@plt>
  cmpb   $0x79,0x2(%rsp)
  je     L31
L42:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
L31:
  lea    D9(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rsi
  lea    D127(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D58(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  lea    0x3(%rsp),%rsi
  lea    D47(%rip),%rdi
  call   <scanf@plt>
  cmpb   $0x72,0x3(%rsp)
  jne    L42
  xor    %eax,%eax
  call   <rand@plt>
  mov    $0x6,%ecx
  lea    D101(%rip),%rdi
  cltd
  idiv   %ecx
  xor    %eax,%eax
  lea    0x1(%rdx),%ebx
  mov    %ebx,%esi
  call   <printf@plt>
  sub    $0x1,%ebx
  je     L9
  cmpb   $0x68,0x3(%rsp)
  jne    L42
  cmpl   $0x0,0x4(%rsp)
  jle    L34
  lea    D123(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L42
L9:
  cmpl   $0x0,0x4(%rsp)
  jg     L42
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L42
L34:
  lea    D98(%rip),%rdi
  call   <puts@plt>
  jmp    L42
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D53
type_guessed: string
name: read_data
arguments: data_tag: D126
type_guessed: string
name: read_data
arguments: data_tag: D103
type_guessed: string
name: read_data
arguments: data_tag: D43
type_guessed: string
name: read_data
arguments: data_tag: D110
type_guessed: string
name: read_data
arguments: data_tag: D9
type_guessed: string
name: read_data
arguments: data_tag: D127
type_guessed: string
name: read_data
arguments: data_tag: D58
type_guessed: string
name: read_data
arguments: data_tag: D47
type_guessed: string
name: read_data
arguments: data_tag: D101
type_guessed: string
name: read_data
arguments: data_tag: D123
type_guessed: string
name: read_data
arguments: data_tag: D40
type_guessed: string
name: read_data
arguments: data_tag: D98
type_guessed: string

tool: D53: 
welcome to a game  of pigthrones

tool: D126: ---------------------------

tool: D103:   made by dominick hera   

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

tool: D110: %c

tool: D9: please set the game total: 

tool: D127: %d

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

tool: D47: 
%c

tool: D101: %d


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

tool: D40: Player one wins! weo weo weo

tool: D98: Player one wins! weo weo weo 

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