user: Please show me the C implementation that matches the assembly code listed below:

```asm
<getTextByHits>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    $0x100,%edi
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  call   <malloc@plt>
  mov    %rax,0x18(%rsp)
  test   %rbp,%rbp
  je     L169
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,0x10(%rsp)
  xor    %eax,%eax
  call   <getZVMLogLevel@plt>
  test   %eax,%eax
  jg     L112
L101:
  cmp    $0xffff27,%ebx
  ja     L169
  mov    0x18(%rsp),%r15
  cmp    $0x7ffda0,%ebx
  ja     L7
  mov    0x10(%rsp),%r13
  lea    -0x2(%rbx),%eax
  cmp    $0x1,%ebx
  cmova  %rax,%rbx
  sub    $0x1,%r13
  je     L169
  movq   $0x0,0x8(%rsp)
  xor    %r12d,%r12d
  xor    %r14d,%r14d
  movq   $0x0,(%rsp)
  jmp    L149
  nopw   0x0(%rax,%rax,1)
L63:
  add    $0x1,%r14
  cmp    %r14,%r13
  je     L169
L149:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <isNewWord@plt>
  cmp    $0x1,%eax
  jne    L126
  mov    (%rsp),%rax
  mov    %r14,(%rsp)
  add    $0x1,%r12
  mov    %rax,0x8(%rsp)
L126:
  cmp    %r12,%rbx
  jne    L63
  mov    0x8(%rsp),%rax
  mov    $0x100,%ebx
  add    $0x100,%rax
  cmp    0x10(%rsp),%rax
  jb     L84
  mov    0x10(%rsp),%rax
  mov    %rax,%rbx
  sub    0x8(%rsp),%rbx
  cmp    $0xff,%rbx
  ja     L84
  cmp    $0x100,%rax
  jbe    L84
  sub    $0x100,%rax
  mov    $0x100,%ebx
  mov    %rax,0x8(%rsp)
L84:
  mov    0x18(%rsp),%r14
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdx
  add    %rbp,%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  movb   $0x0,(%r14,%rbx,1)
  jmp    L93
  nopw   0x0(%rax,%rax,1)
L169:
  xor    %r15d,%r15d
L93:
  add    $0x28,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L112:
  mov    %ebx,%r8d
  lea    D19(%rip),%rcx
  mov    $0x1,%edx
  lea    D24(%rip),%rsi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  jmp    L101
  nop
L7:
  mov    0x10(%rsp),%rax
  cmp    $0xff,%rax
  jbe    L134
  lea    -0x100(%rbp,%rax,1),%rsi
  mov    $0x100,%edx
  mov    %r15,%rdi
  call   <strncpy@plt>
  jmp    L93
  nopl   0x0(%rax)
L134:
  mov    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  add    $0x1,%rdx
  call   <strncpy@plt>
  jmp    L93
```

tool_calls: name: parse_data
arguments: data_tag: D19
type_guessed: string
name: parse_data
arguments: data_tag: D24
type_guessed: string
name: parse_data
arguments: data_tag: D8
type_guessed: string

tool: D19: start pos

tool: D24: ***ZVMLog

tool: D8: %s [LogLevel=%d] [%s], 	%u 


assistant: ```c
char *getTextByHits(char *text, unsigned int uiStart, unsigned int uiEnd) {
  char *s = (char *)malloc(sizeof(char) * 256);
  size_t i;
  size_t tTextLength = 0;
  size_t tCurrentWordPos = 0;
  size_t tPosCount = 0;
  size_t tLastWordCharPos = 0, tStartCharPos = 0;
  unsigned int NotFoundPos = 16777000;
  unsigned int LastPosInFile = 8388000;
  size_t tSnippetSize = 0;
  int bFind = 0;
  if (text != NULL)
    tTextLength = strlen(text);
  else
    return NULL;
  if (getZVMLogLevel() >= 1) {
    printf("%s [LogLevel=%d] [%s], \t%"
           "u"
           " \n",
           "***ZVMLog", 1, "start pos", uiStart);
  };
  if (uiStart >= NotFoundPos) {
    return NULL;
  }
  if (uiStart > LastPosInFile) {
    if (tTextLength >= 256) {
      strncpy(s, text + (tTextLength - 256), 256);
    } else {
      strncpy(s, text, tTextLength + 1);
    }
    return s;
  }
  if (uiStart > 1)
    uiStart -= 2;
  for (i = 0; i < tTextLength - 1; i++) {
    if (isNewWord(text, i) == 1) {
      tLastWordCharPos = tCurrentWordPos;
      tCurrentWordPos = i;
      tPosCount++;
    }
    if (tPosCount == uiStart) {
      tStartCharPos = tLastWordCharPos;
      bFind = 1;
      break;
    }
  }
  if (bFind == 0)
    return NULL;
  if ((tStartCharPos + 256) < tTextLength)
    tSnippetSize = 256;
  else {
    tSnippetSize = tTextLength - tStartCharPos;
    if (tSnippetSize < 256 && tTextLength > 256) {
      tStartCharPos = tStartCharPos - (256 - tSnippetSize);
      tSnippetSize = 256;
    }
  }
  strncpy(s, text + tStartCharPos, tSnippetSize);
  s[tSnippetSize] = '\0';
  return s;
}
```