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

```asm
<rose_dump>:
  endbr64
  push   %r15
  lea    D93(%rip),%r15
  push   %r14
  lea    D184(%rip),%r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  lea    D239(%rip),%rbx
  sub    $0x18,%rsp
L283:
  movzbl 0x0(%rbp),%edx
  movzbl 0x1(%rbp),%eax
  mov    %r14,%rsi
  mov    $0xb,%edi
  shl    $0x8,%edx
  and    $0xf00,%edx
  add    %eax,%edx
  xor    %eax,%eax
  call   <lprintf@plt>
  movzbl 0x2(%rbp),%eax
  cmp    $0x27,%al
  ja     L376
  cmp    $0xa,%al
  jbe    L256
  lea    -0xb(%rax),%edx
  cmp    $0x1c,%dl
  ja     L256
  movzbl %dl,%edx
  movslq (%r15,%rdx,4),%rdx
  add    %r15,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax,%rax,1)
L376:
  cmp    $0xf0,%al
  jbe    L256
  lea    0xf(%rax),%edx
  cmp    $0xf1,%al
  jb     L256
  movzbl %dl,%edx
  movslq (%rbx,%rdx,4),%rdx
  add    %rbx,%rdx
  notrack jmp *%rdx
L256:
  test   $0x1,%al
  jne    L117
  movzbl 0x0(%rbp),%edx
  test   $0x10,%al
  lea    D131(%rip),%rcx
  lea    D319(%rip),%rsi
  cmovne %rcx,%rsi
  lea    D367(%rip),%r9
  mov    $0xb,%edi
  test   $0x40,%dl
  lea    D319(%rip),%rcx
  cmove  %rcx,%r9
  lea    D108(%rip),%r8
  test   %dl,%dl
  cmovns %rcx,%r8
  sub    $0x8,%rsp
  mov    %eax,%ecx
  push   %rsi
  shr    $0x5,%al
  lea    D152(%rip),%rsi
  shr    %cl
  movzbl %al,%edx
  xor    %eax,%eax
  and    $0x7,%ecx
  call   <lprintf@plt>
  pop    %rax
  pop    %rdx
  cmp    $0x4,%r12d
  jle    L50
  cmpb   $0x0,0x0(%rbp)
  jns    L50
  cmpb   $0x7f,0x3(%rbp)
  jne    L50
  movzbl 0x4(%rbp),%eax
  lea    -0x5(%r12),%r8d
  add    $0x5,%rbp
  sub    $0xa,%r12d
  cmp    $0xf0,%al
  ja     L364
  cmp    $0xc2,%al
  jbe    L296
  lea    0x3d(%rax),%edx
  cmp    $0x2d,%dl
  ja     L364
  lea    D268(%rip),%rcx
  movzbl %dl,%edx
  movslq (%rcx,%rdx,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax,%rax,1)
  movzbl 0x3(%rbp),%edx
  lea    D45(%rip),%rsi
L147:
  add    $0x18,%rsp
  mov    $0xb,%edi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <lprintf@plt>
  nopl   (%rax)
  lea    D73(%rip),%rsi
L128:
  add    $0x18,%rsp
  mov    $0xb,%edi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <lprintf@plt>
  nopl   0x0(%rax)
  lea    D317(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  movzbl 0x3(%rbp),%edi
  movzbl 0x4(%rbp),%r12d
  call   <restart_code@plt>
  mov    %r12d,%ecx
  lea    D127(%rip),%rsi
  mov    %eax,%edx
L86:
  add    $0x18,%rsp
  mov    $0xb,%edi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <lprintf@plt>
  nopl   0x0(%rax)
  lea    D264(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  movzbl 0x3(%rbp),%edx
  lea    D38(%rip),%rsi
  mov    $0xb,%edi
  mov    %edx,%eax
  and    $0xf,%edx
  shr    $0x4,%al
  add    $0x1,%edx
  add    $0x1,%eax
  sar    %edx
  movzbl %al,%eax
  sar    %eax
  lea    0x4(%rax,%rdx,1),%ebx
  xor    %eax,%eax
  sub    %ebx,%r12d
  call   <lprintf@plt>
  test   %r12d,%r12d
  je     L206
  add    %rbp,%rbx
  mov    %r12d,%esi
  movzbl (%rbx),%ebp
  mov    %rbx,%rdi
  call   <facility@plt>
  add    $0x1,%ebp
  sub    %ebp,%r12d
  test   %r12d,%r12d
  jle    L56
  movslq %ebp,%rbp
  mov    $0x1,%edx
  mov    %r12d,%esi
  lea    (%rbx,%rbp,1),%rdi
  jmp    L332
  nopl   (%rax)
  lea    D87(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  lea    D201(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  lea    D235(%rip),%rsi
  mov    $0xb,%edi
  xor    %eax,%eax
  call   <lprintf@plt>
  lea    -0x3(%r12),%esi
  lea    0x3(%rbp),%rdi
  mov    %r13d,%edx
L332:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1160 <data_dump@plt>
  nopw   0x0(%rax,%rax,1)
  lea    D285(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  movzbl 0x3(%rbp),%edi
  movzbl 0x4(%rbp),%r13d
  call   <clear_code@plt>
  mov    %r13d,%ecx
  mov    $0xb,%edi
  lea    D353(%rip),%rsi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <lprintf@plt>
  cmp    $0x6,%r12d
  jg     L141
L56:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
  lea    D135(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
  movzbl 0x3(%rbp),%edi
  movzbl 0x4(%rbp),%r12d
  call   <reset_code@plt>
  mov    %r12d,%ecx
  lea    D94(%rip),%rsi
  mov    %eax,%edx
  jmp    L86
  nop
L296:
  cmp    $0x1,%al
  je     L65
  cmp    $0x8,%al
  jne    L364
  mov    %r8d,0xc(%rsp)
  mov    %r12d,%edx
  lea    D289(%rip),%rsi
L36:
  mov    $0xb,%edi
  xor    %eax,%eax
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  mov    %r13d,%edx
  jmp    L89
  nopl   0x0(%rax)
L206:
  lea    D193(%rip),%rsi
  jmp    L128
  nopl   0x0(%rax)
L364:
  movzbl %al,%edx
  lea    D267(%rip),%rsi
  mov    %r12d,%ecx
  xor    %eax,%eax
  mov    $0xb,%edi
  mov    %r8d,0xc(%rsp)
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  mov    %r13d,%edx
L89:
  mov    %rbp,%rdi
  jmp    L332
  nopl   (%rax)
L65:
  mov    %r12d,%edx
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r8d,0xc(%rsp)
  lea    D186(%rip),%rsi
  call   <lprintf@plt>
  mov    0xc(%rsp),%r12d
  jmp    L283
  nopl   (%rax)
L141:
  add    $0x18,%rsp
  lea    -0x6(%r12),%esi
  lea    0x6(%rbp),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10f0 <facility@plt>
  mov    %r8d,0xc(%rsp)
  mov    %r12d,%edx
  lea    D218(%rip),%rsi
  jmp    L36
  mov    %r12d,%edx
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r8d,0xc(%rsp)
  lea    D158(%rip),%rsi
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  add    $0x18,%rsp
  mov    %r13d,%edx
  pop    %rbx
  mov    %rbp,%rdi
  xor    %ecx,%ecx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1100 <netrom_dump@plt>
  mov    %r12d,%edx
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r8d,0xc(%rsp)
  lea    D37(%rip),%rsi
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  add    $0x18,%rsp
  mov    %r13d,%edx
  pop    %rbx
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10e0 <flexnet_dump@plt>
  mov    %r12d,%edx
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r8d,0xc(%rsp)
  lea    D62(%rip),%rsi
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1170 <arp_dump@plt>
  mov    %r12d,%edx
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r8d,0xc(%rsp)
  lea    D172(%rip),%rsi
  call   <lprintf@plt>
  mov    0xc(%rsp),%esi
  add    $0x18,%rsp
  mov    %r13d,%edx
  pop    %rbx
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1120 <ip_dump@plt>
  mov    %r8d,0xc(%rsp)
  mov    %r12d,%edx
  lea    D290(%rip),%rsi
  jmp    L36
L50:
  sub    $0x3,%r12d
  lea    D289(%rip),%rsi
  mov    $0xb,%edi
  xor    %eax,%eax
  mov    %r12d,%edx
  call   <lprintf@plt>
  lea    0x3(%rbp),%rdi
  mov    %r13d,%edx
  mov    %r12d,%esi
  jmp    L332
L117:
  mov    %eax,%edx
  and    $0x1f,%edx
  cmp    $0x5,%dl
  je     L279
  cmp    $0x9,%dl
  je     L164
  cmp    $0x1,%dl
  je     L369
  lea    D23(%rip),%rsi
  mov    $0xb,%edi
  xor    %eax,%eax
  call   <lprintf@plt>
  mov    $0x1,%edx
  mov    %r12d,%esi
  jmp    L89
L279:
  shr    $0x5,%al
  lea    D118(%rip),%rsi
  movzbl %al,%edx
  jmp    L147
L369:
  shr    $0x5,%al
  lea    D314(%rip),%rsi
  movzbl %al,%edx
  jmp    L147
L164:
  shr    $0x5,%al
  lea    D338(%rip),%rsi
  movzbl %al,%edx
  jmp    L147
```

tool_calls: name: parse_data
arguments: label: D184
datatype: string
name: parse_data
arguments: label: D131
datatype: string
name: parse_data
arguments: label: D319
datatype: string
name: parse_data
arguments: label: D367
datatype: string
name: parse_data
arguments: label: D108
datatype: string
name: parse_data
arguments: label: D152
datatype: string
name: parse_data
arguments: label: D45
datatype: string
name: parse_data
arguments: label: D73
datatype: string
name: parse_data
arguments: label: D317
datatype: string
name: parse_data
arguments: label: D127
datatype: string
name: parse_data
arguments: label: D264
datatype: string
name: parse_data
arguments: label: D38
datatype: string
name: parse_data
arguments: label: D87
datatype: string
name: parse_data
arguments: label: D201
datatype: string
name: parse_data
arguments: label: D235
datatype: string
name: parse_data
arguments: label: D285
datatype: string
name: parse_data
arguments: label: D353
datatype: string
name: parse_data
arguments: label: D135
datatype: string
name: parse_data
arguments: label: D94
datatype: string
name: parse_data
arguments: label: D289
datatype: string
name: parse_data
arguments: label: D193
datatype: string
name: parse_data
arguments: label: D267
datatype: string
name: parse_data
arguments: label: D186
datatype: string
name: parse_data
arguments: label: D218
datatype: string
name: parse_data
arguments: label: D158
datatype: string
name: parse_data
arguments: label: D37
datatype: string
name: parse_data
arguments: label: D62
datatype: string
name: parse_data
arguments: label: D172
datatype: string
name: parse_data
arguments: label: D290
datatype: string
name: parse_data
arguments: label: D23
datatype: string
name: parse_data
arguments: label: D118
datatype: string
name: parse_data
arguments: label: D314
datatype: string
name: parse_data
arguments: label: D338
datatype: string

tool: D184: X.25: LCI %3.3X : 

tool: D131: M

tool: 

tool: D367: D

tool: D108: Q

tool: D152: DATA R%d S%d %s%s%s

tool: D45: DIAGNOSTIC - Diag %d


tool: D73: REGISTRATION REQUEST


tool: D317: REGISTRATION CONFIRMATION


tool: D127: RESTART REQUEST - Cause %s - Diag %d


tool: D264: RESTART CONFIRMATION


tool: D38: CALL REQUEST - 

tool: D87: INTERRUPT CONFIRMATION


tool: D201: RESET CONFIRMATION


tool: D235: INTERRUPT


tool: D285: CALL ACCEPTED


tool: D353: CLEAR REQUEST - Cause %s - Diag %d


tool: D135: CLEAR CONFIRMATION


tool: D94: RESET REQUEST - Cause %s - Diag %d


tool: D289:  len %d


tool: D193: 


tool: D267:  pid=0x%x len %d


tool: D186:  pid=X.25 len %d


tool: D218:  pid=Text len %d


tool: D158:  pid=NET/ROM len %d


tool: D37:  pid=FLEXNET len %d


tool: D62:  pid=ARP len %d


tool: D172:  pid=IP len %d


tool: D290:  pid=TEXNET len %d


tool: D23: UNKNOWN


tool: D118: RNR R%d


tool: D314: RR R%d


tool: D338: REJ R%d


assistant: ```c
void rose_dump(unsigned char *data, int length, int hexdump) {
  unsigned int len, hlen;
  unsigned int lci = ((unsigned)(data[0] & 0x0F) << 8) + data[1];
  lprintf(11, "X.25: LCI %3.3X : ", lci);
  switch (data[2]) {
  case 0x0B:
    len = 4;
    hlen = (((data[3] >> 4) & 0x0F) + 1) / 2;
    hlen += (((data[3] >> 0) & 0x0F) + 1) / 2;
    len += hlen;
    data += len;
    length -= len;
    lprintf(11, "CALL REQUEST - ");
    if (length) {
      unsigned int flen = data[0] + 1;
      facility(data, length);
      length -= flen;
      data += flen;
      if (length > 0)
        data_dump(data, length, 1);
    } else {
      lprintf(11, "\n");
    }
    return;
  case 0x0F:
    lprintf(11, "CALL ACCEPTED\n");
    return;
  case 0x13:
    lprintf(11, "CLEAR REQUEST - Cause %s - Diag %d\n", clear_code(data[3]), data[4]);
    if (length > 6) {
      facility(data + 6, length - 6);
    }
    return;
  case 0x17:
    lprintf(11, "CLEAR CONFIRMATION\n");
    return;
  case 0xF1:
    lprintf(11, "DIAGNOSTIC - Diag %d\n", data[3]);
    return;
  case 0x23:
    lprintf(11, "INTERRUPT\n");
    data_dump(data + 3, length - 3, hexdump);
    return;
  case 0x27:
    lprintf(11, "INTERRUPT CONFIRMATION\n");
    return;
  case 0x1B:
    lprintf(11, "RESET REQUEST - Cause %s - Diag %d\n", reset_code(data[3]), data[4]);
    return;
  case 0x1F:
    lprintf(11, "RESET CONFIRMATION\n");
    return;
  case 0xFB:
    lprintf(11, "RESTART REQUEST - Cause %s - Diag %d\n", restart_code(data[3]), data[4]);
    return;
  case 0xFF:
    lprintf(11, "RESTART CONFIRMATION\n");
    return;
  case 0xF3:
    lprintf(11, "REGISTRATION REQUEST\n");
    return;
  case 0xF7:
    lprintf(11, "REGISTRATION CONFIRMATION\n");
    return;
  }
  if ((data[2] & 0x01) == 0x00) {
    lprintf(11, "DATA R%d S%d %s%s%s", (data[2] >> 5) & 0x07, (data[2] >> 1) & 0x07, (data[0] & 0x80) ? "Q" : "", (data[0] & 0x40) ? "D" : "", (data[2] & 0x10) ? "M" : "");
    if ((length >= 5) && (data[0] & 0x80) && (data[3] == 0x7f)) {
      int pid = data[4];
      data += 5;
      length -= 5;
      switch (pid) {
      case 0x08:
        lprintf(11, " len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      case 0xCD:
        lprintf(11, " pid=ARP len %d\n", length - 5);
        arp_dump(data, length);
        break;
      case 0xCF:
        lprintf(11, " pid=NET/ROM len %d\n", length - 5);
        netrom_dump(data, length, hexdump, 0);
        break;
      case 0xCC:
        lprintf(11, " pid=IP len %d\n", length - 5);
        ip_dump(data, length, hexdump);
        break;
      case 0x01:
        lprintf(11, " pid=X.25 len %d\n", length - 5);
        rose_dump(data, length, hexdump);
        break;
      case 0xC3:
        lprintf(11, " pid=TEXNET len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      case 0xCE:
        lprintf(11, " pid=FLEXNET len %d\n", length - 5);
        flexnet_dump(data, length, hexdump);
        break;
      case 0xF0:
        lprintf(11, " pid=Text len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      default:
        lprintf(11, " pid=0x%x len %d\n", pid, length - 5);
        data_dump(data, length, hexdump);
        break;
      }
    } else {
      lprintf(11, " len %d\n", length - 3);
      data_dump(data + 3, length - 3, hexdump);
    }
    return;
  }
  switch (data[2] & 0x1F) {
  case 0x01:
    lprintf(11, "RR R%d\n", (data[2] >> 5) & 0x07);
    return;
  case 0x05:
    lprintf(11, "RNR R%d\n", (data[2] >> 5) & 0x07);
    return;
  case 0x09:
    lprintf(11, "REJ R%d\n", (data[2] >> 5) & 0x07);
    return;
  }
  lprintf(11, "UNKNOWN\n");
  data_dump(data, length, 1);
}
```