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

```asm
<main>:
  endbr64
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movw   $0x6948,0x4(%rsp)
  movb   $0x0,0x6(%rsp)
  movw   $0x48,0x2(%rsp)
  movabs $0x6f77206f6c6c6568,%rax
  mov    %rax,0x22(%rsp)
  movl   $0x646c72,0x2a(%rsp)
  movabs $0x78787878787878,%rax
  mov    %rax,0x7(%rsp)
  mov    %rax,0xf(%rsp)
  movabs $0x3736353433323130,%rax
  mov    %rax,0x17(%rsp)
  movw   $0x3938,0x1f(%rsp)
  movb   $0x0,0x21(%rsp)
  movabs $0x3332316f6c6c6568,%rax
  mov    %rax,0x3a(%rsp)
  movl   $0x6c726f77,0x42(%rsp)
  movw   $0x64,0x46(%rsp)
  movabs $0x6f6c6c6568333231,%rax
  mov    %rax,0x2e(%rsp)
  movl   $0x333231,0x36(%rsp)
  lea    D49(%rip),%rsi
  lea    D187(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  mov    $0x6a,%edx
  mov    $0x68,%esi
  call   <str_replace_all@plt>
  cmp    $0x1,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D278(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  lea    D385(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D382(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  mov    $0x69,%edx
  mov    $0x6a,%esi
  call   <str_replace_all@plt>
  cmp    $0x1,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D461(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D319(%rip),%rsi
  lea    D187(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  mov    $0x6c,%edx
  mov    $0x64,%esi
  call   <str_replace_last@plt>
  cmp    $0x1,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D312(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  lea    D506(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D359(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  mov    $0x6f,%edx
  mov    $0x56,%esi
  call   <str_replace_last@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D564(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D237(%rip),%rsi
  lea    D187(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x17(%rsp),%rdi
  call   <str_all_digits@plt>
  cmp    $0x1,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D354(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x22(%rsp),%rdi
  call   <str_all_digits@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D162(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x2e(%rsp),%rdi
  call   <str_all_digits@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D32(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D266(%rip),%rsi
  lea    D187(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x2e(%rsp),%rsi
  lea    0x22(%rsp),%rdi
  call   <str_equal@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D577(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0xf(%rsp),%rsi
  lea    0x3a(%rsp),%rdi
  call   <str_equal@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D194(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0xf(%rsp),%rsi
  lea    0x7(%rsp),%rdi
  call   <str_equal@plt>
  cmp    $0x1,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D433(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D134(%rip),%rsi
  lea    D187(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    0x2(%rsp),%rdi
  call   <str_equal@plt>
  test   %eax,%eax
  lea    D493(%rip),%rsi
  lea    D628(%rip),%rax
  cmovne %rax,%rsi
  lea    D465(%rip),%rdx
  lea    D360(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  mov    $0x0,%eax
  add    $0x58,%rsp
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D49
type: string
name: extract_symbolic_data
arguments: label: D187
type: string
name: extract_symbolic_data
arguments: label: D493
type: string
name: extract_symbolic_data
arguments: label: D628
type: string
name: extract_symbolic_data
arguments: label: D278
type: string
name: extract_symbolic_data
arguments: label: D360
type: string
name: extract_symbolic_data
arguments: label: D385
type: string
name: extract_symbolic_data
arguments: label: D382
type: string
name: extract_symbolic_data
arguments: label: D461
type: string
name: extract_symbolic_data
arguments: label: D319
type: string
name: extract_symbolic_data
arguments: label: D312
type: string
name: extract_symbolic_data
arguments: label: D506
type: string
name: extract_symbolic_data
arguments: label: D359
type: string
name: extract_symbolic_data
arguments: label: D564
type: string
name: extract_symbolic_data
arguments: label: D237
type: string
name: extract_symbolic_data
arguments: label: D354
type: string
name: extract_symbolic_data
arguments: label: D162
type: string
name: extract_symbolic_data
arguments: label: D32
type: string
name: extract_symbolic_data
arguments: label: D266
type: string
name: extract_symbolic_data
arguments: label: D577
type: string
name: extract_symbolic_data
arguments: label: D194
type: string
name: extract_symbolic_data
arguments: label: D433
type: string
name: extract_symbolic_data
arguments: label: D134
type: string
name: extract_symbolic_data
arguments: label: D465
type: string

tool: D49:   Replace all test case

tool: D187: 
%s


tool: D493:   TEST PASSED

tool: D628: X TEST FAILED

tool: D278: str_replace_all(s, 'h', 'j') == 1

tool: D360: %s...%s


tool: D385: jello world

tool: D382: strcmp(s, "jello world") == 0

tool: D461: str_replace_all(s, 'j', 'i') == 1

tool: D319:   Replace last test case

tool: D312: str_replace_last(s, 'd', 'l') == 1

tool: D506: iello worll

tool: D359: strcmp(s, "iello worll") == 0

tool: D564: str_replace_last(s, 'V', 'o') == 0

tool: D237:   All digits test case

tool: D354: str_all_digits(z) == 1

tool: D162: str_all_digits(s) == 0

tool: D32: str_all_digits(j) == 0

tool: D266:   Equal test case

tool: D577: str_equal(s, j) == 0

tool: D194: str_equal(q, y) == 0

tool: D433: str_equal(x, y) == 1

tool: D134:   Equal test case (q2)

tool: D465: str_equal(same2, same1) == 0

assistant: ```c
int main(void) {
  const char same1[] = "Hi";
  const char same2[] = "H";
  char s[] = "hello world";
  char x[] = "xxxxxxx";
  char y[] = "xxxxxxx";
  char z[] = "0123456789";
  char q[] = "hello123world";
  char j[] = "123hello123";
  printf("\n%s\n", "  Replace all test case");
  printf("%s...%s\n", (str_replace_all(s, 'h', 'j') == 1) ? "  TEST PASSED" : "X TEST FAILED", "str_replace_all(s, 'h', 'j') == 1");
  ;
  printf("%s...%s\n", (strcmp(s, "jello world") == 0) ? "  TEST PASSED" : "X TEST FAILED", "strcmp(s, \"jello world\") == 0");
  ;
  printf("%s...%s\n", (str_replace_all(s, 'j', 'i') == 1) ? "  TEST PASSED" : "X TEST FAILED", "str_replace_all(s, 'j', 'i') == 1");
  ;
  printf("\n%s\n", "  Replace last test case");
  printf("%s...%s\n", (str_replace_last(s, 'd', 'l') == 1) ? "  TEST PASSED" : "X TEST FAILED", "str_replace_last(s, 'd', 'l') == 1");
  ;
  printf("%s...%s\n", (strcmp(s, "iello worll") == 0) ? "  TEST PASSED" : "X TEST FAILED", "strcmp(s, \"iello worll\") == 0");
  ;
  printf("%s...%s\n", (str_replace_last(s, 'V', 'o') == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_replace_last(s, 'V', 'o') == 0");
  ;
  printf("\n%s\n", "  All digits test case");
  printf("%s...%s\n", (str_all_digits(z) == 1) ? "  TEST PASSED" : "X TEST FAILED", "str_all_digits(z) == 1");
  ;
  printf("%s...%s\n", (str_all_digits(s) == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_all_digits(s) == 0");
  ;
  printf("%s...%s\n", (str_all_digits(j) == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_all_digits(j) == 0");
  ;
  printf("\n%s\n", "  Equal test case");
  printf("%s...%s\n", (str_equal(s, j) == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_equal(s, j) == 0");
  ;
  printf("%s...%s\n", (str_equal(q, y) == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_equal(q, y) == 0");
  ;
  printf("%s...%s\n", (str_equal(x, y) == 1) ? "  TEST PASSED" : "X TEST FAILED", "str_equal(x, y) == 1");
  ;
  printf("\n%s\n", "  Equal test case (q2)");
  printf("%s...%s\n", (str_equal(same2, same1) == 0) ? "  TEST PASSED" : "X TEST FAILED", "str_equal(same2, same1) == 0");
  ;
}
```