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

```asm
<gtp_play>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xde8,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0xdd8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  mov    %rbx,%rdi
  call   <is_color_valid@plt>
  test   %eax,%eax
  je     L31
  add    $0x14,%rbx
  mov    %rbx,%rdi
  call   <is_vertex_pass@plt>
  test   %rax,%rax
  jne    L85
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <is_vertex_valid@plt>
  test   %eax,%eax
  je     L147
  mov    0xc(%rsp),%esi
  mov    0x8(%rsp),%edi
  call   <get_vertex@plt>
  test   %rax,%rax
  jne    L154
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <is_move_ko@plt>
  test   %rax,%rax
  jne    L96
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <set_vertex@plt>
  mov    $0x0,%eax
  call   <scan_board_1@plt>
  mov    0x4(%rsp),%edi
  neg    %edi
  call   <remove_stones@plt>
  test   %eax,%eax
  jg     L54
L55:
  mov    0xc(%rsp),%esi
  mov    0x8(%rsp),%edi
  call   <get_worm_nr@plt>
  mov    %eax,%ebx
  mov    %eax,%edi
  call   <get_nr_of_liberties@plt>
  mov    %eax,%ebp
  mov    %ebx,%edi
  call   <get_size_of_worm@plt>
  mov    %eax,%ebx
  test   %ebp,%ebp
  je     L26
  lea    0x10(%rsp),%r13
  mov    %r13,%rdi
  call   <get_captured_now@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <create_next_move@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <set_move_vertex@plt>
  mov    %r13,%rdi
  call   <set_move_captured_stones@plt>
  cmp    $0x1,%ebx
  sete   %dl
  cmp    $0x1,%ebp
  sete   %al
  test   %al,%dl
  je     L111
  cmp    $0x1,%r12d
  je     L141
L111:
  mov    $0x0,%eax
  call   <push_move@plt>
  jmp    L48
L31:
  call   <set_output_error@plt>
  lea    D18(%rip),%rdi
  call   <add_output@plt>
L48:
  mov    0xdd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  add    $0xde8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L85:
  mov    $0x0,%eax
  call   <create_next_move@plt>
  mov    0x4(%rsp),%edi
  call   <set_move_pass@plt>
  mov    $0x0,%eax
  call   <push_move@plt>
  jmp    L48
L147:
  call   <set_output_error@plt>
  lea    D43(%rip),%rdi
  call   <add_output@plt>
  jmp    L48
L154:
  mov    $0x0,%eax
  call   <set_output_error@plt>
  lea    D34(%rip),%rdi
  call   <add_output@plt>
  jmp    L48
L96:
  mov    $0x0,%eax
  call   <set_output_error@plt>
  lea    D34(%rip),%rdi
  call   <add_output@plt>
  jmp    L48
L54:
  mov    $0x0,%eax
  call   <scan_board_1@plt>
  jmp    L55
L26:
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    $0x0,%edi
  call   <set_vertex@plt>
  mov    $0x0,%eax
  call   <set_output_error@plt>
  lea    D34(%rip),%rdi
  call   <add_output@plt>
  jmp    L48
L141:
  mov    0x14(%rsp),%esi
  mov    0x10(%rsp),%edi
  call   <set_move_ko@plt>
  jmp    L111
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D18
data_type: string
name: extract_symbolic_data
arguments: data_tag: D43
data_type: string
name: extract_symbolic_data
arguments: data_tag: D34
data_type: string

tool: D18: invalid color

tool: D43: invalid coordinate

tool: D34: illegal move

assistant: ```c
void gtp_play(int gtp_argc, char gtp_argv[][20]) {
  int color;
  int i, j;
  int nr_of_removed_stones;
  int group_nr;
  int nr_of_liberties;
  int group_size;
  int captured_now[21 * 21][2];
  if (!is_color_valid(gtp_argv[0], &color)) {
    set_output_error();
    add_output("invalid color");
    return;
  }
  if (is_vertex_pass(gtp_argv[1])) {
    create_next_move();
    set_move_pass(color);
    push_move();
    return;
  }
  if (!is_vertex_valid(gtp_argv[1], &i, &j)) {
    set_output_error();
    add_output("invalid coordinate");
    return;
  }
  if (get_vertex(i, j) != 0) {
    set_output_error();
    add_output("illegal move");
    return;
  }
  if (is_move_ko(color, i, j)) {
    set_output_error();
    add_output("illegal move");
    return;
  }
  set_vertex(color, i, j);
  scan_board_1();
  nr_of_removed_stones = remove_stones(color * -1);
  if (nr_of_removed_stones > 0) {
    scan_board_1();
  }
  group_nr = get_worm_nr(i, j);
  nr_of_liberties = get_nr_of_liberties(group_nr);
  group_size = get_size_of_worm(group_nr);
  if (nr_of_liberties == 0) {
    set_vertex(0, i, j);
    set_output_error();
    add_output("illegal move");
    return;
  }
  nr_of_removed_stones = get_captured_now(captured_now);
  create_next_move();
  set_move_vertex(color, i, j);
  set_move_captured_stones(captured_now);
  if (nr_of_removed_stones == 1 && group_size == 1 && nr_of_liberties == 1) {
    set_move_ko(captured_now[0][0], captured_now[0][1]);
  }
  push_move();
  return;
}
```