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

```asm
<getGrams>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    %eax,%ecx
  test   %r14d,%r14d
  je     L186
  mov    %eax,%r8d
  sub    %r12d,%r8d
L152:
  xor    %eax,%eax
  cmp    %r13d,%r8d
  jl     L46
  mov    $0xffffffff,%eax
  cmp    %r12d,%ecx
  jle    L46
  lea    0x4(%r12,%r12,1),%edx
  test   %edx,%edx
  jle    L3
  movslq %edx,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %r8d,0xc(%rsp)
  call   <memset@plt>
  mov    0xc(%rsp),%r8d
L3:
  test   %r14d,%r14d
  je     L24
  movslq %r13d,%rsi
  movslq %r12d,%rdx
  xor    %eax,%eax
  add    %r15,%rsi
  test   %r12d,%r12d
  jle    L87
L121:
  movzbl (%rsi,%rax,1),%ecx
  mov    %cl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L121
L87:
  movb   $0x0,0x0(%rbp,%rdx,1)
  test   %ebx,%ebx
  jg     L36
L138:
  mov    $0x1,%eax
L46:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L186:
  cltd
  idiv   %r12d
  lea    -0x1(%rax),%r8d
  jmp    L152
  nopl   (%rax)
L24:
  mov    %r12d,%ecx
  imul   %r13d,%ecx
  cmp    %r13d,%r8d
  je     L70
  movslq %ecx,%rcx
  movslq %r12d,%rdx
  xor    %eax,%eax
  add    %r15,%rcx
  test   %r12d,%r12d
  jle    L136
  nopl   0x0(%rax)
L42:
  movzbl (%rcx,%rax,1),%esi
  mov    %sil,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L42
L136:
  movb   $0x0,0x0(%rbp,%rdx,1)
L7:
  test   %ebx,%ebx
  jle    L138
  sub    $0x8,%rsp
  xor    %r9d,%r9d
  mov    0x58(%rsp),%eax
  push   %rax
L11:
  mov    %r12d,%edx
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <addGramPosition@plt>
  pop    %rax
  mov    $0x1,%eax
  pop    %rdx
  jmp    L46
  nop
L36:
  sub    $0x8,%rsp
  mov    %r14d,%r9d
  mov    0x58(%rsp),%eax
  push   %rax
  jmp    L11
  xchg   %ax,%ax
L70:
  movslq %ecx,%rdx
  add    %r15,%rdx
  movzbl (%rdx),%ecx
  test   %cl,%cl
  je     L183
  mov    $0x1,%eax
  nopw   0x0(%rax,%rax,1)
L18:
  mov    %cl,-0x1(%rbp,%rax,1)
  movslq %eax,%rsi
  add    $0x1,%rax
  movzbl -0x1(%rdx,%rax,1),%ecx
  test   %cl,%cl
  jne    L18
  add    %rbp,%rsi
L69:
  movb   $0x0,(%rsi)
  jmp    L7
L183:
  mov    %rbp,%rsi
  jmp    L69
```

assistant: ```c
int getGrams(char *word, char *gram, int index, int size, int overlap, int position, int hashbang) {
  int lenWord = strlen(word);
  int lastIndex;
  if (overlap)
    lastIndex = lenWord - size;
  else
    lastIndex = lenWord / size - 1;
  if (index > lastIndex)
    return 0;
  if (lenWord <= size) {
    return -1;
  }
  int start, i;
  for (i = 0; i < size * 2 + 4; i++)
    gram[i] = 0;
  if (overlap) {
    start = index;
    for (i = 0; i < size; i++) {
      gram[i] = word[start + i];
    }
    gram[size] = '\0';
    if (position > 0)
      addGramPosition(word, gram, size, index, position, overlap, hashbang);
  } else {
    start = index * size;
    i = 0;
    if (index == lastIndex) {
      while (word[start + i] != '\0') {
        gram[i] = word[start + i];
        i++;
      }
      gram[i] = '\0';
    } else {
      for (i = 0; i < size; i++)
        gram[i] = word[start + i];
      gram[size] = '\0';
    }
    if (position > 0)
      addGramPosition(word, gram, size, index, position, overlap, hashbang);
  }
  return 1;
}
```