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

```asm
<control_register_test>:
  endbr64
  push   %rbp
  mov    $0x2a,%edi
  push   %rbx
  sub    $0x8,%rsp
  call   <send_char@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,%ebx
  test   $0x1e,%al
  je     L182
  test   $0x80,%al
  je     L45
L115:
  mov    $0x2e9,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
  nopl   0x0(%rax)
L118:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  test   $0x1,%al
  je     L118
  mov    $0x9c000002,%edi
  mov    $0x2,%esi
  call   <setreg@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  cmp    $0x60,%eax
  je     L51
  mov    $0x2ec,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
L51:
  mov    $0x21,%edi
  lea    D31(%rip),%rbp
  call   <send_char@plt>
  mov    $0x21,%edi
  call   <recv_char@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    $0x2ef,%esi
  call   <printf@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  test   $0x20,%al
  je     L38
L149:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  test   $0x40,%al
  je     L10
L29:
  mov    $0x31,%edi
  call   <send_char_no_wait@plt>
  mov    $0x32,%edi
  call   <send_char_no_wait@plt>
  mov    $0x9c000002,%edi
  mov    $0x4,%esi
  call   <setreg@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  cmp    $0x20,%eax
  je     L157
  mov    $0x2fb,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
L157:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,%ebx
  test   $0x1e,%al
  je     L70
  test   $0x80,%al
  je     L106
L175:
  mov    $0x2fc,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
L119:
  mov    $0x2a,%edi
  call   <send_char@plt>
  mov    $0x2a,%edi
  call   <recv_char@plt>
  mov    %rbp,%rdi
  mov    $0x2ff,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x306,%esi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x8,%rsp
  lea    D76(%rip),%rdi
  pop    %rbx
  pop    %rbp
  jmp    10d0 <puts@plt>
  nopl   0x0(%rax,%rax,1)
L70:
  test   $0x80,%al
  jne    L175
L71:
  and    $0x60,%ebx
  cmp    $0x40,%ebx
  jne    L119
  jmp    L175
  cs nopw 0x0(%rax,%rax,1)
L182:
  test   $0x80,%al
  jne    L115
L183:
  and    $0x60,%ebx
  cmp    $0x40,%ebx
  jne    L118
  jmp    L115
  nopl   0x0(%rax)
L10:
  mov    $0x2f3,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
  jmp    L29
  cs nopw 0x0(%rax,%rax,1)
L38:
  mov    $0x2f2,%esi
  lea    D81(%rip),%rdi
  call   <fail@plt>
  jmp    L149
  cs nopw 0x0(%rax,%rax,1)
L106:
  mov    %eax,%esi
  mov    $0x2fc,%edx
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L71
  nopw   0x0(%rax,%rax,1)
L45:
  mov    %eax,%esi
  mov    $0x2e9,%edx
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L183
```

tool_calls: name: parse_data
arguments: label: D81
datatype: string
name: parse_data
arguments: label: D31
datatype: string
name: parse_data
arguments: label: D76
datatype: string
name: parse_data
arguments: label: D11
datatype: string

tool: D81: ?

tool: D31: Passed line %i


tool: D76: OK

tool: D11: LSR7 (0x%02x) ERR @ %i


assistant: ```c
void control_register_test() {
  send_char('*');
  {
    unsigned x = getreg(((0x9c000000) + 5));
    if ((x & ((0x10) | (0x08) | (0x04) | (0x02))) && !(x & (0x80)))
      printf("LSR7 (0x%02x) ERR @ %i\n", x, 745);
    ((!(x & (0x80)) && ((x & 0x60) != 0x40)) ? 1 : fail("?", 745));
  };
  while (!(getreg(((0x9c000000) + 5)) & 0x01))
    ;
  setreg(((0x9c000000) + 2), 2);
  ((getreg(((0x9c000000) + 5)) == 0x60) ? 1 : fail("?", 748));
  send_char('!');
  recv_char('!');
  printf("Passed line %i\n", 751);
  ((getreg(((0x9c000000) + 5)) & (0x20)) ? 1 : fail("?", 754));
  ((getreg(((0x9c000000) + 5)) & (0x40)) ? 1 : fail("?", 755));
  send_char_no_wait('1');
  send_char_no_wait('2');
  setreg(((0x9c000000) + 2), 4);
  ((getreg(((0x9c000000) + 5)) == 0x20) ? 1 : fail("?", 763));
  {
    unsigned x = getreg(((0x9c000000) + 5));
    if ((x & ((0x10) | (0x08) | (0x04) | (0x02))) && !(x & (0x80)))
      printf("LSR7 (0x%02x) ERR @ %i\n", x, 764);
    ((!(x & (0x80)) && ((x & 0x60) != 0x40)) ? 1 : fail("?", 764));
  };
  send_char('*');
  recv_char('*');
  printf("Passed line %i\n", 767);
  printf("Passed line %i\n", 774);
  printf("OK\n");
}
```