user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<lned_run>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  xor    %esi,%esi
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x78,%rsp
  mov    %rdx,0x8(%rsp)
  lea    0x20(%rsp),%r14
  mov    $0x40,%edx
  mov    %r14,%rdi
  mov    %r14,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movq   $0xffffffffffffffff,0x18(%rsp)
  call   <memset@plt>
L103:
  mov    %r15,%rsi
  mov    %ebx,%edi
  call   <tcgetattr@plt>
  test   %eax,%eax
  jns    L118
  cmp    $0x1,%ebx
  jle    L108
L118:
  add    $0x1,%ebx
  add    $0x10,%r15
  cmp    $0x3,%ebx
  jne    L103
  mov    D40(%rip),%rax
  xor    %edx,%edx
  lea    0x18(%rsp),%rcx
  mov    (%rax),%esi
  mov    D61(%rip),%rax
  mov    (%rax),%edi
  call   <socketpair@plt>
  test   %eax,%eax
  js     L108
  mov    D70(%rip),%rdx
  mov    D16(%rip),%rax
  xor    %edi,%edi
  movdqa 0x20(%rsp),%xmm0
  mov    D14(%rip),%rbx
  mov    (%rax),%eax
  or     (%rdx),%eax
  mov    D23(%rip),%rdx
  movaps %xmm0,0x50(%rsp)
  not    %eax
  and    %eax,0x50(%rsp)
  mov    0x58(%rsp),%rax
  mov    (%rdx),%rdx
  movl   $0x1,(%rax,%rdx,4)
  mov    D75(%rip),%rdx
  mov    (%rdx),%rdx
  movl   $0x0,(%rax,%rdx,4)
  mov    (%rbx),%esi
  lea    0x50(%rsp),%rdx
  call   <tcsetattr@plt>
  test   %eax,%eax
  js     L108
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L52
  mov    0x1c(%rsp),%edi
  lea    0x60(%rsp),%rbp
  call   <close@plt>
  mov    $0x2,%esi
  mov    $0x1,%edi
  call   <dup2@plt>
  mov    0x8(%rsp),%rsi
  mov    0x18(%rsp),%edi
  call   <shuttle@plt>
  mov    D15(%rip),%rax
  mov    0x18(%rsp),%edi
  mov    (%rax),%esi
  call   <shutdown@plt>
  jmp    L72
  nopl   0x0(%rax)
L46:
  mov    $0x1,%edx
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <write@plt>
L72:
  mov    0x18(%rsp),%edi
  mov    $0x1,%edx
  mov    %rbp,%rsi
  call   <read@plt>
  cmp    $0x1,%eax
  je     L46
  lea    0x14(%rsp),%rdi
  call   <wait@plt>
  mov    (%rbx),%esi
  mov    %r14,%rdx
  xor    %edi,%edi
  call   <tcsetattr@plt>
  mov    0x14(%rsp),%eax
  jmp    L41
  nopl   0x0(%rax)
L52:
  mov    0x1c(%rsp),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    0x1c(%rsp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    $0x2,%edi
  call   <isatty@plt>
  test   %rax,%rax
  jne    L3
L40:
  mov    0x18(%rsp),%edi
  call   <close@plt>
  mov    0x1c(%rsp),%edi
  call   <close@plt>
  nopw   0x0(%rax,%rax,1)
L108:
  mov    %r13,%rsi
  mov    %r12d,%edi
  call   *%rbp
L41:
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L30
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L3:
  mov    0x1c(%rsp),%edi
  mov    $0x2,%esi
  call   <dup2@plt>
  jmp    L40
L30:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int lned_run(int argc, char **argv, const char *prompt, int (*worker)(int, char **)) {
  struct termios tc[4];
  struct termios *t;
  char cb[8];
  int sp[2] = {-1, -1};
  int i;
  int res;
  int st;
  pid_t pid;
  memset(tc, 0, sizeof(tc));
  for (i = 0; i < 3; i++) {
    res = tcgetattr(i, &(tc[i]));
    if (res < 0 && i < 2)
      goto Direct;
  }
  res = socketpair(AF_UNIX, SOCK_STREAM, 0, sp);
  if (res < 0)
    goto Direct;
  t = &(tc[3]);
  *t = tc[0];
  t->c_lflag &= ~(ECHO | ICANON);
  t->c_cc[VMIN] = 1;
  t->c_cc[VTIME] = 0;
  res = tcsetattr(0, TCSANOW, t);
  if (res < 0)
    goto Direct;
  pid = fork();
  if (pid == 0) {
    dup2(sp[1], 0);
    dup2(sp[1], 1);
    if (isatty(2))
      dup2(sp[1], 2);
    close(sp[0]);
    close(sp[1]);
    goto Direct;
  }
  close(sp[1]);
  dup2(1, 2);
  shuttle(sp[0], prompt);
  shutdown(sp[0], SHUT_WR);
  while (read(sp[0], cb, 1) == 1)
    write(1, cb, 1);
  wait(&st);
  tcsetattr(0, TCSANOW, &(tc[0]));
  return (st);
Direct:
  return (worker(argc, argv));
}
```