user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_json_getValueByJS>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x358,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    D179(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D156(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D11(%rip),%rax
  mov    %rax,-0x348(%rbp)
  lea    -0x350(%rbp),%rdx
  mov    -0x348(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convertFileToString@plt>
  test   %rax,%rax
  je     L36
  mov    -0x348(%rbp),%rax
  mov    %rax,%rsi
  lea    D134(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L53
L36:
  mov    -0x350(%rbp),%rbx
  mov    -0x350(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x348(%rbp),%rax
  mov    %rbx,%rcx
  mov    %rax,%rsi
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x340(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x64,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  lea    D44(%rip),%rax
  mov    %rax,-0x340(%rbp)
  lea    D26(%rip),%rax
  mov    %rax,-0x338(%rbp)
  lea    D5(%rip),%rax
  mov    %rax,-0x330(%rbp)
  lea    D104(%rip),%rax
  mov    %rax,-0x328(%rbp)
  lea    D96(%rip),%rax
  mov    %rax,-0x320(%rbp)
  lea    D19(%rip),%rax
  mov    %rax,-0x318(%rbp)
  lea    D103(%rip),%rax
  mov    %rax,-0x310(%rbp)
  lea    D88(%rip),%rax
  mov    %rax,-0x308(%rbp)
  movl   $0x0,-0x354(%rbp)
  jmp    L62
L23:
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x354(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,8),%rbx
  mov    -0x354(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,8),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x354(%rbp),%eax
  add    $0x1,%eax
  mov    %rbx,%rcx
  mov    %eax,%esi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x354(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,8),%rdx
  mov    -0x350(%rbp),%rax
  lea    -0x35c(%rbp),%rdi
  lea    -0x360(%rbp),%rsi
  sub    $0x8,%rsp
  lea    -0x358(%rbp),%rcx
  push   %rcx
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    $0x0,%ecx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <json_getValueByJS@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  je     L40
  mov    -0x354(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,8),%rax
  mov    %rax,%rsi
  lea    D167(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L9
L40:
  mov    -0x358(%rbp),%eax
  mov    %eax,%edi
  call   <json_type_toString@plt>
  mov    %rax,%rsi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x35c(%rbp),%edx
  mov    -0x360(%rbp),%ecx
  mov    -0x350(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <json_util_printSubstring@plt>
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L9:
  addl   $0x1,-0x354(%rbp)
L62:
  mov    -0x354(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,8),%rax
  test   %rax,%rax
  jne    L23
  mov    -0x350(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L53:
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L37
  call   <__stack_chk_fail@plt>
L37:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D179
type_infered: string
name: retrieve_data
arguments: label: D156
type_infered: string
name: retrieve_data
arguments: label: D11
type_infered: string
name: retrieve_data
arguments: label: D134
type_infered: string
name: retrieve_data
arguments: label: D90
type_infered: string
name: retrieve_data
arguments: label: D44
type_infered: string
name: retrieve_data
arguments: label: D26
type_infered: string
name: retrieve_data
arguments: label: D5
type_infered: string
name: retrieve_data
arguments: label: D104
type_infered: string
name: retrieve_data
arguments: label: D96
type_infered: string
name: retrieve_data
arguments: label: D19
type_infered: string
name: retrieve_data
arguments: label: D103
type_infered: string
name: retrieve_data
arguments: label: D88
type_infered: string
name: retrieve_data
arguments: label: D116
type_infered: string
name: retrieve_data
arguments: label: D87
type_infered: string
name: retrieve_data
arguments: label: D167
type_infered: string
name: retrieve_data
arguments: label: D68
type_infered: string
name: retrieve_data
arguments: label: D157
type_infered: string
name: retrieve_data
arguments: label: D45
type_infered: string

tool: D179: Test json_getValueByJS

tool: D156: ================================================================================

tool: D11: sample.json

tool: D134: convert file '%s' to string failure


tool: D90: %s (%lu) = %s


tool: D44: contents

tool: D26: ["contents"][0]

tool: D5: ["contents"][2]

tool: D104: ["contents"][0]["productName"]

tool: 

tool: D19: [0]

tool: D103: orderID

tool: D88: ["contents"][0]["quantity"]

tool: D116: --------------------------------------------------------------------------------

tool: D87: %2d. KEY (%lu) = %s


tool: D167: %s is not found



tool: D68:     VALUE (%s) = 

tool: D157: 


tool: D45: ================================================================================


assistant: ```c
void test_json_getValueByJS() {
  puts("Test json_getValueByJS");
  puts("================================================================================");
  const char *fileName = "sample.json";
  char *string;
  if (convertFileToString(fileName, &string) != 0) {
    printf("convert file '%s' to string failure\n", fileName);
    return;
  }
  printf("%s (%lu) = %s\n", fileName, strlen(string), string);
  char *keys[100] = {"[\"contents\"]", "[\"contents\"][0]", "[\"contents\"][2]", "[\"contents\"][0][\"productName\"]", "[]", "[0]", "[\"orderID\"]", "[\"contents\"][0][\"quantity\"]"};
  int i;
  for (i = 0; keys[i] != NULL; i++) {
    puts("--------------------------------------------------------------------------------");
    printf("%2d. KEY (%lu) = %s\n", i + 1, strlen(keys[i]), keys[i]);
    int valueStartIndex, valueEndIndex, valueJsonType;
    if (json_getValueByJS(string, 0, keys[i], 0, &valueStartIndex, &valueEndIndex, &valueJsonType) != 0) {
      printf("%s is not found\n\n", keys[i]);
      continue;
    }
    printf("    VALUE (%s) = ", json_type_toString(valueJsonType));
    json_util_printSubstring(string, valueStartIndex, valueEndIndex);
    puts("\n");
  }
  free(string);
  puts("================================================================================\n");
}
```