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

```asm
<set_piece>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %edx,%r12d
  call   <clear_piece@plt>
  cmp    $0x6,%ebp
  ja     L136
  mov    %ebp,%ebp
  lea    D6(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  test   $0x1,%r12b
  jne    L142
  movb   $0x1,0x16(%rbx)
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  jmp    L136
L142:
  movb   $0x1,0xa(%rbx)
  movb   $0x1,0x11(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x1f(%rbx)
  jmp    L136
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  movb   $0x1,0x20(%rbx)
  test   %r12d,%r12d
  jle    L136
  mov    $0x0,%ebp
L139:
  mov    %rbx,%rdi
  call   <rotate_piece@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r12d
  jne    L139
  jmp    L136
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  movb   $0x1,0x1e(%rbx)
  test   %r12d,%r12d
  jle    L136
  mov    $0x0,%ebp
L31:
  mov    %rbx,%rdi
  call   <rotate_piece@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r12d
  jne    L31
  jmp    L136
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x1e(%rbx)
  movb   $0x1,0x1f(%rbx)
L136:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  test   $0x1,%r12b
  jne    L163
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x1f(%rbx)
  movb   $0x1,0x20(%rbx)
  jmp    L136
L163:
  movb   $0x1,0x11(%rbx)
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x1e(%rbx)
  jmp    L136
  movb   $0x1,0x17(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  movb   $0x1,0x1f(%rbx)
  test   %r12d,%r12d
  jle    L136
  mov    $0x0,%ebp
L180:
  mov    %rbx,%rdi
  call   <rotate_piece@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r12d
  jne    L180
  jmp    L136
  test   $0x1,%r12b
  jne    L189
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  movb   $0x1,0x1e(%rbx)
  movb   $0x1,0x1f(%rbx)
  jmp    L136
L189:
  movb   $0x1,0x11(%rbx)
  movb   $0x1,0x18(%rbx)
  movb   $0x1,0x19(%rbx)
  movb   $0x1,0x20(%rbx)
  jmp    L136
```

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