user: Converte this assembly snippet into its equivalent C code:

```asm
<intToRoman>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x120,%rsp
  mov    %edi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  lea    D87(%rip),%rax
  mov    %rax,(%rsp)
  lea    D230(%rip),%rcx
  mov    %rcx,0x8(%rsp)
  lea    D72(%rip),%rcx
  mov    %rcx,0x10(%rsp)
  lea    D267(%rip),%rcx
  mov    %rcx,0x18(%rsp)
  mov    %rax,0x20(%rsp)
  lea    D151(%rip),%rcx
  mov    %rcx,0x28(%rsp)
  lea    D303(%rip),%rcx
  mov    %rcx,0x30(%rsp)
  lea    D237(%rip),%rdi
  mov    %rdi,0x38(%rsp)
  lea    D274(%rip),%rcx
  mov    %rcx,0x40(%rsp)
  lea    D208(%rip),%rdi
  mov    %rdi,0x48(%rsp)
  lea    D34(%rip),%rcx
  mov    %rcx,0x50(%rsp)
  lea    D41(%rip),%rsi
  mov    %rsi,0x58(%rsp)
  lea    D232(%rip),%rdi
  mov    %rdi,0x60(%rsp)
  lea    D297(%rip),%rcx
  mov    %rcx,0x68(%rsp)
  mov    %rax,0x70(%rsp)
  lea    D203(%rip),%rsi
  mov    %rsi,0x78(%rsp)
  lea    D24(%rip),%rdi
  mov    %rdi,0x80(%rsp)
  lea    D308(%rip),%rdx
  mov    %rdx,0x88(%rsp)
  lea    D89(%rip),%rcx
  mov    %rcx,0x90(%rsp)
  lea    D173(%rip),%rsi
  mov    %rsi,0x98(%rsp)
  lea    D254(%rip),%rdi
  mov    %rdi,0xa0(%rsp)
  lea    D181(%rip),%rdx
  mov    %rdx,0xa8(%rsp)
  lea    D30(%rip),%rcx
  mov    %rcx,0xb0(%rsp)
  lea    D265(%rip),%rsi
  mov    %rsi,0xb8(%rsp)
  mov    %rax,0xc0(%rsp)
  lea    D127(%rip),%rax
  mov    %rax,0xc8(%rsp)
  lea    D102(%rip),%rax
  mov    %rax,0xd0(%rsp)
  lea    D54(%rip),%rax
  mov    %rax,0xd8(%rsp)
  lea    D212(%rip),%rax
  mov    %rax,0xe0(%rsp)
  lea    D46(%rip),%rax
  mov    %rax,0xe8(%rsp)
  lea    D198(%rip),%rax
  mov    %rax,0xf0(%rsp)
  lea    D90(%rip),%rax
  mov    %rax,0xf8(%rsp)
  lea    D301(%rip),%rax
  mov    %rax,0x100(%rsp)
  lea    D20(%rip),%rax
  mov    %rax,0x108(%rsp)
  mov    $0x14,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  movb   $0x0,(%rax)
  movslq %ebx,%rbp
  imul   $0x10624dd3,%rbp,%r14
  sar    $0x26,%r14
  mov    %ebx,%r13d
  sar    $0x1f,%r13d
  sub    %r13d,%r14d
  movslq %r14d,%rax
  mov    (%rsp,%rax,8),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  imul   $0x3e8,%r14d,%r14d
  mov    %ebx,%edx
  sub    %r14d,%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  cltq
  mov    0x20(%rsp,%rax,8),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  imul   $0x51eb851f,%rbp,%rax
  sar    $0x25,%rax
  sub    %r13d,%eax
  imul   $0x64,%eax,%eax
  mov    %ebx,%edx
  sub    %eax,%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  cltq
  mov    0x70(%rsp,%rax,8),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  imul   $0x66666667,%rbp,%rbp
  sar    $0x22,%rbp
  sub    %r13d,%ebp
  lea    0x0(%rbp,%rbp,4),%eax
  add    %eax,%eax
  sub    %eax,%ebx
  movslq %ebx,%rbx
  mov    0xc0(%rsp,%rbx,8),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    %r12,%rax
  add    $0x120,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D87
type: string
name: parse_data
arguments: data_label: D230
type: string
name: parse_data
arguments: data_label: D72
type: string
name: parse_data
arguments: data_label: D267
type: string
name: parse_data
arguments: data_label: D151
type: string
name: parse_data
arguments: data_label: D303
type: string
name: parse_data
arguments: data_label: D237
type: string
name: parse_data
arguments: data_label: D274
type: string
name: parse_data
arguments: data_label: D208
type: string
name: parse_data
arguments: data_label: D34
type: string
name: parse_data
arguments: data_label: D41
type: string
name: parse_data
arguments: data_label: D232
type: string
name: parse_data
arguments: data_label: D297
type: string
name: parse_data
arguments: data_label: D203
type: string
name: parse_data
arguments: data_label: D24
type: string
name: parse_data
arguments: data_label: D308
type: string
name: parse_data
arguments: data_label: D89
type: string
name: parse_data
arguments: data_label: D173
type: string
name: parse_data
arguments: data_label: D254
type: string
name: parse_data
arguments: data_label: D181
type: string
name: parse_data
arguments: data_label: D30
type: string
name: parse_data
arguments: data_label: D265
type: string
name: parse_data
arguments: data_label: D127
type: string
name: parse_data
arguments: data_label: D102
type: string
name: parse_data
arguments: data_label: D54
type: string
name: parse_data
arguments: data_label: D212
type: string
name: parse_data
arguments: data_label: D46
type: string
name: parse_data
arguments: data_label: D198
type: string
name: parse_data
arguments: data_label: D90
type: string
name: parse_data
arguments: data_label: D301
type: string
name: parse_data
arguments: data_label: D20
type: string

tool: 

tool: D230: M

tool: D72: MM

tool: D267: MMM

tool: D151: C

tool: D303: CC

tool: D237: CCC

tool: D274: CD

tool: D208: D

tool: D34: DC

tool: D41: DCC

tool: D232: DCCC

tool: D297: CM

tool: D203: X

tool: D24: XX

tool: D308: XXX

tool: D89: XL

tool: D173: L

tool: D254: LX

tool: D181: LXX

tool: D30: LXXX

tool: D265: XC

tool: D127: I

tool: D102: II

tool: D54: III

tool: D212: IV

tool: D46: V

tool: D198: VI

tool: D90: VII

tool: D301: VIII

tool: D20: IX

assistant: ```c
char *intToRoman(int num) {
  char *M[] = {"", "M", "MM", "MMM"};
  char *C[] = {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"};
  char *X[] = {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"};
  char *I[] = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
  char *s = (char *)malloc(sizeof(char) * 20);
  *s = '\0';
  strcat(s, M[num / 1000]);
  strcat(s, C[(num % 1000) / 100]);
  strcat(s, X[(num % 100) / 10]);
  strcat(s, I[(num % 10)]);
  return s;
}
```