user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<csc_memdump_line>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0xa8,%rsp
  mov    %rdi,0x28(%rsp)
  lea    0x30(%rsp),%r15
  mov    %edx,%edi
  mov    %esi,0x24(%rsp)
  mov    %edx,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  call   <csc_memdump_find_step@plt>
  lea    D189(%rip),%rsi
  mov    %r15,%rdi
  mov    %eax,0xc(%rsp)
  call   <strcpy@plt>
  and    $0x10000,%r14d
  jne    L350
L137:
  mov    0x1c(%rsp),%ecx
  mov    %ecx,%edx
  mov    %ecx,%esi
  mov    %ecx,%eax
  and    $0xf0,%ecx
  and    $0xf,%esi
  sar    $0x8,%edx
  mov    %ecx,0x18(%rsp)
  and    $0x4000,%eax
  mov    %esi,0x8(%rsp)
  and    $0xf,%edx
  je     L311
  lea    0x50(%rsp),%r14
  test   %eax,%eax
  jne    L327
L447:
  lea    D180(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
L158:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  cmpl   $0x3,0x8(%rsp)
  je     L76
  mov    0x18(%rsp),%eax
  cmp    $0x20,%eax
  je     L574
  jle    L483
  cmp    $0x30,%eax
  je     L183
  cmp    $0x40,%eax
  jne    L26
L205:
  lea    D95(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
L194:
  testl  $0x8000,0x1c(%rsp)
  je     L543
L414:
  movl   $0x0,0x4(%rsp)
  testl  $0x2000,0x1c(%rsp)
  je     L643
L464:
  movslq 0xc(%rsp),%rax
  mov    0x24(%rsp),%ebp
  cmp    %ebp,%eax
  jg     L361
  mov    0x1c(%rsp),%esi
  mov    0x28(%rsp),%r12
  mov    %ebx,0x10(%rsp)
  and    $0x20000,%esi
  mov    %r12,%rbx
  mov    %r15,%r12
  mov    %r14,%r15
  mov    %esi,0x14(%rsp)
  mov    %rax,%r14
  nopl   0x0(%rax)
L563:
  mov    0x8(%rsp),%eax
  cmp    $0x5,%eax
  ja     L462
  lea    D146(%rip),%rdi
  movslq (%rdi,%rax,4),%rax
  add    %rdi,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L311:
  test   %eax,%eax
  jne    L271
  testb  $0xe0,0x1c(%rsp)
  je     L420
  cmpl   $0x40,0x18(%rsp)
  je     L240
L271:
  lea    0x50(%rsp),%r14
  lea    D15(%rip),%rsi
  mov    %r14,%rdi
  call   <strcpy@plt>
  jmp    L158
  nopl   0x0(%rax,%rax,1)
L462:
  movzbl (%rbx),%edx
  mov    %r12,%rsi
  mov    %r15,%rdi
L486:
  call   <sprintf@plt>
  mov    %eax,%edx
L589:
  test   %r13,%r13
  je     L532
  cmp    0x10(%rsp),%edx
  jg     L532
  mov    %r13,%rdi
  mov    %r15,%rsi
  mov    %edx,0x20(%rsp)
  call   <strcpy@plt>
  movslq 0x20(%rsp),%rax
  sub    %eax,0x10(%rsp)
  mov    %rax,%rdx
  add    %rax,%r13
L532:
  mov    0x14(%rsp),%esi
  mov    %rbx,%rax
  lea    (%rbx,%r14,1),%rcx
  add    %edx,0x4(%rsp)
  sub    %r14,%rax
  test   %esi,%esi
  cmove  %rcx,%rax
  mov    %rax,%rbx
  mov    0xc(%rsp),%eax
  sub    %eax,%ebp
  cmp    %ebp,%eax
  jle    L563
  mov    0x10(%rsp),%ebx
L361:
  testl  $0x1000,0x1c(%rsp)
  jne    L576
  test   %r13,%r13
  je     L355
  test   %ebx,%ebx
  jle    L355
  mov    %r13,%rdi
  lea    D60(%rip),%rsi
  sub    $0x1,%ebx
  add    $0x1,%r13
  call   <strcpy@plt>
  mov    0x24(%rsp),%edx
  test   %ebx,%ebx
  setg   %al
  addl   $0x1,0x4(%rsp)
  test   %edx,%edx
  je     L188
L56:
  mov    0x24(%rsp),%edx
  mov    0x28(%rsp),%rsi
  mov    $0x2e,%edi
  testl  $0x20000,0x1c(%rsp)
  jne    L113
  nopl   0x0(%rax)
L23:
  test   %ebx,%ebx
  setg   %al
  test   %r13,%r13
  setne  %cl
  and    %cl,%al
  je     L606
  movzbl (%rsi),%eax
  lea    0x1(%r13),%rcx
  lea    -0x20(%rax),%r8d
  cmp    $0x5f,%r8b
  cmovae %edi,%eax
  sub    $0x1,%ebx
  test   %ebx,%ebx
  mov    %al,0x0(%r13)
  setg   %al
  mov    %rcx,%r13
  add    $0x1,%rsi
  sub    $0x1,%edx
  jne    L23
  nopl   (%rax)
L525:
  mov    0x4(%rsp),%esi
  mov    0x24(%rsp),%ecx
  add    %ecx,%esi
  mov    %esi,0x4(%rsp)
L188:
  test   %al,%al
  je     L576
  movb   $0x0,0x0(%r13)
L576:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L400
  mov    0x4(%rsp),%eax
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
  cvttss2si (%rbx),%edx
L224:
  movzbl %dl,%edx
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    %eax,%edx
  jmp    L589
  nopl   0x0(%rax)
  cvttsd2si (%rbx),%edx
  jmp    L224
  xchg   %ax,%ax
  movzwl (%rbx),%edx
  mov    %r12,%rsi
  mov    %r15,%rdi
  movzbl %dl,%edx
  jmp    L486
  nopl   0x0(%rax)
L327:
  lea    D133(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  jmp    L158
  nopl   0x0(%rax)
L113:
  test   %r13,%r13
  setne  %al
  test   %ebx,%ebx
  setg   %cl
  and    %cl,%al
  je     L169
L283:
  movzbl (%rsi),%eax
  lea    0x1(%r13),%rcx
  lea    -0x20(%rax),%r8d
  cmp    $0x5f,%r8b
  cmovae %edi,%eax
  sub    $0x1,%ebx
  test   %ebx,%ebx
  mov    %al,0x0(%r13)
  setg   %al
  mov    %rcx,%r13
  sub    $0x1,%rsi
  sub    $0x1,%edx
  je     L525
  test   %r13,%r13
  setne  %al
  test   %ebx,%ebx
  setg   %cl
  and    %cl,%al
  jne    L283
L169:
  sub    $0x1,%edx
  je     L525
L209:
  test   %ebx,%ebx
  setg   %al
  test   %r13,%r13
  setne  %cl
  and    %ecx,%eax
  sub    $0x1,%edx
  jne    L209
  jmp    L525
  nopl   0x0(%rax)
L606:
  sub    $0x1,%edx
  je     L525
L570:
  test   %ebx,%ebx
  setg   %al
  test   %r13,%r13
  setne  %cl
  and    %ecx,%eax
  sub    $0x1,%edx
  jne    L570
  jmp    L525
L483:
  cmp    $0x10,%eax
  jne    L26
L90:
  lea    D36(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  testl  $0x8000,0x1c(%rsp)
  jne    L414
  cs nopw 0x0(%rax,%rax,1)
L543:
  lea    D60(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L414
  nopl   0x0(%rax)
L355:
  mov    0x24(%rsp),%eax
  addl   $0x1,0x4(%rsp)
  test   %eax,%eax
  jne    L56
  jmp    L576
  xchg   %ax,%ax
L643:
  movzbl 0x28(%rsp),%edx
  lea    D167(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    %eax,0x4(%rsp)
  mov    %eax,%ebp
  test   %r13,%r13
  je     L464
  cmp    %eax,%ebx
  jle    L464
  mov    %r13,%rdi
  mov    %r14,%rsi
  sub    %ebp,%ebx
  call   <strcpy@plt>
  movslq %ebp,%rax
  add    %rax,%r13
  jmp    L464
  nopl   0x0(%rax,%rax,1)
L350:
  lea    D91(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L137
  nopl   0x0(%rax)
L183:
  lea    D97(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L194
  nopl   0x0(%rax)
L76:
  lea    D165(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  mov    0x18(%rsp),%eax
  cmp    $0x30,%eax
  je     L183
  jg     L249
  cmp    $0x10,%eax
  je     L90
  cmp    $0x20,%eax
  jne    L358
L574:
  lea    D63(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L194
L240:
  movzbl 0xc(%rsp),%eax
  lea    0x50(%rsp),%r14
  lea    D180(%rip),%rsi
  mov    %r14,%rdi
  lea    (%rax,%rax,2),%edx
  movzbl %dl,%edx
  call   <sprintf@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  cmpl   $0x3,0x8(%rsp)
  jne    L205
  lea    D165(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L205
  nopl   (%rax)
L249:
  cmpl   $0x40,0x18(%rsp)
  je     L205
L358:
  lea    D121(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L194
  nop
L26:
  cmpl   $0x4,0x8(%rsp)
  je     L315
  cmpl   $0x5,0x8(%rsp)
  jne    L358
  lea    D176(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L194
  nopw   0x0(%rax,%rax,1)
L420:
  movzbl 0xc(%rsp),%eax
  lea    0x50(%rsp),%r14
  lea    (%rax,%rax,1),%edx
  movzbl %dl,%edx
  jmp    L447
L315:
  lea    D161(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L194
L400:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D189
data_type: string
name: read_data
arguments: data_tag: D180
data_type: string
name: read_data
arguments: data_tag: D95
data_type: string
name: read_data
arguments: data_tag: D15
data_type: string
name: read_data
arguments: data_tag: D60
data_type: string
name: read_data
arguments: data_tag: D133
data_type: string
name: read_data
arguments: data_tag: D36
data_type: string
name: read_data
arguments: data_tag: D167
data_type: string
name: read_data
arguments: data_tag: D91
data_type: string
name: read_data
arguments: data_tag: D97
data_type: string
name: read_data
arguments: data_tag: D165
data_type: string
name: read_data
arguments: data_tag: D63
data_type: string
name: read_data
arguments: data_tag: D121
data_type: string
name: read_data
arguments: data_tag: D176
data_type: string
name: read_data
arguments: data_tag: D161
data_type: string

tool: D189: %

tool: D180: 0%d

tool: D95: o

tool: 

tool: D60:  

tool: D133: %d

tool: D36: x

tool: D167: %lX: 

tool: D91: -

tool: D97: d

tool: D165: ll

tool: D63: u

tool: D121: X

tool: D176: e

tool: D161: f

assistant: ```c
int csc_memdump_line(void *mem, int msize, int flags, char *buf, int blen) {
  char *mp, format[32], tmp[64];
  int n, sp, step, amnt;
  step = csc_memdump_find_step(flags);
  strcpy(format, "%");
  if (flags & 0x10000) {
    strcat(format, "-");
  }
  n = (flags & 0xf00) >> 8;
  if (n > 0) {
    if (flags & 0x4000) {
      sprintf(tmp, "%d", n);
    } else {
      sprintf(tmp, "0%d", n);
    }
  } else if (flags & 0x4000) {
    strcpy(tmp, "");
  } else if (((((flags)&0xf0) == 0x10) || (((flags)&0xf0) == 0))) {
    sprintf(tmp, "0%d", step * 2);
  } else if ((flags & 0xf0) == 0x40) {
    sprintf(tmp, "0%d", step * 3);
  } else {
    strcpy(tmp, "");
  }
  strcat(format, tmp);
  if ((flags & 0xf) == 3) {
    strcat(format, "ll");
  }
  switch (flags & 0xf0) {
  case 0x10:
    strcat(format, "x");
    break;
  case 0x20:
    strcat(format, "u");
    break;
  case 0x30:
    strcat(format, "d");
    break;
  case 0x40:
    strcat(format, "o");
    break;
  default:
    if ((flags & 0xf) == 4) {
      strcat(format, "f");
      break;
    }
    if ((flags & 0xf) == 5) {
      strcat(format, "e");
      break;
    }
    strcat(format, "X");
    break;
  }
  if ((flags & 0x8000) == 0) {
    strcat(format, " ");
  }
  amnt = 0;
  if ((flags & 0x2000) == 0) {
    n = sprintf(tmp, "%lX: ", (unsigned long)mem);
    if (buf && (blen > n)) {
      strcpy(buf, tmp);
      buf += n;
      blen -= n;
    }
    amnt += n;
  }
  mp = mem;
  sp = msize;
  while (sp >= step) {
    switch (flags & 0xf) {
    case 1:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((short *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned short *)mp));
      }
      break;
    case 2:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((int *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned *)mp));
      }
      break;
    case 3:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((long long *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned long long *)mp));
      }
      break;
    case 4:
      n = sprintf(tmp, format, *((float *)mp));
      break;
    case 5:
      n = sprintf(tmp, format, *((double *)mp));
      break;
    default:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *mp);
      } else {
        n = sprintf(tmp, format, *((unsigned char *)mp));
      }
      break;
    }
    if (buf && blen >= n) {
      strcpy(buf, tmp);
      buf += n;
      blen -= n;
    }
    amnt += n;
    if (flags & 0x20000) {
      mp -= step;
    } else {
      mp += step;
    }
    sp -= step;
  }
  if (flags & 0x1000) {
    return amnt;
  }
  if (buf && blen > 0) {
    strcpy(buf, " ");
    buf++;
    blen--;
  }
  amnt++;
  mp = mem;
  sp = msize;
  while (sp) {
    if (buf && blen > 0) {
      if ((*mp < ' ') || (*mp > 0x7e)) {
        *buf++ = '.';
      } else {
        *buf++ = *mp;
      }
      blen--;
    }
    if (flags & 0x20000) {
      mp--;
    } else {
      mp++;
    }
    sp--;
    amnt++;
  }
  if (buf && blen > 0) {
    *buf++ = 0;
  }
  return amnt;
}
```