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

```asm
<json_field>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %rsi,%rdi
  push   %rbx
  sub    $0x28,%rsp
  mov    %edx,0xc(%rsp)
  call   <strlen@plt>
  test   %rbp,%rbp
  je     L225
  mov    %rbp,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  cmp    %r14,%rax
  jbe    L225
  xor    %ebx,%ebx
  cmpb   $0x0,0x0(%rbp,%r14,1)
  lea    0x0(%rbp,%r14,1),%r9
  jne    L295
  jmp    L225
  nopl   (%rax)
L161:
  lea    (%r14,%rdx,1),%rcx
  lea    0x0(%rbp,%rcx,1),%r15
  movzbl (%r15),%esi
  cmp    $0x22,%al
  je     L11
L214:
  mov    %rdx,%rbx
  cmpb   $0x0,(%r9,%rbx,1)
  je     L225
L295:
  movzbl 0x0(%rbp,%rbx,1),%eax
  lea    0x1(%rbx),%rdx
  cmp    $0x5c,%al
  jne    L161
  cmpb   $0x0,0x1(%rbp,%rbx,1)
  je     L214
L263:
  add    $0x2,%rbx
  cmpb   $0x0,(%r9,%rbx,1)
  jne    L295
  nopw   0x0(%rax,%rax,1)
L225:
  movq   $0x0,0x0(%r13)
L276:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L11:
  lea    0x0(%rbp,%rdx,1),%rdi
  cmpb   $0x3a,(%rdi)
  je     L214
  cmp    $0x22,%sil
  jne    L263
  movb   $0x0,(%r15)
  mov    %r12,%rsi
  mov    %r9,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  call   <strcmp@plt>
  movb   $0x22,(%r15)
  mov    0x10(%rsp),%rcx
  test   %rax,%rax
  mov    0x18(%rsp),%r9
  jne    L263
  cmpb   $0x3a,0x1(%rbp,%rcx,1)
  jne    L263
  cmpb   $0x0,0xc(%rsp)
  jne    L290
  lea    0x2(%rbp,%rcx,1),%rbp
  cmpb   $0x2d,0x0(%rbp)
  sete   %bl
  sete   %dl
  movzbl %bl,%ebx
  movzbl 0x0(%rbp,%rbx,1),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L106
  nopl   (%rax)
L180:
  add    $0x1,%rbx
  movzbl 0x2(%r15,%rbx,1),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L180
L106:
  test   %rbx,%rbx
  je     L225
  cmp    $0x1,%rbx
  jne    L146
  test   %dl,%dl
  jne    L225
L146:
  lea    0x1(%rbx),%edi
  call   <malloc@plt>
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %rax,0x0(%r13)
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbx,1)
  jmp    L276
  nopw   0x0(%rax,%rax,1)
L290:
  cmpb   $0x1,0xc(%rsp)
  je     L148
  cmpb   $0x2,0xc(%rsp)
  jne    L276
  lea    0x2(%rcx),%r12
  xor    %eax,%eax
  xor    %ebx,%ebx
  jmp    L179
  nopl   0x0(%rax)
L38:
  cmp    $0x7d,%dl
  sete   %dl
  movzbl %dl,%edx
  sub    %rdx,%rax
L112:
  add    $0x1,%rbx
  test   %rax,%rax
  je     L86
L179:
  movzbl 0x2(%r15,%rbx,1),%edx
  cmp    $0x7b,%dl
  jne    L38
  add    $0x1,%rax
  jmp    L112
L148:
  cmpb   $0x22,0x2(%rbp,%rcx,1)
  jne    L225
  add    $0x3,%rcx
  lea    0x0(%rbp,%rcx,1),%r12
  movzbl (%r12),%eax
  cmp    $0x22,%al
  je     L261
  xor    %ebx,%ebx
  nopl   (%rax)
L209:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  lea    0x1(%rbx,%rax,1),%rbx
  lea    0x0(%rbp,%rbx,1),%rax
  movzbl (%rax,%rcx,1),%eax
  cmp    $0x22,%al
  jne    L209
  lea    0x1(%rbx),%edi
L313:
  call   <malloc@plt>
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %rax,0x0(%r13)
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbx,1)
  jmp    L276
L86:
  lea    0x1(%rbx),%edi
  call   <malloc@plt>
  lea    0x0(%rbp,%r12,1),%rsi
  mov    %rbx,%rdx
  mov    %rax,0x0(%r13)
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbx,1)
  jmp    L276
L261:
  mov    $0x1,%edi
  xor    %ebx,%ebx
  jmp    L313
```

assistant: ```c
void json_field(char *full_message, const char *field, char type, char **value) {
  size_t i = 0, j = 0, nest_lv = 0, len = strlen(field);
  if (full_message == NULL || strlen(full_message) <= len) {
    *value = NULL;
    return;
  }
  for (i = 0; full_message[len + i] != '\0'; i++)
    if (full_message[i] == '\\' && full_message[i + 1] != '\0')
      i++;
    else if (full_message[i] == '"' && full_message[i + 1] != ':') {
      i++;
      if (full_message[len + i] == '"') {
        full_message[len + i] = '\0';
        if (strcmp(&full_message[i], field) != 0)
          full_message[len + i] = '"';
        else {
          full_message[len + i] = '"';
          if (full_message[len + i + 1] == ':')
            break;
        }
      }
    }
  if (full_message[len + i] == '\0')
    *value = NULL;
  else if (type == 0) {
    j = 0;
    if (full_message[len + i + 2] == '-')
      j++;
    while (1)
      if ((full_message[len + i + 2 + j] >= '0') && (full_message[len + i + 2 + j] <= '9'))
        j++;
      else
        break;
    if (j == 0 || (full_message[len + i + 2] == '-' && j == 1)) {
      *value = NULL;
      return;
    }
    *value = (char *)malloc(sizeof(char) * (j + 1));
    strncpy(*value, &full_message[len + i + 2], j);
    (*value)[j] = '\0';
  } else if (type == 1) {
    if (full_message[len + i + 2] != '"') {
      *value = NULL;
      return;
    }
    for (j = 0; full_message[len + i + j + 3] != '"'; j++)
      if (full_message[len + i + j + 3] == '\\')
        j++;
    *value = (char *)malloc(sizeof(char) * (j + 1));
    strncpy(*value, &full_message[len + i + 3], j);
    (*value)[j] = '\0';
  } else if (type == 2) {
    do {
      if (full_message[len + i + 2 + j] == '{')
        nest_lv++;
      else if (full_message[len + i + 2 + j] == '}')
        nest_lv--;
      j++;
    } while (nest_lv > 0);
    if (j == 0)
      *value = NULL;
    else {
      *value = malloc(sizeof(char) * (j + 1));
      strncpy(*value, &full_message[len + i + 2], j);
      (*value)[j] = '\0';
    }
  }
  return;
}
```