user: 下面的汇编指令对应的C源代码是什么:

```asm
<parse_sfo_content>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %esi,0x40(%rsp)
  mov    %rdx,%r15
  mov    %rcx,%r14
  mov    %r8,0x28(%rsp)
  mov    %r9,0x18(%rsp)
  call   <get32le@plt>
  cmp    $0x46535000,%eax
  jne    L47
L192:
  mov    0x8(%rsp),%rbx
  lea    0x20(%rbx),%rdi
  call   <get32le@plt>
  mov    %eax,0x10(%rsp)
  lea    0x30(%rbx),%rdi
  call   <get32le@plt>
  mov    %eax,0x3c(%rsp)
  lea    0x40(%rbx),%rdi
  call   <get32le@plt>
  test   %eax,%eax
  jle    L419
  lea    0x50(%rbx),%r12
  mov    $0x0,%ebp
  movl   $0xffffffff,0x38(%rsp)
  movl   $0xffffffff,0x34(%rsp)
  movl   $0xffffffff,0x30(%rsp)
  movl   $0xffffffff,0x24(%rsp)
  mov    $0xffffffff,%r13d
  mov    %r15,0x48(%rsp)
  mov    0x40(%rsp),%r15d
  mov    %r14,0x40(%rsp)
  mov    %eax,%r14d
  jmp    L487
L47:
  lea    D80(%rip),%rdi
  call   <sys_error@plt>
  jmp    L192
L102:
  lea    D78(%rip),%rdi
  call   <sys_error@plt>
  jmp    L7
L281:
  lea    D93(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L28
  mov    %ebp,%r13d
L226:
  add    $0x1,%ebp
  add    $0x40,%r12
  cmp    %ebp,%r14d
  je     L386
L487:
  mov    %ebp,%eax
  shl    $0x4,%eax
  add    $0x15,%eax
  cmp    %r15d,%eax
  jge    L102
L7:
  mov    %r12,%rdi
  call   <get16le@plt>
  movslq 0x10(%rsp),%rbx
  cltq
  add    %rax,%rbx
  add    0x8(%rsp),%rbx
  lea    D49(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L281
  test   %r13d,%r13d
  cmovs  %ebp,%r13d
  jmp    L226
L28:
  lea    D13(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L439
  mov    %ebp,0x24(%rsp)
  jmp    L226
L439:
  lea    D86(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L362
  mov    %ebp,0x30(%rsp)
  jmp    L226
L362:
  lea    D81(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L236
  mov    %ebp,0x34(%rsp)
  jmp    L226
L236:
  lea    D98(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  mov    0x38(%rsp),%eax
  cmove  %ebp,%eax
  mov    %eax,0x38(%rsp)
  jmp    L226
L386:
  mov    0x48(%rsp),%r15
  mov    0x40(%rsp),%r14
  test   %r13d,%r13d
  js     L469
L376:
  movslq 0x3c(%rsp),%rbx
  mov    %rbx,0x10(%rsp)
  shl    $0x4,%r13d
  movslq %r13d,%r13
  mov    0x8(%rsp),%r12
  lea    0x80(%r12,%r13,4),%rdi
  call   <get32le@plt>
  movslq %eax,%rbp
  add    %rbx,%rbp
  add    %r12,%rbp
  mov    $0xff,%r12d
  mov    $0x0,%ebx
  lea    D10(%rip),%r13
  jmp    L63
L419:
  movl   $0xffffffff,0x38(%rsp)
  movl   $0xffffffff,0x34(%rsp)
  movl   $0xffffffff,0x30(%rsp)
  movl   $0xffffffff,0x24(%rsp)
  mov    $0xffffffff,%r13d
L469:
  lea    D73(%rip),%rdi
  call   <sys_error@plt>
  jmp    L376
L445:
  movsbl %sil,%esi
  mov    %r13,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L374
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x3a,%al
  je     L5
  mov    %al,(%r14)
  lea    0x1(%r14),%r14
L238:
  add    $0x1,%rbx
  cmp    %rbx,%r12
  jbe    L276
L63:
  movzbl 0x0(%rbp,%rbx,1),%esi
  test   %sil,%sil
  je     L276
  lea    -0x20(%rsi),%eax
  cmp    $0x5e,%al
  jbe    L445
L374:
  cmpb   $0xa,0x0(%rbp,%rbx,1)
  jne    L238
  movb   $0x20,(%r14)
  lea    0x1(%r14),%r14
  jmp    L238
L5:
  movb   $0x20,(%r14)
  movb   $0x2d,0x1(%r14)
  sub    $0x1,%r12
  lea    0x2(%r14),%r14
  jmp    L238
L276:
  movb   $0x0,(%r14)
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  js     L287
  mov    0x28(%rsp),%rbx
  test   %rbx,%rbx
  jne    L183
L287:
  mov    0x30(%rsp),%eax
  test   %eax,%eax
  jns    L471
L473:
  movb   $0x0,(%r15)
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  js     L24
  mov    0x18(%rsp),%rbx
  test   %rbx,%rbx
  jne    L227
L24:
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  js     L352
  cmpq   $0x0,0x90(%rsp)
  jne    L88
L352:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L183:
  shl    $0x4,%eax
  cltq
  mov    0x8(%rsp),%r14
  lea    0x80(%r14,%rax,4),%rdi
  call   <get32le@plt>
  cltq
  add    0x10(%rsp),%rax
  add    %r14,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L335
  mov    %rbx,%rcx
L348:
  add    $0x1,%rax
  add    $0x1,%rcx
  mov    %dl,-0x1(%rcx)
  movzbl (%rax),%edx
  test   %dl,%dl
  jne    L348
  mov    %rcx,0x28(%rsp)
L335:
  mov    0x28(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L287
L471:
  shl    $0x4,%eax
  cltq
  mov    0x8(%rsp),%rbx
  lea    0x80(%rbx,%rax,4),%rdi
  call   <get32le@plt>
  cltq
  add    0x10(%rsp),%rax
  add    %rbx,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L473
L359:
  add    $0x1,%rax
  add    $0x1,%r15
  mov    %dl,-0x1(%r15)
  movzbl (%rax),%edx
  test   %dl,%dl
  jne    L359
  jmp    L473
L227:
  shl    $0x4,%eax
  cltq
  mov    0x8(%rsp),%r14
  lea    0x80(%r14,%rax,4),%rdi
  call   <get32le@plt>
  cltq
  add    0x10(%rsp),%rax
  add    %r14,%rax
  cmpb   $0x30,(%rax)
  sete   %dl
  movzbl %dl,%edx
  add    %rdx,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L414
  mov    %rbx,%rcx
L333:
  add    $0x1,%rax
  add    $0x1,%rcx
  mov    %dl,-0x1(%rcx)
  movzbl (%rax),%edx
  test   %dl,%dl
  jne    L333
  mov    %rcx,0x18(%rsp)
L414:
  mov    0x18(%rsp),%rax
  cmpb   $0x30,-0x1(%rax)
  je     L489
  mov    0x18(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L24
L489:
  movb   $0x0,-0x1(%rax)
  jmp    L24
L88:
  shl    $0x4,%eax
  cltq
  mov    0x8(%rsp),%rbx
  lea    0x80(%rbx,%rax,4),%rdi
  call   <get32le@plt>
  cltq
  add    0x10(%rsp),%rax
  add    %rbx,%rax
  cmpb   $0x30,(%rax)
  sete   %dl
  movzbl %dl,%edx
  add    %rdx,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L93
  mov    0x90(%rsp),%rcx
L268:
  add    $0x1,%rax
  add    $0x1,%rcx
  mov    %dl,-0x1(%rcx)
  movzbl (%rax),%edx
  test   %dl,%dl
  jne    L268
  mov    %rcx,0x90(%rsp)
L93:
  mov    0x90(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L352
```

tool_calls: name: retrieve_data
arguments: data_tag: D80
type: string
name: retrieve_data
arguments: data_tag: D78
type: string
name: retrieve_data
arguments: data_tag: D93
type: string
name: retrieve_data
arguments: data_tag: D49
type: string
name: retrieve_data
arguments: data_tag: D13
type: string
name: retrieve_data
arguments: data_tag: D86
type: string
name: retrieve_data
arguments: data_tag: D81
type: string
name: retrieve_data
arguments: data_tag: D98
type: string
name: retrieve_data
arguments: data_tag: D10
type: string
name: retrieve_data
arguments: data_tag: D73
type: string

tool: D80: ERROR: incorrect sfo signature


tool: D78: ERROR: sfo information is too small


tool: D93: STITLE

tool: D49: TITLE

tool: D13: CONTENT_ID

tool: D86: CATEGORY

tool: D81: PSP2_DISP_VER

tool: D98: APP_VER

tool: D10: <>"/\|?*

tool: D73: ERROR: cannot find title from sfo file, pkg is probably corrupted


assistant: ```c
void parse_sfo_content(const uint8_t *sfo, uint32_t sfo_size, char *category, char *title, char *content, char *min_version, char *pkg_version) {
  if (get32le(sfo) != 0x46535000) {
    sys_error("ERROR: incorrect sfo signature\n");
  }
  uint32_t keys = get32le(sfo + 8);
  uint32_t values = get32le(sfo + 12);
  uint32_t count = get32le(sfo + 16);
  int title_index = -1;
  int content_index = -1;
  int category_index = -1;
  int minver_index = -1;
  int pkgver_index = -1;
  for (uint32_t i = 0; i < count; i++) {
    if (i * 16 + 20 + 2 > sfo_size) {
      sys_error("ERROR: sfo information is too small\n");
    }
    char *key = (char *)sfo + keys + get16le(sfo + i * 16 + 20);
    if (strcmp(key, "TITLE") == 0) {
      if (title_index < 0) {
        title_index = (int)i;
      }
    } else if (strcmp(key, "STITLE") == 0) {
      title_index = (int)i;
    } else if (strcmp(key, "CONTENT_ID") == 0) {
      content_index = (int)i;
    } else if (strcmp(key, "CATEGORY") == 0) {
      category_index = (int)i;
    } else if (strcmp(key, "PSP2_DISP_VER") == 0) {
      minver_index = (int)i;
    } else if (strcmp(key, "APP_VER") == 0) {
      pkgver_index = (int)i;
    }
  }
  if (title_index < 0) {
    sys_error("ERROR: cannot find title from sfo file, pkg is probably corrupted\n");
  }
  char *value = (char *)sfo + values + get32le(sfo + title_index * 16 + 20 + 12);
  size_t i;
  size_t max = 255;
  for (i = 0; i < max && *value; i++, value++) {
    if ((*value >= 32 && *value < 127 && strchr("<>\"/\\|?*", *value) == NULL) || (uint8_t)*value >= 128) {
      if (*value == ':') {
        *title++ = ' ';
        *title++ = '-';
        max--;
      } else {
        *title++ = *value;
      }
    } else if (*value == 10) {
      *title++ = ' ';
    }
  }
  *title = 0;
  if (content_index >= 0 && content) {
    value = (char *)sfo + values + get32le(sfo + content_index * 16 + 20 + 12);
    while (*value) {
      *content++ = *value++;
    }
    *content = 0;
  }
  if (category_index >= 0) {
    value = (char *)sfo + values + get32le(sfo + category_index * 16 + 20 + 12);
    while (*value) {
      *category++ = *value++;
    }
  }
  *category = 0;
  if (minver_index >= 0 && min_version) {
    value = (char *)sfo + values + get32le(sfo + minver_index * 16 + 20 + 12);
    if (*value == '0') {
      value++;
    }
    while (*value) {
      *min_version++ = *value++;
    }
    if (min_version[-1] == '0') {
      min_version[-1] = 0;
    } else {
      *min_version = 0;
    }
  }
  if (pkgver_index >= 0 && pkg_version) {
    value = (char *)sfo + values + get32le(sfo + pkgver_index * 16 + 20 + 12);
    if (*value == '0') {
      value++;
    }
    while (*value) {
      *pkg_version++ = *value++;
    }
    *pkg_version = 0;
  }
}
```