user: 这段汇编代码用C语言表示是什么样的？

```asm
<SARMenuMessageBoxTotalLines>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movl   $0x0,-0x18(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L24
  cmpl   $0x0,-0x2c(%rbp)
  jg     L41
L24:
  mov    -0x18(%rbp),%eax
  jmp    L42
L86:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L182
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L212
L182:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  addl   $0x1,-0x18(%rbp)
  jmp    L41
L141:
  addq   $0x1,-0x10(%rbp)
L212:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L141
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L141
  movq   $0x0,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L10
L163:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  cmpb   $0x0,-0x19(%rbp)
  jne    L228
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L216
L228:
  cmpb   $0x20,-0x19(%rbp)
  je     L36
  cmpb   $0x9,-0x19(%rbp)
  jne    L146
L36:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  addl   $0x1,-0x14(%rbp)
  jmp    L17
L68:
  addq   $0x1,-0x10(%rbp)
L17:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L68
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L68
  jmp    L10
L146:
  cmpb   $0xa,-0x19(%rbp)
  je     L173
  cmpb   $0xd,-0x19(%rbp)
  jne    L242
L173:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L216
L242:
  cmpb   $0x3c,-0x19(%rbp)
  jne    L87
  addq   $0x1,-0x10(%rbp)
  jmp    L130
L229:
  addq   $0x1,-0x10(%rbp)
L130:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L61
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3e,%al
  jne    L229
L61:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L10
  addq   $0x1,-0x10(%rbp)
  jmp    L10
L87:
  addl   $0x1,-0x14(%rbp)
  addq   $0x1,-0x10(%rbp)
L10:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L163
L216:
  cmpq   $0x0,-0x8(%rbp)
  jne    L246
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L246:
  addl   $0x1,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L41:
  cmpq   $0x0,-0x28(%rbp)
  je     L65
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L86
L65:
  mov    -0x18(%rbp),%eax
L42:
  pop    %rbp
  ret
```

assistant: ```c
int SARMenuMessageBoxTotalLines(const char *buf_ptr, int visible_columns) {
  char c;
  int line_count = 0, characters_drawn;
  const char *s, *buf_stop;
  if ((buf_ptr == NULL) || (visible_columns < 1))
    return (line_count);
  while ((buf_ptr != NULL) ? (*buf_ptr != '\0') : 0) {
    s = buf_ptr;
    if ((((*s) == '\n') || ((*s) == '\r'))) {
      buf_ptr = s + 1;
      line_count++;
      continue;
    }
    while ((((*s) == ' ') || ((*s) == '\t')))
      s++;
    buf_stop = NULL;
    for (characters_drawn = 0; characters_drawn < visible_columns;) {
      c = *s;
      if (c == '\0') {
        buf_stop = s;
        break;
      } else if ((((c) == ' ') || ((c) == '\t'))) {
        buf_stop = s;
        characters_drawn++;
        while ((((*s) == ' ') || ((*s) == '\t')))
          s++;
      } else if ((((c) == '\n') || ((c) == '\r'))) {
        buf_stop = s;
        break;
      } else if (((c) == '<')) {
        s++;
        while ((*s != '\0') && !((*s) == '>'))
          s++;
        if (*s != '\0')
          s++;
      } else {
        characters_drawn++;
        s++;
      }
    }
    if (buf_stop == NULL)
      buf_stop = s;
    line_count++;
    buf_ptr = buf_stop;
  }
  return (line_count);
}
```