user: 请将以下的汇编代码转换成C语言代码：

```asm
<CG_FitTextToWidth2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x460,%rsp
  mov    %rdi,-0x448(%rbp)
  movss  %xmm0,-0x44c(%rbp)
  movss  %xmm1,-0x450(%rbp)
  mov    %esi,-0x454(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x418(%rbp)
  movl   $0x0,-0x434(%rbp)
  mov    -0x448(%rbp),%rcx
  lea    -0x410(%rbp),%rax
  mov    $0x400,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <Q_strncpyz@plt>
  mov    -0x454(%rbp),%edx
  mov    -0x448(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x448(%rbp),%rax
  mov    %rax,-0x430(%rbp)
  mov    -0x430(%rbp),%rax
  mov    %rax,-0x420(%rbp)
  lea    -0x410(%rbp),%rax
  mov    %rax,-0x428(%rbp)
  jmp    L75
L12:
  mov    -0x428(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x428(%rbp)
  movzbl (%rax),%edx
  mov    -0x420(%rbp),%rax
  mov    %dl,(%rax)
  addl   $0x1,-0x434(%rbp)
  mov    -0x420(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L35
  mov    -0x420(%rbp),%rax
  mov    %rax,-0x418(%rbp)
L35:
  addq   $0x1,-0x420(%rbp)
  mov    -0x428(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L9
  mov    -0x420(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x430(%rbp)
  movl   $0x0,-0x434(%rbp)
  jmp    L75
L9:
  mov    -0x44c(%rbp),%edx
  mov    -0x430(%rbp),%rax
  mov    $0x0,%esi
  movd   %edx,%xmm0
  mov    %rax,%rdi
  call   <CG_Text_Width@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm2
  comiss -0x450(%rbp),%xmm2
  ja     L33
  jmp    L75
L33:
  cmpq   $0x0,-0x418(%rbp)
  je     L94
  mov    -0x418(%rbp),%rax
  movb   $0xa,(%rax)
  mov    -0x418(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x430(%rbp)
  jmp    L61
L94:
  mov    -0x420(%rbp),%rax
  movzbl -0x1(%rax),%edx
  mov    -0x420(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x420(%rbp),%rax
  sub    $0x1,%rax
  movb   $0xa,(%rax)
  mov    -0x420(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x420(%rbp)
  mov    %rax,-0x430(%rbp)
L61:
  movq   $0x0,-0x418(%rbp)
  movl   $0x0,-0x434(%rbp)
L75:
  mov    -0x428(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L12
  lea    -0x410(%rbp),%rax
  cmp    %rax,-0x420(%rbp)
  je     L52
  mov    -0x420(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L52
  mov    -0x420(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x420(%rbp)
  movb   $0xa,(%rax)
L52:
  mov    -0x420(%rbp),%rax
  movb   $0x0,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L91
  call   <__stack_chk_fail@plt>
L91:
  leave
  ret
```

assistant: ```c
void CG_FitTextToWidth2(char *instr, float scale, float w, int size) {
  char buffer[1024];
  char *s, *p, *c, *ls = ((void *)0);
  int l = 0;
  Q_strncpyz(buffer, instr, 1024);
  memset(instr, 0, size);
  c = s = instr;
  p = buffer;
  while (*p) {
    *c = *p++;
    l++;
    if (*c == ' ') {
      ls = c;
    }
    c++;
    if (*p == '\n') {
      s = c + 1;
      l = 0;
    } else if (CG_Text_Width(s, scale, 0) > w) {
      if (ls) {
        *ls = '\n';
        s = ls + 1;
      } else {
        *c = *(c - 1);
        *(c - 1) = '\n';
        s = c++;
      }
      ls = ((void *)0);
      l = 0;
    }
  }
  if (c != buffer && (*(c - 1) != '\n')) {
    *c++ = '\n';
  }
  *c = '\0';
}
```