user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0x8,%edx
  mov    $0x64,%esi
  lea    D116(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  lea    D101(%rip),%r14
  lea    D39(%rip),%r15
  jmp    L122
L149:
  mov    %r15,%rsi
L97:
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L100:
  add    $0x1,%ebx
  cmp    $0x9,%ebx
  je     L0
L103:
  mov    (%rsp),%eax
  cmp    %eax,0x4(%rsp)
  jne    L121
  cmp    %ebp,%eax
  je     L0
L121:
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rsp,%rdx
  lea    0x4(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%edx
  mov    (%rsp),%eax
  cmp    %eax,%edx
  jle    L16
  mov    %edx,(%rsp)
  mov    %eax,0x4(%rsp)
L16:
  cmp    %ebp,0x4(%rsp)
  jg     L149
  lea    D28(%rip),%rsi
  cmp    %ebp,(%rsp)
  jl     L97
  lea    D33(%rip),%rdi
  call   <puts@plt>
  jmp    L100
L0:
  mov    (%rsp),%eax
  cmp    %eax,0x4(%rsp)
  jne    L98
  cmp    %ebp,%eax
  je     L45
L98:
  mov    %ebp,%edx
  mov    $0x8,%esi
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L96:
  lea    D84(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L59:
  mov    $0x0,%eax
  call   <getchar@plt>
  movsbl %al,%ebx
  mov    %ebx,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L59
  mov    %ebx,%edi
  call   <tolower@plt>
  cmp    $0x79,%al
  jne    L88
L122:
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%ebp
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x25,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%ebp
  add    $0x1,%ebp
  mov    $0x8,%esi
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%ebx
  lea    D98(%rip),%r12
  lea    D70(%rip),%r13
  jmp    L103
L45:
  lea    D78(%rip),%rdi
  call   <puts@plt>
  jmp    L96
L88:
  lea    D115(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D116
datatype: string
name: extract_symbolic_data
arguments: data_label: D101
datatype: string
name: extract_symbolic_data
arguments: data_label: D39
datatype: string
name: extract_symbolic_data
arguments: data_label: D28
datatype: string
name: extract_symbolic_data
arguments: data_label: D33
datatype: string
name: extract_symbolic_data
arguments: data_label: D12
datatype: string
name: extract_symbolic_data
arguments: data_label: D84
datatype: string
name: extract_symbolic_data
arguments: data_label: D25
datatype: string
name: extract_symbolic_data
arguments: data_label: D98
datatype: string
name: extract_symbolic_data
arguments: data_label: D70
datatype: string
name: extract_symbolic_data
arguments: data_label: D78
datatype: string
name: extract_symbolic_data
arguments: data_label: D115
datatype: string

tool: D116: Trap
----
In this game you have to try to guess a number between 1 and %d by
trapping it. Every guess you type a low and high number seperated by a
comma (like "15, 30") and you'll be told if the number you are trying to
find is between your number. When you think you have it type the same
number for both the high and low guess. And remember, you only have %d
guesses to find the number
Good luck!



tool: D101: 
Guess %d (low , high) : 

tool: D39: lower

tool: D28: higher

tool: D33: You've trapped my number.

tool: D12: Ha ha! That's %d guesses. My number was %d.



tool: D84: Do you want to do play again? (y/n) 

tool: D25: I have a number. You have %d guesses.


tool: D98: %d %*c %d

tool: D70: My number is %s than your guesses.


tool: D78: I am undone! You caught my number.


tool: D115: Until next time then!

assistant: ```c
int main(void) {
  int x, h, l, try, temp;
  char yesno;
  printf("Trap\n----\n"
         "In this game you have to try to guess a number between 1 and %d by\n"
         "trapping it. Every guess you type a low and high number seperated by a\n"
         "comma (like \"15, 30\") and you'll be told if the number you are trying to\n"
         "find is between your number. When you think you have it type the same\n"
         "number for both the high and low guess. And remember, you only have %d\n"
         "guesses to find the number\n"
         "Good luck!\n\n",
         100, 8);
  srand(time(NULL));
  do {
    x = rand() % 100 + 1;
    printf("I have a number. You have %d guesses.\n", 8);
    for (try = 1; try <= 8 && !(l == h && h == x); try++) {
      printf("\nGuess %d (low , high) : ", try);
      scanf("%d %*c %d", &l, &h);
      if (l > h) {
        temp = h;
        h = l;
        l = temp;
      }
      if (l <= x && x <= h)
        printf("You've trapped my number.\n");
      else
        printf("My number is %s than your guesses.\n", (l > x) ? "lower" : "higher");
    }
    if (l == h && h == x)
      printf("I am undone! You caught my number.\n\n");
    else
      printf("Ha ha! That's %d guesses. My number was %d.\n\n", 8, x);
    printf("Do you want to do play again? (y/n) ");
    while (!isalpha(yesno = getchar()))
      ;
  } while (tolower(yesno) == 'y');
  printf("Until next time then!\n");
  exit(0);
}
```