user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r15
  lea    D45(%rip),%rsi
  mov    $0x1,%edi
  lea    D16(%rip),%r15
  push   %r14
  lea    D35(%rip),%r14
  push   %r13
  lea    D6(%rip),%r13
  push   %r12
  lea    D54(%rip),%r12
  push   %rbp
  lea    D5(%rip),%rbp
  push   %rbx
  sub    $0x418,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  call   <ece391_fdputs@plt>
  nop
L16:
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <ece391_fdputs@plt>
  xor    %edi,%edi
  mov    $0x3ff,%edx
  mov    %rbx,%rsi
  call   <ece391_read@plt>
  cmp    $0xffffffff,%eax
  je     L44
  test   %eax,%eax
  jle    L93
  lea    -0x1(%rax),%edx
  movslq %edx,%rcx
  cmpb   $0xa,(%rsp,%rcx,1)
  cmove  %edx,%eax
L93:
  cltq
  mov    %r12,%rsi
  mov    %rbx,%rdi
  movb   $0x0,(%rsp,%rax,1)
  call   <ece391_strcmp@plt>
  test   %rax,%rax
  je     L70
  cmpb   $0x0,(%rsp)
  je     L16
  mov    %rbx,%rdi
  call   <ece391_execute@plt>
  cmp    $0xffffffff,%eax
  je     L99
  cmp    $0x100,%eax
  je     L41
  test   %eax,%eax
  je     L16
  mov    %r13,%rsi
  mov    $0x1,%edi
  call   <ece391_fdputs@plt>
  jmp    L16
  nopl   (%rax)
L99:
  mov    %r14,%rsi
  mov    $0x1,%edi
  call   <ece391_fdputs@plt>
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L41:
  mov    %r15,%rsi
  mov    $0x1,%edi
  call   <ece391_fdputs@plt>
  jmp    L16
L44:
  lea    D32(%rip),%rsi
  mov    $0x1,%edi
  call   <ece391_fdputs@plt>
  mov    $0x3,%eax
L96:
  mov    0x408(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L76
  add    $0x418,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L70:
  xor    %eax,%eax
  jmp    L96
L76:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D45
type_guessed: string
name: parse_data
arguments: data_tag: D16
type_guessed: string
name: parse_data
arguments: data_tag: D35
type_guessed: string
name: parse_data
arguments: data_tag: D6
type_guessed: string
name: parse_data
arguments: data_tag: D54
type_guessed: string
name: parse_data
arguments: data_tag: D5
type_guessed: string
name: parse_data
arguments: data_tag: D32
type_guessed: string

tool: D45: Starting 391 Shell


tool: D16: program terminated by exception


tool: D35: no such command


tool: D6: program terminated abnormally


tool: D54: exit

tool: D5: 391OS> 

tool: D32: read from keyboard failed


assistant: ```c
int main() {
  int32_t cnt, rval;
  uint8_t buf[1024];
  ece391_fdputs(1, (uint8_t *)"Starting 391 Shell\n");
  while (1) {
    ece391_fdputs(1, (uint8_t *)"391OS> ");
    if (-1 == (cnt = ece391_read(0, buf, 1024 - 1))) {
      ece391_fdputs(1, (uint8_t *)"read from keyboard failed\n");
      return 3;
    }
    if (cnt > 0 && '\n' == buf[cnt - 1])
      cnt--;
    buf[cnt] = '\0';
    if (0 == ece391_strcmp(buf, (uint8_t *)"exit"))
      return 0;
    if ('\0' == buf[0])
      continue;
    rval = ece391_execute(buf);
    if (-1 == rval)
      ece391_fdputs(1, (uint8_t *)"no such command\n");
    else if (256 == rval)
      ece391_fdputs(1, (uint8_t *)"program terminated by exception\n");
    else if (0 != rval)
      ece391_fdputs(1, (uint8_t *)"program terminated abnormally\n");
  }
}
```