user: Converte this assembly snippet into its equivalent C code:

```asm
<break_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  lea    D208(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x16a,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x1e,%eax
  test   %eax,%eax
  je     L116
  mov    -0x18(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L116
  mov    -0x18(%rbp),%eax
  mov    $0x16c,%edx
  mov    %eax,%esi
  lea    D262(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L116:
  mov    -0x18(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L216
  mov    -0x18(%rbp),%eax
  and    $0x60,%eax
  cmp    $0x40,%eax
  jne    L74
L216:
  mov    $0x16c,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
  nop
L74:
  mov    $0x16d,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x43,%esi
  mov    $0x9c000003,%edi
  call   <setreg@plt>
  mov    $0x16f,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x62,%edi
  call   <send_char@plt>
  mov    $0x171,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x2a,%edi
  call   <recv_char@plt>
  mov    $0x3,%esi
  mov    $0x9c000003,%edi
  call   <setreg@plt>
  mov    $0x174,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x21,%edi
  call   <send_char@plt>
  mov    $0x178,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
L42:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L42
  mov    $0xf1,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0xf1,-0x14(%rbp)
  je     L93
  mov    $0x17c,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L93:
  mov    $0x9c000000,%edi
  call   <getreg@plt>
  test   %eax,%eax
  je     L230
  mov    $0x17d,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L230:
  mov    $0x17e,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x23,%esi
  mov    $0x9c000000,%edi
  call   <setreg@plt>
  nop
L247:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  and    $0x1,%eax
  test   %eax,%eax
  je     L247
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  and    $0x1e,%eax
  test   %eax,%eax
  je     L136
  mov    -0x10(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L136
  mov    -0x10(%rbp),%eax
  mov    $0x183,%edx
  mov    %eax,%esi
  lea    D262(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L136:
  mov    -0x10(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L99
  mov    -0x10(%rbp),%eax
  and    $0x60,%eax
  cmp    $0x40,%eax
  jne    L110
L99:
  mov    $0x183,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
  nop
L110:
  mov    $0x9c000000,%edi
  call   <getreg@plt>
  cmp    $0x24,%eax
  je     L64
  mov    $0x184,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L64:
  mov    $0x185,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D160(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L75
L90:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <send_char@plt>
L75:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L90
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  and    $0x1,%eax
  test   %eax,%eax
  je     L122
  mov    $0x18a,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L122:
  nop
L97:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  and    $0x40,%eax
  test   %eax,%eax
  je     L97
  mov    $0x2a,%esi
  mov    $0x9c000000,%edi
  call   <setreg@plt>
  mov    $0x43,%esi
  mov    $0x9c000003,%edi
  call   <setreg@plt>
  mov    $0x18f,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x3f,%edi
  call   <recv_char@plt>
  mov    $0x3,%esi
  mov    $0x9c000003,%edi
  call   <setreg@plt>
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0x1e,%eax
  test   %eax,%eax
  je     L205
  mov    -0xc(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L205
  mov    -0xc(%rbp),%eax
  mov    $0x194,%edx
  mov    %eax,%esi
  lea    D262(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L205:
  mov    -0xc(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L86
  mov    -0xc(%rbp),%eax
  and    $0x60,%eax
  cmp    $0x40,%eax
  jne    L71
L86:
  mov    $0x194,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
  nop
L71:
  mov    $0x195,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x23,%edi
  call   <send_char@plt>
  nop
L155:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L155
  mov    -0x14(%rbp),%eax
  mov    $0xf1,%edx
  mov    %eax,%esi
  lea    D252(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0xf1,-0x14(%rbp)
  je     L68
  mov    $0x19d,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L68:
  mov    $0x9c000000,%edi
  call   <getreg@plt>
  test   %eax,%eax
  je     L152
  mov    $0x19e,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <fail@plt>
L152:
  mov    $0x19f,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x3f,%edi
  call   <send_char@plt>
  mov    $0x1a1,%esi
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
L148:
  mov    $0x9c000005,%edi
  call   <getreg@plt>
  and    $0x1,%eax
  test   %eax,%eax
  je     L148
  mov    $0x21,%edi
  call   <recv_char@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D208
type: string
name: unpack_data
arguments: data_tag: D151
type: string
name: unpack_data
arguments: data_tag: D262
type: string
name: unpack_data
arguments: data_tag: D104
type: string
name: unpack_data
arguments: data_tag: D14
type: string
name: unpack_data
arguments: data_tag: D160
type: string
name: unpack_data
arguments: data_tag: D252
type: string
name: unpack_data
arguments: data_tag: D49
type: string

tool: D208: break_test

tool: D151: Passed line %i


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


tool: D104: ?

tool: D14: [%x]


tool: D160: ns

tool: D252: [%x:%x]


tool: D49: OK

assistant: ```c
void break_test() {
  unsigned x;
  char *s;
  printf("break_test\n");
  printf("Passed line %i\n", 362);
  {
    unsigned x = getreg(((0x9c000000) + 5));
    if ((x & ((0x10) | (0x08) | (0x04) | (0x02))) && !(x & (0x80)))
      printf("LSR7 (0x%02x) ERR @ %i\n", x, 364);
    ((!(x & (0x80)) && ((x & 0x60) != 0x40)) ? 1 : fail("?", 364));
  };
  printf("Passed line %i\n", 365);
  setreg(((0x9c000000) + 3), 0x03 | (0x40));
  printf("Passed line %i\n", 367);
  send_char('b');
  printf("Passed line %i\n", 369);
  recv_char('*');
  setreg(((0x9c000000) + 3), 0x03);
  printf("Passed line %i\n", 372);
  send_char('!');
  printf("Passed line %i\n", 376);
  while (!((x = getreg(((0x9c000000) + 5))) & (0x01)))
    ;
  printf("[%x]\n", ((0x01) | (0x10) | (0x80) | (0x20) | (0x40)));
  ((x == ((0x01) | (0x10) | (0x80) | (0x20) | (0x40))) ? 1 : fail("?", 380));
  ((getreg(((0x9c000000) + 0)) == 0) ? 1 : fail("?", 381));
  printf("Passed line %i\n", 382);
  setreg(((0x9c000000) + 0), '#');
  while (!(getreg(((0x9c000000) + 5)) & (0x01)))
    ;
  {
    unsigned x = getreg(((0x9c000000) + 5));
    if ((x & ((0x10) | (0x08) | (0x04) | (0x02))) && !(x & (0x80)))
      printf("LSR7 (0x%02x) ERR @ %i\n", x, 387);
    ((!(x & (0x80)) && ((x & 0x60) != 0x40)) ? 1 : fail("?", 387));
  };
  ((getreg(((0x9c000000) + 0)) == '$') ? 1 : fail("?", 388));
  printf("Passed line %i\n", 389);
  s = "ns";
  while (*s)
    send_char(*s++);
  ((!(getreg(((0x9c000000) + 5)) & (0x01))) ? 1 : fail("?", 394));
  while (!(getreg(((0x9c000000) + 5)) & (0x40)))
    ;
  setreg(((0x9c000000) + 0), '*');
  setreg(((0x9c000000) + 3), 0x3 | (0x40));
  printf("Passed line %i\n", 399);
  recv_char('?');
  setreg(((0x9c000000) + 3), 0x3);
  {
    unsigned x = getreg(((0x9c000000) + 5));
    if ((x & ((0x10) | (0x08) | (0x04) | (0x02))) && !(x & (0x80)))
      printf("LSR7 (0x%02x) ERR @ %i\n", x, 404);
    ((!(x & (0x80)) && ((x & 0x60) != 0x40)) ? 1 : fail("?", 404));
  };
  printf("Passed line %i\n", 405);
  send_char('#');
  while (!((x = getreg(((0x9c000000) + 5))) & (0x01)))
    ;
  printf("[%x:%x]\n", x, ((0x01) | (0x10) | (0x80) | (0x20) | (0x40)));
  ((x == ((0x01) | (0x10) | (0x80) | (0x20) | (0x40))) ? 1 : fail("?", 413));
  ((getreg(((0x9c000000) + 0)) == 0) ? 1 : fail("?", 414));
  printf("Passed line %i\n", 415);
  send_char('?');
  printf("Passed line %i\n", 417);
  while (!(getreg(((0x9c000000) + 5)) & (0x01)))
    ;
  recv_char('!');
  printf("OK\n");
}
```