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

```asm
<irafgetc>:
  endbr64
  push   %r13
  mov    %esi,%r13d
  mov    $0x1,%esi
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  lea    0x1(%rbx),%edi
  sub    $0x8,%rsp
  call   <calloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L14
  test   %ebx,%ebx
  jle    L81
  movslq %r13d,%rcx
  lea    0x1(%rbp,%rcx,1),%rdx
  sub    %rdx,%rax
  cmp    $0xe,%rax
  jbe    L159
  lea    -0x1(%rbx),%eax
  cmp    $0xe,%eax
  jbe    L159
  mov    %ebx,%edx
  sub    %r12,%rcx
  movdqa D27(%rip),%xmm5
  mov    %r12,%rax
  shr    $0x4,%edx
  pcmpeqd %xmm3,%xmm3
  pxor   %xmm2,%xmm2
  add    %rbp,%rcx
  shl    $0x4,%rdx
  movdqa D7(%rip),%xmm4
  add    %r12,%rdx
  nopl   (%rax)
L55:
  movdqu (%rax,%rcx,1),%xmm0
  movdqu (%rax,%rcx,1),%xmm6
  movdqa %xmm4,%xmm1
  add    $0x10,%rax
  paddb  %xmm3,%xmm0
  psubusb %xmm5,%xmm0
  pcmpeqb %xmm2,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm6,%xmm0
  por    %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L55
  mov    %ebx,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%bl
  je     L81
  lea    0x0(%r13,%rax,1),%edx
  mov    $0x20,%ecx
  mov    %eax,%esi
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x6(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x7(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x8(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0x9(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0xa(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0xb(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0xc(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  mov    %dl,(%r12,%rsi,1)
  lea    0xd(%rax),%edx
  cmp    %edx,%ebx
  jle    L81
  movslq %edx,%rsi
  add    %r13d,%edx
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x1e,%dil
  cmovbe %ecx,%edx
  add    $0xe,%eax
  mov    %dl,(%r12,%rsi,1)
  cmp    %eax,%ebx
  jle    L81
  movslq %eax,%rdx
  add    %r13d,%eax
  cltq
  movzbl 0x0(%rbp,%rax,1),%eax
  lea    -0x1(%rax),%esi
  cmp    $0x1e,%sil
  cmovbe %ecx,%eax
  mov    %al,(%r12,%rdx,1)
L81:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L159:
  sub    %r12,%rcx
  add    %r12,%rbx
  mov    %r12,%rax
  add    %rcx,%rbp
L75:
  movzbl 0x0(%rbp,%rax,1),%edx
  lea    -0x1(%rdx),%ecx
  cmp    $0x1e,%cl
  jbe    L240
L164:
  mov    %dl,(%rax)
  add    $0x1,%rax
  cmp    %rbx,%rax
  je     L81
  movzbl 0x0(%rbp,%rax,1),%edx
  lea    -0x1(%rdx),%ecx
  cmp    $0x1e,%cl
  ja     L164
L240:
  movb   $0x20,(%rax)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L75
  jmp    L81
  nop
L14:
  lea    D25(%rip),%rdi
  call   <ffpmsg@plt>
  jmp    L81
```

tool_calls: name: retrieve_data
arguments: label: D27
type_guessed: byte[16]
name: retrieve_data
arguments: label: D7
type_guessed: byte[16]
name: retrieve_data
arguments: label: D25
type_guessed: string

tool: {"D27": [0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e]}

tool: {"D7": [0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20]}

tool: D25: IRAFGETC Cannot allocate memory for string variable

assistant: ```c
char *irafgetc(char *irafheader, int offset, int nc) {
  char *ctemp, *cheader;
  int i;
  cheader = irafheader;
  ctemp = (char *)calloc(nc + 1, 1);
  if (ctemp == NULL) {
    ffpmsg("IRAFGETC Cannot allocate memory for string variable");
    return (NULL);
  }
  for (i = 0; i < nc; i++) {
    ctemp[i] = cheader[offset + i];
    if (ctemp[i] > 0 && ctemp[i] < 32)
      ctemp[i] = ' ';
  }
  return (ctemp);
}
```