user: Demonstrate the C code that generates the assembly output below:

```asm
<ta>:
  endbr64
  push   %r14
  lea    D63(%rip),%rdi
  push   %r13
  push   %r12
  lea    D54(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x810,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  call   <printf@plt>
  xor    %edx,%edx
  mov    $0xe100,%esi
  lea    D146(%rip),%rdi
  call   <serOpen@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x1,%esi
  mov    %eax,%ebp
  lea    D77(%rip),%r9
  mov    %eax,%edx
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    $0x800,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <serRead@plt>
  mov    %ebp,%edi
  call   <serDataAvailable@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x2,%esi
  lea    D5(%rip),%r9
  mov    %eax,%edx
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  mov    %eax,%edx
  call   <serWrite@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x3,%esi
  mov    %eax,%edx
  lea    D130(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    $0xaa,%esi
  mov    %ebp,%edi
  call   <serWriteByte@plt>
  mov    $0x55,%esi
  mov    %ebp,%edi
  call   <serWriteByte@plt>
  xor    %esi,%esi
  mov    %ebp,%edi
  call   <serWriteByte@plt>
  mov    $0xff,%esi
  mov    %ebp,%edi
  call   <serWriteByte@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x4,%esi
  mov    %eax,%edx
  lea    D131(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  movsd  D69(%rip),%xmm0
  call   <time_sleep@plt>
  mov    %ebp,%edi
  call   <serDataAvailable@plt>
  mov    %r12,%rdi
  mov    %eax,%r14d
  call   <strlen@plt>
  xor    %r8d,%r8d
  mov    %r14d,%edx
  mov    $0x5,%esi
  lea    0x4(%rax),%ecx
  lea    D5(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r13,%rsi
  mov    %ebp,%edi
  mov    %eax,%edx
  call   <serRead@plt>
  mov    %r12,%rdi
  movslq %eax,%rbx
  call   <strlen@plt>
  xor    %r8d,%r8d
  mov    %ebx,%edx
  mov    $0x6,%esi
  mov    %eax,%ecx
  lea    D144(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  test   %ebx,%ebx
  js     L13
  movb   $0x0,(%rsp,%rbx,1)
L13:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0x7,%esi
  mov    %eax,%edx
  lea    D144(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serReadByte@plt>
  xor    %r8d,%r8d
  mov    $0xaa,%ecx
  lea    D11(%rip),%r9
  mov    %eax,%edx
  mov    $0x8,%esi
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serReadByte@plt>
  xor    %r8d,%r8d
  mov    $0x55,%ecx
  lea    D11(%rip),%r9
  mov    %eax,%edx
  mov    $0x9,%esi
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serReadByte@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0xa,%esi
  mov    %eax,%edx
  lea    D11(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serReadByte@plt>
  xor    %r8d,%r8d
  mov    $0xff,%ecx
  lea    D11(%rip),%r9
  mov    %eax,%edx
  mov    $0xb,%esi
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serDataAvailable@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0xc,%esi
  mov    %eax,%edx
  lea    D1(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    %ebp,%edi
  call   <serClose@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  mov    $0xd,%esi
  mov    %eax,%edx
  lea    D117(%rip),%r9
  mov    $0xa,%edi
  call   <CHECK@plt>
  mov    0x808(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x810,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D63
data_type: string
name: extract_symbolic_data
arguments: data_tag: D54
data_type: string
name: extract_symbolic_data
arguments: data_tag: D146
data_type: string
name: extract_symbolic_data
arguments: data_tag: D77
data_type: string
name: extract_symbolic_data
arguments: data_tag: D5
data_type: string
name: extract_symbolic_data
arguments: data_tag: D130
data_type: string
name: extract_symbolic_data
arguments: data_tag: D131
data_type: string
name: extract_symbolic_data
arguments: data_tag: D69
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D144
data_type: string
name: extract_symbolic_data
arguments: data_tag: D11
data_type: string
name: extract_symbolic_data
arguments: data_tag: D1
data_type: string
name: extract_symbolic_data
arguments: data_tag: D117
data_type: string

tool: D63: Serial link tests.


tool: D54: To be, or not to be, that is the question-Whether 'tis Nobler in the mind to sufferThe Slings and Arrows of outrageous Fortune,Or to take Arms against a Sea of troubles,

tool: D146: /dev/ttyAMA0

tool: D77: serial open

tool: D5: serial data available

tool: D130: serial write

tool: D131: serial write byte

tool: D69: 0.1

tool: D144: serial read

tool: D11: serial read byte

tool: D1: serial data availabe

tool: D117: serial close

assistant: ```c
void ta() {
  int h, b, e;
  char *TEXT;
  char text[2048];
  printf("Serial link tests.\n");
  h = serOpen("/dev/ttyAMA0", 57600, 0);
  CHECK(10, 1, h, 0, 0, "serial open");
  b = serRead(h, text, sizeof(text));
  b = serDataAvailable(h);
  CHECK(10, 2, b, 0, 0, "serial data available");
  TEXT = "To be, or not to be, that is the question-Whether 'tis Nobler in the mind to sufferThe Slings and Arrows of outrageous Fortune,Or to take Arms against a Sea of troubles,";
  e = serWrite(h, TEXT, strlen(TEXT));
  CHECK(10, 3, e, 0, 0, "serial write");
  e = serWriteByte(h, 0xAA);
  e = serWriteByte(h, 0x55);
  e = serWriteByte(h, 0x00);
  e = serWriteByte(h, 0xFF);
  CHECK(10, 4, e, 0, 0, "serial write byte");
  time_sleep(0.1);
  b = serDataAvailable(h);
  CHECK(10, 5, b, strlen(TEXT) + 4, 0, "serial data available");
  b = serRead(h, text, strlen(TEXT));
  CHECK(10, 6, b, strlen(TEXT), 0, "serial read");
  if (b >= 0)
    text[b] = 0;
  CHECK(10, 7, strcmp(TEXT, text), 0, 0, "serial read");
  b = serReadByte(h);
  CHECK(10, 8, b, 0xAA, 0, "serial read byte");
  b = serReadByte(h);
  CHECK(10, 9, b, 0x55, 0, "serial read byte");
  b = serReadByte(h);
  CHECK(10, 10, b, 0x00, 0, "serial read byte");
  b = serReadByte(h);
  CHECK(10, 11, b, 0xFF, 0, "serial read byte");
  b = serDataAvailable(h);
  CHECK(10, 12, b, 0, 0, "serial data availabe");
  e = serClose(h);
  CHECK(10, 13, e, 0, 0, "serial close");
}
```