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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x14(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L65
L124:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x49,%al
  jne    L188
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x56,%al
  je     L194
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x58,%al
  je     L194
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x4c,%al
  je     L194
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x43,%al
  jne    L188
L194:
  subl   $0x1,-0x14(%rbp)
  jmp    L55
L188:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x58,%al
  jne    L212
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x4c,%al
  je     L200
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x43,%al
  jne    L212
L200:
  subl   $0xa,-0x14(%rbp)
  jmp    L55
L212:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x49,%al
  jne    L12
  addl   $0x1,-0x14(%rbp)
  jmp    L55
L12:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x56,%al
  jne    L9
  addl   $0x5,-0x14(%rbp)
  jmp    L55
L9:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x58,%al
  jne    L63
  addl   $0xa,-0x14(%rbp)
  jmp    L55
L63:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x4c,%al
  jne    L48
  addl   $0x32,-0x14(%rbp)
  jmp    L55
L48:
  mov    -0x18(%rbp),%eax
  cltq
  movzbl -0xd(%rbp,%rax,1),%eax
  cmp    $0x43,%al
  jne    L55
  addl   $0x64,-0x14(%rbp)
L55:
  addl   $0x1,-0x18(%rbp)
L65:
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x18(%rbp)
  jl     L124
  cmpl   $0x100,-0x14(%rbp)
  jle    L157
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L30
L157:
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L30:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L215
  call   <__stack_chk_fail@plt>
L215:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D5
type: string
name: parse_data
arguments: data_tag: D22
type: string
name: parse_data
arguments: data_tag: D27
type: string

tool: D5: %s

tool: D22: Maximum number is 256.

tool: D27: %d

assistant: ```c
int main() {
  char str[5];
  int l, n = 0;
  scanf("%s", str);
  for (l = 0; l < strlen(str); l++) {
    if (str[l] == 'I' && (str[l + 1] == 'V' || str[l + 1] == 'X' || str[l + 1] == 'L' || str[l + 1] == 'C')) {
      n--;
    } else if (str[l] == 'X' && (str[l + 1] == 'L' || str[l + 1] == 'C')) {
      n -= 10;
    } else if (str[l] == 'I') {
      n++;
    } else if (str[l] == 'V') {
      n += 5;
    } else if (str[l] == 'X') {
      n += 10;
    } else if (str[l] == 'L') {
      n += 50;
    } else if (str[l] == 'C') {
      n += 100;
    }
  }
  if (n > 256)
    printf("Maximum number is 256.");
  else
    printf("%d", n);
  return 0;
}
```