user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movb   $0x41,-0x89(%rbp)
  movl   $0x0,-0x88(%rbp)
  jmp    L49
L255:
  movl   $0x0,-0x84(%rbp)
  jmp    L171
L165:
  mov    -0x84(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rbp,%rax
  add    %rcx,%rax
  sub    $0x70,%rax
  movb   $0x2e,(%rax)
  addl   $0x1,-0x84(%rbp)
L171:
  cmpl   $0x9,-0x84(%rbp)
  jle    L165
  addl   $0x1,-0x88(%rbp)
L49:
  cmpl   $0x9,-0x88(%rbp)
  jle    L255
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x0,-0x88(%rbp)
  movl   $0x0,-0x84(%rbp)
  movzbl -0x89(%rbp),%edx
  mov    %edx,%eax
  add    $0x1,%eax
  mov    %al,-0x89(%rbp)
  mov    -0x84(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x88(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  add    %rax,%rax
  add    %rbp,%rax
  add    %rsi,%rax
  sub    $0x70,%rax
  mov    %dl,(%rax)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x1e,%edx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L128
L12:
  mov    -0x80(%rbp),%edx
  mov    -0x7c(%rbp),%eax
  add    %edx,%eax
  cltd
  shr    $0x1e,%edx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x3,%eax
  je     L184
  cmp    $0x3,%eax
  jg     L219
  cmp    $0x2,%eax
  je     L146
  cmp    $0x2,%eax
  jg     L219
  test   %eax,%eax
  je     L195
  cmp    $0x1,%eax
  je     L136
  jmp    L219
L195:
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x74(%rbp)
  jmp    L219
L136:
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x74(%rbp)
  jmp    L219
L146:
  mov    -0x88(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  jmp    L219
L184:
  mov    -0x88(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  nop
L219:
  cmpl   $0x0,-0x78(%rbp)
  jle    L135
  cmpl   $0x9,-0x78(%rbp)
  jg     L135
  cmpl   $0x0,-0x74(%rbp)
  js     L135
  cmpl   $0xa,-0x74(%rbp)
  jg     L135
  mov    -0x74(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rbp,%rax
  add    %rcx,%rax
  sub    $0x70,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L135
  mov    -0x78(%rbp),%eax
  mov    %eax,-0x88(%rbp)
  mov    -0x74(%rbp),%eax
  mov    %eax,-0x84(%rbp)
  movzbl -0x89(%rbp),%edx
  mov    %edx,%eax
  add    $0x1,%eax
  mov    %al,-0x89(%rbp)
  mov    -0x84(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x88(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  add    %rax,%rax
  add    %rbp,%rax
  add    %rsi,%rax
  sub    $0x70,%rax
  mov    %dl,(%rax)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x1e,%edx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L128
L135:
  addl   $0x1,-0x7c(%rbp)
L128:
  cmpl   $0x3,-0x7c(%rbp)
  jg     L277
  cmpb   $0x59,-0x89(%rbp)
  jle    L12
L277:
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x88(%rbp)
  jmp    L6
L81:
  movl   $0x0,-0x84(%rbp)
  jmp    L262
L242:
  mov    -0x84(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rbp,%rax
  add    %rcx,%rax
  sub    $0x70,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  addl   $0x1,-0x84(%rbp)
L262:
  cmpl   $0x9,-0x84(%rbp)
  jle    L242
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x88(%rbp)
L6:
  cmpl   $0x9,-0x88(%rbp)
  jle    L81
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L213
  call   <__stack_chk_fail@plt>
L213:
  leave
  ret
```

assistant: ```c
int main(void) {
  char field[10][10];
  char walk = 'A';
  int x, y, direction, moves_tried, new_x, new_y;
  for (x = 0; x < 10; x++) {
    for (y = 0; y < 10; y++) {
      field[x][y] = '.';
    }
  }
  srand((unsigned)time(NULL));
  x = 0;
  y = 0;
  field[x][y] = walk++;
  direction = rand() % 4;
  moves_tried = 0;
  while (moves_tried < 4 && walk < 'Z') {
    switch ((direction + moves_tried) % 4) {
    case 0:
      new_x = x;
      new_y = y + 1;
      break;
    case 1:
      new_x = x;
      new_y = y - 1;
      break;
    case 2:
      new_x = x + 1;
      new_y = y;
      break;
    case 3:
      new_x = x - 1;
      new_y = y;
      break;
    }
    if (0 < new_x && new_x < 10 && 0 <= new_y && new_y <= 10 && field[new_x][new_y] == '.') {
      x = new_x;
      y = new_y;
      field[x][y] = walk++;
      direction = rand() % 4;
      moves_tried = 0;
    } else
      moves_tried++;
  }
  printf("\n");
  for (x = 0; x < 10; x++) {
    for (y = 0; y < 10; y++) {
      printf("%c", field[x][y]);
    }
    printf("\n");
  }
  return 0;
}
```