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

```asm
<set_piece>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <clear_piece@plt>
  cmpl   $0x6,-0x1c(%rbp)
  ja     L167
  mov    -0x1c(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D3(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D3(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x20(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L143
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x1(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  jmp    L167
L143:
  mov    -0x18(%rbp),%rax
  add    $0x7,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xe,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x3(%rax)
  jmp    L167
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x4(%rax)
  movl   $0x0,-0xc(%rbp)
  jmp    L33
L67:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <rotate_piece@plt>
  addl   $0x1,-0xc(%rbp)
L33:
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L67
  jmp    L167
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x2(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L101
L183:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <rotate_piece@plt>
  addl   $0x1,-0x8(%rbp)
L101:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L183
  jmp    L167
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x3(%rax)
  jmp    L167
  mov    -0x20(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L189
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x4(%rax)
  jmp    L167
L189:
  mov    -0x18(%rbp),%rax
  add    $0xe,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x2(%rax)
  jmp    L167
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x3(%rax)
  movl   $0x0,-0x4(%rbp)
  jmp    L151
L81:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <rotate_piece@plt>
  addl   $0x1,-0x4(%rbp)
L151:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L81
  jmp    L167
  mov    -0x20(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L137
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x2(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x3(%rax)
  jmp    L44
L137:
  mov    -0x18(%rbp),%rax
  add    $0xe,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x3(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movb   $0x1,0x4(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  movb   $0x1,0x4(%rax)
L44:
  nop
L167:
  nop
  leave
  ret
```

assistant: ```c
void set_piece(char piece[7][7], int shape, int rotation) {
  clear_piece(piece);
  switch (shape) {
  case 0:
    if (rotation % 2 == 0) {
      piece[3][1] = 1;
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[3][4] = 1;
    } else {
      piece[1][3] = 1;
      piece[2][3] = 1;
      piece[3][3] = 1;
      piece[4][3] = 1;
    }
    break;
  case 1:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][4] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 2:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][2] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 3:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[4][2] = 1;
    piece[4][3] = 1;
    break;
  case 4:
    if (rotation % 2 == 0) {
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[4][3] = 1;
      piece[4][4] = 1;
    } else {
      piece[2][3] = 1;
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[4][2] = 1;
    }
    break;
  case 5:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][3] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 6:
    if (rotation % 2 == 0) {
      piece[3][3] = 1;
      piece[3][4] = 1;
      piece[4][2] = 1;
      piece[4][3] = 1;
    } else {
      piece[2][3] = 1;
      piece[3][3] = 1;
      piece[3][4] = 1;
      piece[4][4] = 1;
    }
    break;
  }
}
```