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

```asm
<romanToInt>:
  endbr64
  movzbl (%rdi),%eax
  xor    %r8d,%r8d
  test   %al,%al
  je     L107
  lea    D0(%rip),%rsi
  nopl   0x0(%rax)
L279:
  sub    $0x43,%eax
  movzbl 0x1(%rdi),%edx
  lea    0x1(%rdi),%rcx
  cmp    $0x15,%al
  ja     L102
  movzbl %al,%eax
  movslq (%rsi,%rax,4),%rax
  add    %rsi,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  add    $0x5,%r8d
  nopl   0x0(%rax)
L102:
  mov    %rcx,%rdi
  test   %dl,%dl
  je     L107
L324:
  mov    %edx,%eax
  jmp    L279
  nopw   0x0(%rax,%rax,1)
  test   %dl,%dl
  je     L281
  cmp    $0x4c,%dl
  je     L271
  cmp    $0x43,%dl
  je     L157
  add    $0xa,%r8d
  jmp    L113
  add    $0x3e8,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  add    $0x32,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nopl   (%rax)
  test   %dl,%dl
  je     L311
  cmp    $0x56,%dl
  je     L178
  cmp    $0x58,%dl
  je     L93
  add    $0x1,%r8d
  jmp    L113
  nopl   0x0(%rax)
  add    $0x1f4,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  test   %dl,%dl
  je     L315
  cmp    $0x44,%dl
  je     L197
  cmp    $0x4d,%dl
  je     L47
  add    $0x64,%r8d
L113:
  mov    %rcx,%rdi
  mov    %edx,%eax
  jmp    L279
  nopl   0x0(%rax)
L315:
  add    $0x64,%r8d
L107:
  mov    %r8d,%eax
  ret
L311:
  add    $0x1,%r8d
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L281:
  add    $0xa,%r8d
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L271:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x28,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nopl   0x0(%rax)
L178:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x4,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nopl   0x0(%rax)
L197:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x190,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nop
L157:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x5a,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nopl   0x0(%rax)
L93:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x9,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
  nopl   0x0(%rax)
L47:
  movzbl 0x2(%rdi),%edx
  add    $0x1,%rcx
  add    $0x384,%r8d
  mov    %rcx,%rdi
  test   %dl,%dl
  jne    L324
  jmp    L107
```

assistant: ```c
int romanToInt(char *s) {
  char *p = s, *np;
  int n = 0;
  while (*p) {
    if (*p == 'I') {
      np = p + 1;
      if (*np) {
        if (*np == 'V') {
          n += 4;
          p++;
        } else if (*np == 'X') {
          n += 9;
          p++;
        } else {
          n += 1;
        }
      } else {
        n += 1;
      }
    } else if (*p == 'X') {
      np = p + 1;
      if (*np) {
        if (*np == 'L') {
          n += 40;
          p++;
        } else if (*np == 'C') {
          n += 90;
          p++;
        } else {
          n += 10;
        }
      } else {
        n += 10;
      }
    } else if (*p == 'C') {
      np = p + 1;
      if (*np) {
        if (*np == 'D') {
          n += 400;
          p++;
        } else if (*np == 'M') {
          n += 900;
          p++;
        } else {
          n += 100;
        }
      } else {
        n += 100;
      }
    } else if (*p == 'V') {
      n += 5;
    } else if (*p == 'L') {
      n += 50;
    } else if (*p == 'D') {
      n += 500;
    } else if (*p == 'M') {
      n += 1000;
    }
    p++;
  }
  return n;
}
```