user: 请将以下的汇编代码转换成C语言代码:

```asm
<aRomanos>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %edi,%edi
  je     L163
  mov    %edi,%ebp
  cmp    $0xf9f,%edi
  jg     L163
  cmp    $0x3e7,%edi
  jg     L483
  lea    -0x384(%rdi),%eax
  xor    %ebx,%ebx
  cmp    $0x63,%eax
  ja     L474
L411:
  lea    D83(%rip),%rdi
  call   <printf@plt>
  cmp    $0x3e7,%ebp
  jg     L35
L474:
  lea    -0x1f4(%rbp),%eax
  mov    %ebp,0xc(%rsp)
  cmp    $0x18f,%eax
  ja     L51
  mov    %ebp,%ebx
L457:
  mov    %ebx,%r12d
  lea    D29(%rip),%rdi
  call   <printf@plt>
  imul   $0x51eb851f,%r12,%r12
  shr    $0x25,%r12
  imul   $0x64,%r12d,%r13d
  mov    %ebx,%r12d
  mov    %r13,%rax
  sub    %r13d,%r12d
  imul   $0x51eb851f,%r13,%r13
  shr    $0x25,%r13
  cmp    $0x257,%eax
  jle    L413
  sub    $0x4,%r13d
  mov    $0x1,%r15d
  lea    D44(%rip),%r14
  nopw   0x0(%rax,%rax,1)
L437:
  mov    %r14,%rdi
  add    $0x1,%r15d
  call   <printf@plt>
  cmp    %r13d,%r15d
  jne    L437
L413:
  mov    0xc(%rsp),%eax
  sub    $0x190,%eax
  cmp    $0x63,%eax
  jbe    L226
  lea    -0x190(%rbp),%eax
  cmp    $0x63,%eax
  ja     L83
L226:
  lea    D27(%rip),%rdi
  call   <printf@plt>
L356:
  movslq %r12d,%rbx
  mov    %r12d,%eax
  imul   $0x66666667,%rbx,%rbx
  sar    $0x1f,%eax
  sar    $0x22,%rbx
  sub    %eax,%ebx
  lea    (%rbx,%rbx,4),%eax
  mov    %r12d,%ebx
  add    %eax,%eax
  sub    %eax,%ebx
  lea    -0x32(%r12),%eax
  cmp    $0x27,%eax
  jbe    L468
  lea    -0x32(%rbp),%eax
  cmp    $0x27,%eax
  ja     L56
L468:
  lea    D118(%rip),%rdi
  call   <printf@plt>
  mov    %r12d,%eax
  sub    %ebx,%eax
  movslq %eax,%r14
  cltd
  imul   $0x66666667,%r14,%r14
  sar    $0x22,%r14
  sub    %edx,%r14d
  cmp    $0x3b,%eax
  jle    L56
  sub    $0x4,%r14d
  mov    $0x1,%r13d
  lea    D4(%rip),%r15
  nopl   (%rax)
L189:
  mov    %r15,%rdi
  add    $0x1,%r13d
  call   <printf@plt>
  cmp    %r14d,%r13d
  jne    L189
L56:
  cmp    $0x59,%r12d
  jg     L160
L211:
  lea    -0x28(%r12),%eax
  cmp    $0x9,%eax
  jbe    L343
  lea    -0x28(%rbp),%eax
  cmp    $0x9,%eax
  jbe    L343
  lea    -0xa(%r12),%eax
  cmp    $0x27,%eax
  ja     L256
L296:
  sub    %ebx,%r12d
  movslq %r12d,%r13
  mov    %r12d,%eax
  imul   $0x66666667,%r13,%r13
  sar    $0x1f,%eax
  sar    $0x22,%r13
  sub    %eax,%r13d
  cmp    $0x9,%r12d
  jle    L58
  mov    $0x1,%r12d
  lea    D4(%rip),%r15
  nopl   0x0(%rax)
L412:
  mov    %r15,%rdi
  add    $0x1,%r12d
  call   <printf@plt>
  cmp    %r12d,%r13d
  jge    L412
  jmp    L58
  cs nopw 0x0(%rax,%rax,1)
L483:
  movslq %edi,%rbx
  mov    %edi,%eax
  imul   $0x10624dd3,%rbx,%rbx
  sar    $0x1f,%eax
  sar    $0x26,%rbx
  sub    %eax,%ebx
  imul   $0x3e8,%ebx,%r13d
  mov    %edi,%ebx
  mov    %r13,%rax
  sub    %r13d,%ebx
  imul   $0x10624dd3,%r13,%r13
  shr    $0x26,%r13
  cmp    $0x3e7,%eax
  jle    L93
  mov    $0x1,%r12d
  lea    D86(%rip),%r14
  nopl   0x0(%rax,%rax,1)
L428:
  mov    %r14,%rdi
  add    $0x1,%r12d
  call   <printf@plt>
  cmp    %r12d,%r13d
  jge    L428
L93:
  lea    -0x384(%rbx),%eax
  cmp    $0x63,%eax
  jbe    L411
L35:
  lea    -0x1f4(%rbx),%eax
  mov    %ebx,0xc(%rsp)
  cmp    $0x18f,%eax
  jbe    L457
  mov    %ebx,%r12d
  imul   $0x51eb851f,%r12,%r12
  shr    $0x25,%r12
  imul   $0x64,%r12d,%eax
  mov    %ebx,%r12d
  sub    %eax,%r12d
  lea    -0x190(%rbx),%eax
  cmp    $0x63,%eax
  jbe    L226
L83:
  mov    0xc(%rsp),%r15d
  sub    $0x64,%r15d
  cmp    $0x18f,%r15d
  ja     L279
L224:
  sub    %r12d,%ebx
  movslq %ebx,%r13
  mov    %ebx,%eax
  imul   $0x51eb851f,%r13,%r13
  sar    $0x1f,%eax
  sar    $0x25,%r13
  sub    %eax,%r13d
  cmp    $0x63,%ebx
  jle    L356
  mov    $0x1,%ebx
  lea    D44(%rip),%r14
  nopl   0x0(%rax,%rax,1)
L6:
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    %ebx,%r13d
  jge    L6
  jmp    L356
  nopl   (%rax)
L343:
  lea    D91(%rip),%rdi
  call   <printf@plt>
L58:
  lea    -0x5(%rbx),%eax
  cmp    $0x3,%eax
  jbe    L346
  lea    -0x5(%rbp),%eax
  cmp    $0x3,%eax
  ja     L115
L346:
  lea    D69(%rip),%rdi
  call   <printf@plt>
  cmp    $0x5,%ebx
  jle    L115
  lea    -0x4(%rbx),%r14d
  mov    $0x1,%r12d
  lea    D11(%rip),%r13
L71:
  mov    %r13,%rdi
  add    $0x1,%r12d
  call   <printf@plt>
  cmp    %r12d,%r14d
  jne    L71
L115:
  cmp    $0x9,%ebx
  je     L287
L72:
  cmp    $0x4,%ebx
  je     L261
  cmp    $0x4,%ebp
  je     L261
L157:
  cmp    $0x3,%ebx
  jle    L36
  cmp    $0x3,%ebp
  jle    L36
L426:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <getchar@plt>
  nopl   0x0(%rax)
L36:
  test   %ebx,%ebx
  jle    L426
  mov    $0x1,%ebp
  lea    D11(%rip),%r13
L221:
  mov    %r13,%rdi
  add    $0x1,%ebp
  call   <printf@plt>
  cmp    %ebx,%ebp
  jle    L221
  jmp    L426
  nopl   0x0(%rax)
L163:
  lea    D1(%rip),%rdi
  call   <printf@plt>
  jmp    L426
  cs nopw 0x0(%rax,%rax,1)
L261:
  lea    D154(%rip),%rdi
  call   <printf@plt>
  jmp    L157
  xchg   %ax,%ax
L160:
  lea    D13(%rip),%rdi
  call   <printf@plt>
  jmp    L211
  nopl   0x0(%rax)
L256:
  lea    -0xa(%rbp),%eax
  cmp    $0x27,%eax
  ja     L58
  jmp    L296
  nopl   0x0(%rax)
L279:
  lea    -0x64(%rbp),%eax
  cmp    $0x18f,%eax
  ja     L356
  jmp    L224
  nopl   0x0(%rax,%rax,1)
L287:
  lea    D72(%rip),%rdi
  call   <printf@plt>
  jmp    L72
L51:
  mov    %ebp,%eax
  mov    $0x64,%ecx
  mov    %ebp,%ebx
  cltd
  idiv   %ecx
  mov    %edx,%r12d
  jmp    L413
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D83
type_infered: string
name: extract_symbolic_data
arguments: data_label: D29
type_infered: string
name: extract_symbolic_data
arguments: data_label: D44
type_infered: string
name: extract_symbolic_data
arguments: data_label: D27
type_infered: string
name: extract_symbolic_data
arguments: data_label: D118
type_infered: string
name: extract_symbolic_data
arguments: data_label: D4
type_infered: string
name: extract_symbolic_data
arguments: data_label: D86
type_infered: string
name: extract_symbolic_data
arguments: data_label: D91
type_infered: string
name: extract_symbolic_data
arguments: data_label: D69
type_infered: string
name: extract_symbolic_data
arguments: data_label: D11
type_infered: string
name: extract_symbolic_data
arguments: data_label: D1
type_infered: string
name: extract_symbolic_data
arguments: data_label: D154
type_infered: string
name: extract_symbolic_data
arguments: data_label: D13
type_infered: string
name: extract_symbolic_data
arguments: data_label: D72
type_infered: string

tool: D83: CM

tool: D29: D

tool: D44: C

tool: D27: CD

tool: D118: L

tool: D4: X

tool: D86: M

tool: D91: XL

tool: D69: V

tool: D11: I

tool: D1: ERROR: Numero Invalido


tool: D154: IV

tool: D13: XC

tool: D72: IX

assistant: ```c
void aRomanos(int p1) {
  int rem;
  int redondo;
  int pTimes;
  if (p1 != 0 && p1 < 4000) {
    if (p1 / 1000 >= 1) {
      rem = p1 % 1000;
      redondo = p1 - rem;
      pTimes = redondo / 1000;
      for (int i = 1; i <= pTimes; i++) {
        printf("M");
      }
    }
    if ((rem >= 900 && rem <= 999) || (p1 >= 900 && p1 <= 999)) {
      printf("CM");
      ;
    }
    if (p1 < 1000) {
      rem = p1;
    }
    if ((rem >= 500 && rem < 900) || (p1 >= 500 && p1 < 900)) {
      printf("D");
      redondo = rem - (rem % 100);
      pTimes = (redondo / 100) - 5;
      for (int i = 1; i <= pTimes; i++) {
        printf("C");
      }
    }
    if ((rem >= 400 && rem < 500) || (p1 >= 400 && p1 < 500)) {
      printf("CD");
    } else if (rem < 500 && rem >= 100 || p1 < 500 && p1 >= 100) {
      redondo = rem - (rem % 100);
      pTimes = redondo / 100;
      for (int i = 1; i <= pTimes; i++) {
        printf("C");
      }
    }
    rem = rem % 100;
    if ((rem >= 50 && rem < 90) || (p1 >= 50 && p1 < 90)) {
      printf("L");
      redondo = rem - (rem % 10);
      pTimes = (redondo / 10) - 5;
      for (int i = 1; i <= pTimes; i++) {
        printf("X");
      }
    }
    if (rem >= 90) {
      printf("XC");
    }
    if ((rem >= 40 && rem < 50) || (p1 >= 40 && p1 < 50)) {
      printf("XL");
    } else if (rem < 50 && rem >= 10 || p1 < 50 && p1 >= 10) {
      redondo = rem - (rem % 10);
      pTimes = redondo / 10;
      for (int i = 1; i <= pTimes; i++) {
        printf("X");
      }
    }
    rem = rem % 10;
    if ((rem >= 5 && rem < 9) || (p1 >= 5 && p1 < 9)) {
      printf("V");
      redondo = rem;
      pTimes = redondo - 5;
      for (int i = 1; i <= pTimes; i++) {
        printf("I");
      }
    }
    if (rem >= 9) {
      printf("IX");
    }
    if (rem == 4 || p1 == 4) {
      printf("IV");
    }
    redondo = rem;
    pTimes = redondo;
    if (rem < 4 || p1 < 4) {
      for (int i = 1; i <= pTimes; i++) {
        printf("I");
      }
    }
  } else {
    printf("ERROR: Numero Invalido\n");
  }
  getchar();
}
```