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

```asm
<get_string_pair>:
  endbr64
  push   %r15
  lea    D9(%rip),%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x138,%rsp
  mov    %rsi,0x8(%rsp)
  lea    0x20(%rsp),%rbp
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  nopl   0x0(%rax)
L123:
  mov    %r12,%rdx
  mov    $0x100,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L41
  addl   $0x1,(%rbx)
  mov    $0x5,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strnicmp@plt>
  test   %eax,%eax
  jne    L42
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <read_until_blank_line@plt>
  mov    0x8(%rsp),%rcx
  mov    %rax,(%rcx)
  jmp    L123
  nopl   (%rax)
L42:
  mov    $0xc,%edx
  lea    D37(%rip),%rsi
  mov    %rbp,%rdi
  call   <strnicmp@plt>
  test   %eax,%eax
  jne    L141
  mov    %r12,%rdi
  mov    %rbx,%rsi
  call   <read_until_blank_line@plt>
  mov    0x10(%rsp),%rcx
  mov    %rax,(%rcx)
  mov    0x8(%rsp),%rcx
  mov    (%rcx),%rdi
  test   %rdi,%rdi
  je     L123
  test   %rax,%rax
  je     L167
L142:
  mov    0x18(%rsp),%rax
  mov    $0x1,%r12d
  mov    (%rax),%edx
  test   %edx,%edx
  je     L199
  mov    (%rbx),%ecx
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <do_options@plt>
  jmp    L199
  nopl   0x0(%rax)
L141:
  mov    $0x9,%edx
  lea    D31(%rip),%rsi
  mov    %rbp,%rdi
  call   <strnicmp@plt>
  test   %eax,%eax
  jne    L123
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <read_until_blank_line@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L123
  xor    %r13d,%r13d
  jmp    L177
L125:
  add    $0x1,%r13
L177:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    %eax,%r13d
  jge    L4
  movsbl (%r14,%r13,1),%edi
  call   <isupper@plt>
  test   %rax,%rax
  je     L125
  movsbl (%r14,%r13,1),%edi
  call   <_tolower@plt>
  mov    %al,(%r14,%r13,1)
  jmp    L125
L41:
  xor    %r12d,%r12d
L199:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L144
  add    $0x138,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L4:
  lea    D38(%rip),%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L20
  mov    0x18(%rsp),%rax
  orl    $0x1,(%rax)
L20:
  lea    D18(%rip),%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L193
  mov    0x18(%rsp),%rax
  orl    $0x2,(%rax)
L193:
  lea    D6(%rip),%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L98
  mov    0x18(%rsp),%rax
  orl    $0x4,(%rax)
L98:
  lea    D65(%rip),%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L152
  mov    0x18(%rsp),%rax
  orl    $0x8,(%rax)
L152:
  mov    %r14,%rdi
  call   <free@plt>
  jmp    L123
L167:
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    0x10(%rsp),%rax
  mov    %rdi,(%rax)
  test   %rdi,%rdi
  je     L41
  mov    0x8(%rsp),%rax
  mov    (%rax),%rsi
  call   <strcpy@plt>
  jmp    L142
L144:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D9
data_type: string
name: retrieve_data
arguments: label: D37
data_type: string
name: retrieve_data
arguments: label: D31
data_type: string
name: retrieve_data
arguments: label: D38
data_type: string
name: retrieve_data
arguments: label: D18
data_type: string
name: retrieve_data
arguments: label: D6
data_type: string
name: retrieve_data
arguments: label: D65
data_type: string

tool: D9: :KEY:

tool: D37: :TRANSLATED:

tool: D31: :OPTIONS:

tool: D38: elbonian

tool: D18: stars

tool: D6: linenum

tool: D65: xtdelbon

assistant: ```c
int get_string_pair(FILE *fp, char **english, char **xlation, int *xlat_options, int *line_num) {
  char buffer[256];
  while (fgets(buffer, 256, fp)) {
    ++*line_num;
    if (!strnicmp(buffer, ":KEY:", 5)) {
      *english = read_until_blank_line(fp, line_num);
    } else if (!strnicmp(buffer, ":TRANSLATED:", 12)) {
      *xlation = read_until_blank_line(fp, line_num);
      if (*english) {
        if (!*xlation) {
          if (!(*xlation = malloc(strlen(*english) + 1)))
            return 0;
          strcpy(*xlation, *english);
        }
        if (*xlat_options) {
          do_options(english, xlation, *xlat_options, *line_num);
        }
        return 1;
      }
    } else if (!strnicmp(buffer, ":OPTIONS:", 9)) {
      char *optstr = read_until_blank_line(fp, line_num);
      if (optstr) {
        int i;
        for (i = 0; i < (int)strlen(optstr); i++) {
          if (isupper(optstr[i]))
            optstr[i] = _tolower(optstr[i]);
        }
        if (strstr(optstr, "elbonian"))
          *xlat_options |= 1;
        if (strstr(optstr, "stars"))
          *xlat_options |= 2;
        if (strstr(optstr, "linenum"))
          *xlat_options |= 4;
        if (strstr(optstr, "xtdelbon"))
          *xlat_options |= 8;
        free(optstr);
      }
    }
  }
  return 0;
}
```