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

```asm
<wrapText>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xad0,%rsp
  mov    %rdi,-0x1ab8(%rbp)
  mov    %rsi,-0x1ac0(%rbp)
  mov    %edx,%eax
  mov    %ax,-0x1ac4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x1ac0(%rbp),%rdx
  lea    -0x1aa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  movswl -0x1ac4(%rbp),%ecx
  lea    -0x1aa0(%rbp),%rax
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <breakUpLongWordsIn@plt>
  lea    -0x1aa0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %ax,-0x1aa2(%rbp)
  movw   $0x1,-0x1aa8(%rbp)
  movw   $0x0,-0x1aac(%rbp)
  jmp    L8
L131:
  movzwl -0x1aac(%rbp),%eax
  add    $0x4,%eax
  mov    %ax,-0x1aac(%rbp)
L8:
  movswl -0x1aac(%rbp),%eax
  cltq
  movzbl -0x1aa0(%rbp,%rax,1),%eax
  cmp    $0x19,%al
  je     L131
  movzwl -0x1ac4(%rbp),%eax
  mov    %ax,-0x1aa6(%rbp)
  jmp    L1
L47:
  movw   $0x0,-0x1aa4(%rbp)
  movzwl -0x1aac(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x1aaa(%rbp)
  jmp    L36
L0:
  movswl -0x1aaa(%rbp),%eax
  cltq
  movzbl -0x1aa0(%rbp,%rax,1),%eax
  cmp    $0x19,%al
  jne    L54
  movzwl -0x1aaa(%rbp),%eax
  add    $0x4,%eax
  mov    %ax,-0x1aaa(%rbp)
  jmp    L36
L54:
  movzwl -0x1aaa(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x1aaa(%rbp)
  movzwl -0x1aa4(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x1aa4(%rbp)
L36:
  movzwl -0x1aaa(%rbp),%eax
  cmp    -0x1aa2(%rbp),%ax
  jge    L104
  movswl -0x1aaa(%rbp),%eax
  cltq
  movzbl -0x1aa0(%rbp,%rax,1),%eax
  cmp    $0x20,%al
  je     L104
  movswl -0x1aaa(%rbp),%eax
  cltq
  movzbl -0x1aa0(%rbp,%rax,1),%eax
  cmp    $0xa,%al
  jne    L0
L104:
  movzwl -0x1aa4(%rbp),%eax
  cmp    -0x1aa6(%rbp),%ax
  jge    L129
  movswl -0x1aac(%rbp),%eax
  cltq
  movzbl -0x1aa0(%rbp,%rax,1),%eax
  cmp    $0xa,%al
  jne    L46
L129:
  movswl -0x1aac(%rbp),%eax
  cltq
  movb   $0xa,-0x1aa0(%rbp,%rax,1)
  movzwl -0x1aa8(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x1aa8(%rbp)
  movzwl -0x1ac4(%rbp),%eax
  movzwl -0x1aa4(%rbp),%edx
  sub    %edx,%eax
  mov    %ax,-0x1aa6(%rbp)
  jmp    L74
L46:
  movzwl -0x1aa6(%rbp),%eax
  movzwl -0x1aa4(%rbp),%edx
  sub    %edx,%eax
  sub    $0x1,%eax
  mov    %ax,-0x1aa6(%rbp)
L74:
  movzwl -0x1aaa(%rbp),%eax
  mov    %ax,-0x1aac(%rbp)
L1:
  movzwl -0x1aac(%rbp),%eax
  cmp    -0x1aa2(%rbp),%ax
  jl     L47
  cmpq   $0x0,-0x1ab8(%rbp)
  je     L142
  lea    -0x1aa0(%rbp),%rdx
  mov    -0x1ab8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L142:
  movzwl -0x1aa8(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L105
  call   <__stack_chk_fail@plt>
L105:
  leave
  ret
```

assistant: ```c
short wrapText(char *to, const char *sourceText, short width) {
  short i, w, textLength, lineCount;
  char printString[100 * (31 + 3) * 2];
  short spaceLeftOnLine, wordWidth;
  strcpy(printString, sourceText);
  breakUpLongWordsIn(printString, width, 1);
  textLength = strlen(printString);
  lineCount = 1;
  for (i = 0; printString[i] == 25; i += 4)
    ;
  spaceLeftOnLine = width;
  while (i < textLength) {
    wordWidth = 0;
    for (w = i + 1; w < textLength && printString[w] != ' ' && printString[w] != '\n';) {
      if (printString[w] == 25) {
        w += 4;
      } else {
        w++;
        wordWidth++;
      }
    }
    if (1 + wordWidth > spaceLeftOnLine || printString[i] == '\n') {
      printString[i] = '\n';
      lineCount++;
      spaceLeftOnLine = width - wordWidth;
    } else {
      spaceLeftOnLine -= 1 + wordWidth;
    }
    i = w;
  }
  if (to) {
    strcpy(to, printString);
  }
  return lineCount;
}
```