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

```asm
<set_piece>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  call   <clear_piece@plt>
  cmp    $0x6,%ebp
  ja     L145
  lea    D6(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
  mov    $0x101,%r10d
  mov    $0x101,%r11d
  mov    %r10w,0x17(%rbx)
  mov    %r11w,0x1e(%rbx)
L145:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
  mov    $0x101,%esi
  movb   $0x1,0x19(%rbx)
  mov    %si,0x17(%rbx)
  movb   $0x1,0x1f(%rbx)
  test   %r12d,%r12d
  jle    L145
  xor    %ebp,%ebp
  nopl   0x0(%rax,%rax,1)
L7:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <rotate_piece@plt>
  cmp    %ebp,%r12d
  jne    L7
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
  and    $0x1,%r12d
  jne    L61
  mov    $0x101,%edx
  mov    $0x101,%ecx
  mov    %dx,0x18(%rbx)
  mov    %cx,0x1e(%rbx)
  jmp    L145
  cs nopw 0x0(%rax,%rax,1)
  and    $0x1,%r12d
  jne    L56
  movl   $0x1010101,0x16(%rbx)
  jmp    L145
  nopl   0x0(%rax,%rax,1)
  mov    $0x101,%eax
  movb   $0x1,0x19(%rbx)
  xor    %ebp,%ebp
  mov    %ax,0x17(%rbx)
  movb   $0x1,0x20(%rbx)
  test   %r12d,%r12d
  jle    L145
  nopl   0x0(%rax)
L63:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <rotate_piece@plt>
  cmp    %ebp,%r12d
  jne    L63
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
  and    $0x1,%r12d
  jne    L110
  mov    $0x101,%r8d
  mov    $0x101,%r9d
  mov    %r8w,0x17(%rbx)
  mov    %r9w,0x1f(%rbx)
  jmp    L145
  nopl   (%rax)
  mov    $0x101,%ebp
  movb   $0x1,0x19(%rbx)
  mov    %bp,0x17(%rbx)
  movb   $0x1,0x1e(%rbx)
  test   %r12d,%r12d
  jle    L145
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L15:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <rotate_piece@plt>
  cmp    %ebp,%r12d
  jne    L15
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L61:
  mov    $0x101,%eax
  movb   $0x1,0x11(%rbx)
  mov    %ax,0x18(%rbx)
  movb   $0x1,0x20(%rbx)
  jmp    L145
  cs nopw 0x0(%rax,%rax,1)
L56:
  movb   $0x1,0xa(%rbx)
  movb   $0x1,0x11(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x1f(%rbx)
  jmp    L145
  nopl   (%rax)
L110:
  mov    $0x101,%edi
  movb   $0x1,0x11(%rbx)
  mov    %di,0x17(%rbx)
  movb   $0x1,0x1e(%rbx)
  jmp    L145
```

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