user: 下面的汇编指令对应的C源代码是什么:

```asm
<updater_addelta>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %rdx,0x8(%rsp)
  lea    0x8(%rsp),%rbp
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <proto_get_ascii@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <proto_get_ascii@plt>
  mov    %rbp,%rdi
  mov    %rax,%r15
  call   <proto_get_ascii@plt>
  mov    %rbp,%rdi
  mov    %rax,%r13
  call   <proto_get_ascii@plt>
  test   %r12,%r12
  movq   $0x0,0x18(%rsp)
  mov    %rax,%rcx
  sete   %al
  test   %r13,%r13
  sete   %dl
  or     %dl,%al
  jne    L389
  test   %rcx,%rcx
  je     L389
  mov    %r15,%r8
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <rcsfile_addelta@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L97
  lea    D39(%rip),%r13
  lea    D22(%rip),%r14
  nop
L80:
  mov    %rbx,%rdi
  xor    %esi,%esi
  call   <stream_getln@plt>
  mov    %rax,0x20(%rsp)
  mov    %rax,%rdi
  test   %rax,%rax
  je     L375
  lea    D38(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L375
  lea    0x20(%rsp),%r12
  mov    %r12,%rdi
  call   <proto_get_ascii@plt>
  movzbl (%rax),%eax
  cmp    $0x53,%al
  je     L178
  cmp    $0x54,%al
  je     L283
  cmp    $0x4c,%al
  jne    L80
  lea    0x18(%rsp),%r12
  jmp    L224
  nopl   0x0(%rax,%rax,1)
L338:
  cmp    $0x3,%rdx
  je     L268
L104:
  cmp    $0x2,%rdx
  jbe    L362
  mov    $0x2,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  je     L71
  mov    0x18(%rsp),%rdx
L362:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <rcsdelta_appendlog@plt>
  test   %eax,%eax
  js     L389
L224:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <stream_getln@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L80
  mov    0x18(%rsp),%rdx
  cmp    $0x2,%rdx
  jne    L338
  cmpb   $0x2e,(%rax)
  je     L80
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <rcsdelta_appendlog@plt>
  test   %eax,%eax
  jns    L224
  cs nopw 0x0(%rax,%rax,1)
L389:
  mov    $0xffffffff,%eax
L294:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L339
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L268:
  mov    $0x2,%edx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  je     L91
  mov    0x18(%rsp),%rdx
  jmp    L104
  nopw   0x0(%rax,%rax,1)
L71:
  mov    0x18(%rsp),%rax
  add    $0x1,%r15
  lea    -0x1(%rax),%rdx
  mov    %rdx,0x18(%rsp)
  jmp    L362
  nop
L283:
  lea    0x18(%rsp),%r12
  jmp    L218
  nopw   0x0(%rax,%rax,1)
L253:
  cmp    $0x3,%rdx
  je     L131
L380:
  cmp    $0x2,%rdx
  jbe    L68
  mov    $0x2,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  je     L24
  mov    0x18(%rsp),%rdx
  nopl   (%rax)
L68:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <rcsdelta_appendtext@plt>
  test   %eax,%eax
  js     L389
L218:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <stream_getln@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L80
  mov    0x18(%rsp),%rdx
  cmp    $0x2,%rdx
  jne    L253
  cmpb   $0x2e,(%rax)
  jne    L68
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L131:
  mov    $0x2,%edx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  je     L169
  mov    0x18(%rsp),%rdx
  jmp    L380
  xchg   %ax,%ax
L24:
  mov    0x18(%rsp),%rax
  add    $0x1,%r15
  lea    -0x1(%rax),%rdx
  mov    %rdx,0x18(%rsp)
  jmp    L68
  nopl   0x0(%rax)
L178:
  mov    %r12,%rdi
  call   <proto_get_ascii@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L389
  mov    %rbp,%rdi
  call   <rcsdelta_setstate@plt>
  jmp    L80
  nopl   0x0(%rax)
L375:
  xor    %eax,%eax
  jmp    L294
L91:
  mov    $0xffffffff,%esi
  mov    %rbp,%rdi
  call   <rcsdelta_truncatelog@plt>
  jmp    L80
L169:
  mov    $0xffffffff,%esi
  mov    %rbp,%rdi
  call   <rcsdelta_truncatetext@plt>
  jmp    L80
L97:
  mov    %r12,%rdx
  lea    D0(%rip),%rsi
  mov    $0xffffffff,%edi
  call   <lprintf@plt>
  mov    $0xfffffffd,%eax
  jmp    L294
L339:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D39
type: string
name: read_data
arguments: tag: D22
type: string
name: read_data
arguments: tag: D38
type: string
name: read_data
arguments: tag: D0
type: string

tool: D39: ..

tool: D22: .+

tool: D38: .

tool: D0: Error adding delta %s


assistant: ```c
int updater_addelta(struct rcsfile *rf, struct stream *rd, char *cmdline) {
  struct delta *d;
  size_t size;
  char *author, *cmd, *diffbase, *line, *logline;
  char *revdate, *revnum, *state, *textline;
  revnum = proto_get_ascii(&cmdline);
  diffbase = proto_get_ascii(&cmdline);
  revdate = proto_get_ascii(&cmdline);
  author = proto_get_ascii(&cmdline);
  size = 0;
  if (revnum == NULL || revdate == NULL || author == NULL)
    return ((-1));
  d = rcsfile_addelta(rf, revnum, revdate, author, diffbase);
  if (d == NULL) {
    lprintf(-1, "Error adding delta %s\n", revnum);
    return ((-3));
  }
  while ((line = stream_getln(rd, NULL)) != NULL) {
    if (strcmp(line, ".") == 0)
      break;
    cmd = proto_get_ascii(&line);
    switch (cmd[0]) {
    case 'L':
      logline = stream_getln(rd, &size);
      while (logline != NULL) {
        if (size == 2 && *logline == '.')
          break;
        if (size == 3 && memcmp(logline, ".+", 2) == 0) {
          rcsdelta_truncatelog(d, -1);
          break;
        }
        if (size >= 3 && memcmp(logline, "..", 2) == 0) {
          size--;
          logline++;
        }
        if (rcsdelta_appendlog(d, logline, size) < 0)
          return (-1);
        logline = stream_getln(rd, &size);
      }
      break;
    case 'N':
    case 'n':
      break;
    case 'S':
      state = proto_get_ascii(&line);
      if (state == NULL)
        return ((-1));
      rcsdelta_setstate(d, state);
      break;
    case 'T':
      textline = stream_getln(rd, &size);
      while (textline != NULL) {
        if (size == 2 && *textline == '.')
          break;
        if (size == 3 && memcmp(textline, ".+", 2) == 0) {
          rcsdelta_truncatetext(d, -1);
          break;
        }
        if (size >= 3 && memcmp(textline, "..", 2) == 0) {
          size--;
          textline++;
        }
        if (rcsdelta_appendtext(d, textline, size) < 0)
          return (-1);
        textline = stream_getln(rd, &size);
      }
      break;
    }
  }
  return (0);
}
```