user: 请将以下的汇编代码转换成C语言代码:

```asm
<replace_asterisk_with_all_fields>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x498,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x488(%rsp)
  xor    %eax,%eax
  mov    $0x1,%edx
  mov    %rdi,%rsi
  lea    D86(%rip),%rdi
  call   <instr@plt>
  test   %eax,%eax
  js     L105
L29:
  mov    0x488(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x498,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L105:
  mov    $0x1,%edx
  mov    %rbx,%rsi
  lea    D84(%rip),%rdi
  call   <instr@plt>
  test   %eax,%eax
  jns    L29
  mov    $0x1,%edx
  mov    %rbx,%rsi
  lea    D37(%rip),%rdi
  call   <instr@plt>
  test   %eax,%eax
  jns    L29
  mov    $0x1,%edx
  mov    %rbx,%rsi
  lea    D86(%rip),%rdi
  call   <instr@plt>
  test   %eax,%eax
  jns    L29
  mov    $0x1,%edx
  mov    %rbx,%rsi
  lea    D68(%rip),%rdi
  call   <instr@plt>
  cmp    $0xffffffff,%eax
  je     L29
  mov    %r12,%rdi
  call   <low_string@plt>
  mov    %rax,%rcx
  mov    %rsp,%r12
  mov    %rbp,%rdx
  lea    D14(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    D34(%rip),%rsi
  mov    %r12,%rdi
  call   <popen@plt>
  mov    %rax,%r12
  mov    $0x1,%ebp
  lea    D69(%rip),%r13
  jmp    L86
L46:
  lea    0x80(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rsp,%rdx
  cltq
  lea    0x0(%rbp,%rax,1),%rdi
  mov    %r13,%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L6:
  mov    $0x0,%ebp
L86:
  mov    %rsp,%rdi
  mov    %r12,%rdx
  mov    $0x7f,%esi
  call   <fgets@plt>
  test   %rax,%rax
  je     L8
  mov    %rsp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,(%rsp,%rax,1)
  test   %ebp,%ebp
  je     L46
  mov    %rsp,%rsi
  lea    0x80(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L6
L8:
  mov    %r12,%rdi
  call   <pclose@plt>
  lea    0x80(%rsp),%rsi
  mov    %rbx,%rdx
  lea    D68(%rip),%rdi
  call   <search_replace@plt>
  jmp    L29
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D86
type_guessed: string
name: parse_data
arguments: data_tag: D84
type_guessed: string
name: parse_data
arguments: data_tag: D37
type_guessed: string
name: parse_data
arguments: data_tag: D68
type_guessed: string
name: parse_data
arguments: data_tag: D14
type_guessed: string
name: parse_data
arguments: data_tag: D34
type_guessed: string
name: parse_data
arguments: data_tag: D69
type_guessed: string

tool: D86: (*)

tool: D84: ( * )

tool: D37: (* )

tool: D68: *

tool: D14: column4table.sh %s %s | piece.e '|' 0

tool: D34: r

tool: D69: ||'|'||%s

assistant: ```c
void replace_asterisk_with_all_fields(char *sql_stmt, char *from_table, char *schema) {
  FILE *p;
  char buffer[128];
  char all_fields[1024];
  int first_time = 1;
  if (instr("(*)", sql_stmt, 1) >= 0)
    return;
  if (instr("( * )", sql_stmt, 1) >= 0)
    return;
  if (instr("(* )", sql_stmt, 1) >= 0)
    return;
  if (instr("(*)", sql_stmt, 1) >= 0)
    return;
  if (instr("*", sql_stmt, 1) == -1)
    return;
  sprintf(buffer, "column4table.sh %s %s | piece.e '|' 0", schema, low_string(from_table));
  p = popen(buffer, "r");
  while (fgets(buffer, 127, p)) {
    buffer[strlen(buffer) - 1] = '\0';
    if (first_time) {
      strcpy(all_fields, buffer);
      first_time = 0;
    } else {
      sprintf(all_fields + strlen(all_fields), "||'|'||%s", buffer);
    }
  }
  pclose(p);
  search_replace("*", all_fields, sql_stmt);
}
```