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

```asm
<e_mk_info_button>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <strlen@plt>
  movsbl 0x0(%rbp),%edi
  mov    %eax,0xc(%rsp)
  cmp    $0xa,%dil
  je     L89
  test   %dil,%dil
  je     L89
  mov    %rbp,%r12
  xor    %r13d,%r13d
  jmp    L160
  nopl   (%rax)
L266:
  movsbl 0x1(%r12),%edi
  add    $0x1,%r12
  add    $0x1,%r13d
  test   %dil,%dil
  je     L21
L160:
  call   <isspace@plt>
  test   %rax,%rax
  jne    L266
  movslq %r13d,%rdx
  lea    0x0(%rbp,%rdx,1),%rcx
  movzbl (%rcx),%eax
  mov    %rcx,(%rsp)
  test   %al,%al
  je     L21
  mov    %r13d,%esi
  lea    0x1(%rbp,%rdx,1),%rbx
  mov    %rcx,%r14
  sub    %ecx,%esi
  jmp    L176
  nopw   0x0(%rax,%rax,1)
L148:
  movzbl (%rbx),%eax
  add    $0x1,%r14
  add    $0x1,%rbx
  test   %al,%al
  je     L21
L176:
  lea    (%rsi,%r14,1),%r15d
  cmp    $0x3a,%al
  jne    L148
  movsbl (%rbx),%edi
  mov    %esi,0x8(%rsp)
  call   <isspace@plt>
  mov    0x8(%rsp),%esi
  test   %rax,%rax
  jne    L34
  movzbl (%rbx),%eax
  cmp    $0x28,%al
  je     L207
  cmp    $0x3a,%al
  jne    L148
  movsbl 0x1(%rbx),%edi
  mov    %esi,0x8(%rsp)
  call   <isspace@plt>
  test   %rax,%rax
  jne    L34
  cmpb   $0x2e,0x1(%rbx)
  mov    0x8(%rsp),%esi
  jne    L148
L34:
  cmpb   $0x0,(%r14)
  je     L21
  cmpb   $0x3a,(%rbx)
  je     L181
L325:
  lea    0x1(%r15),%ebx
  movslq %ebx,%r14
  lea    0x0(%rbp,%r14,1),%r15
  movsbl (%r15),%edi
  test   %dil,%dil
  jne    L362
  jmp    L21
  nopl   0x0(%rax,%rax,1)
L75:
  add    $0x1,%r14
  add    $0x1,%ebx
  movsbl 0x0(%rbp,%r14,1),%edi
  lea    0x0(%rbp,%r14,1),%r15
  test   %dil,%dil
  je     L21
L362:
  call   <isspace@plt>
  test   %rax,%rax
  jne    L75
  cmpb   $0x28,(%r15)
  je     L49
  movslq %ebx,%rsi
  lea    0x0(%rbp,%rsi,1),%r12
  movzbl (%r12),%eax
  test   %al,%al
  je     L21
  add    $0x1,%ebx
  movslq %ebx,%rbx
  jmp    L375
  nopl   0x0(%rax)
L110:
  movzbl 0x0(%rbp,%rbx,1),%eax
  lea    0x0(%rbp,%rbx,1),%r12
  lea    0x1(%rbx),%rdx
  mov    %rbx,%rsi
  test   %al,%al
  je     L21
  mov    %rdx,%rbx
L375:
  lea    -0x1(%rbx),%r15d
  cmp    $0x2e,%al
  jne    L110
  lea    0x1(%rbp,%rsi,1),%r13
  movsbl 0x0(%r13),%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L110
  cmpb   $0x5f,0x0(%r13)
  je     L110
  cmpb   $0x0,(%r12)
  je     L21
  movslq %r15d,%r12
  mov    %r12,%rbx
  jmp    L48
  nopw   0x0(%rax,%rax,1)
L114:
  sub    $0x1,%rbx
L48:
  cmpb   $0x3a,0x0(%rbp,%rbx,1)
  jne    L114
  movsbl 0x1(%rbp,%rbx,1),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L114
  lea    0x1(%rbx),%ebx
  movslq %ebx,%rdx
  lea    0x0(%rbp,%rdx,1),%r14
  sub    %r14d,%ebx
L74:
  movsbl (%r14),%edi
  mov    %r14,(%rsp)
  lea    (%rbx,%r14,1),%r13d
  add    $0x1,%r14
  call   <isspace@plt>
  test   %rax,%rax
  jne    L74
L56:
  mov    0xc(%rsp),%ecx
  cmp    %ecx,%r15d
  jg     L401
  movslq %ecx,%r14
  mov    %ecx,%eax
  sub    %r15d,%eax
  mov    %r14,%rsi
  add    $0x2,%r14
  sub    %rax,%rsi
  sub    %rax,%r14
  lea    0x1(%rax),%rdx
  add    %rbp,%rsi
  lea    0x0(%rbp,%r14,1),%rdi
  call   <memmove@plt>
  lea    -0x1(%r15),%eax
  mov    %eax,0xc(%rsp)
L401:
  movb   $0x5,0x1(%rbp,%r12,1)
  cmp    0xc(%rsp),%r13d
  jg     L171
  movslq 0xc(%rsp),%r14
  mov    %r14d,%eax
  mov    %r14,%rsi
  add    $0x1,%r14
  sub    %r13d,%eax
  sub    %rax,%rsi
  sub    %rax,%r14
  lea    0x1(%rax),%rdx
  add    %rbp,%rsi
  lea    0x0(%rbp,%r14,1),%rdi
  call   <memmove@plt>
L171:
  mov    (%rsp),%rax
  movb   $0x1,(%rax)
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L89:
  mov    $0x1,%eax
L438:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L207:
  cmpb   $0x0,(%r14)
  jne    L325
L21:
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L181:
  movslq %r15d,%r12
  jmp    L56
L49:
  cmp    %r13d,0xc(%rsp)
  jl     L233
  movslq 0xc(%rsp),%rcx
  mov    %ecx,%eax
  mov    %rcx,%rsi
  lea    0x1(%rcx),%rdi
  sub    %r13d,%eax
  sub    %rax,%rsi
  sub    %rax,%rdi
  lea    0x1(%rax),%rdx
  add    %rbp,%rsi
  add    %rbp,%rdi
  call   <memmove@plt>
L233:
  lea    0x1(%rbx),%eax
  movb   $0x3,(%r12)
  cltq
  movb   $0x5,0x1(%rbp,%r14,1)
  lea    0x0(%rbp,%rax,1),%rcx
  movzbl (%rcx),%edx
  cmp    $0x29,%dl
  je     L287
  lea    0x1(%rbp,%rax,1),%rax
  test   %dl,%dl
  jne    L316
  jmp    L287
  nop
L7:
  cmp    $0x29,%dl
  je     L287
L316:
  movzbl (%rax),%edx
  mov    %rax,%rcx
  add    $0x1,%rax
  test   %dl,%dl
  jne    L7
L287:
  xor    %eax,%eax
  test   %dl,%dl
  je     L438
  movb   $0x5,(%rcx)
  jmp    L438
```

assistant: ```c
int e_mk_info_button(char *str) {
  int i, bg, nd, len = strlen(str);
  if (str[0] == '\n' || str[0] == '\0')
    return (1);
  for (bg = 0; str[bg] && isspace(str[bg]); bg++)
    ;
  for (nd = bg; str[nd] && (str[nd] != ':' || (!isspace(str[nd + 1]) && (str[nd + 1] != '(') && (str[nd + 1] != ':' || (!isspace(str[nd + 2]) && str[nd + 2] != '.')))); nd++)
    ;
  if (!str[nd])
    return (-1);
  if (str[nd + 1] != ':') {
    for (nd++; str[nd] && isspace(str[nd]); nd++)
      ;
    if (str[nd] == '(') {
      for (i = len; i >= bg; i--)
        str[i + 1] = str[i];
      str[bg] = 3;
      str[nd + 1] = 5;
      for (nd++; str[nd] && str[nd] && str[nd] != ')'; nd++)
        ;
      if (str[nd])
        str[nd] = 5;
      return (0);
    }
    for (; str[nd] && (str[nd] != '.' || (isalnum(str[nd + 1]) || (str[nd + 1]) == '_')); nd++)
      ;
    if (!str[nd])
      return (-1);
    for (bg = nd; str[bg] != ':' || !isspace(str[bg + 1]); bg--)
      ;
    for (bg++; isspace(str[bg]); bg++)
      ;
  }
  for (i = len; i >= nd; i--)
    str[i + 2] = str[i];
  str[nd + 1] = 5;
  for (; i >= bg; i--)
    str[i + 1] = str[i];
  str[bg] = 1;
  return (0);
}
```