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

```asm
<exec_shell>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0xa0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  lea    D36(%rip),%rax
  mov    %rax,-0xa0(%rbp)
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rbx,%rax
  add    $0x1,%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x98(%rbp)
  mov    %rax,%rdx
  mov    %rdx,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  mov    %rax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  mov    %rax,%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L47:
  cmp    %rdx,%rsp
  je     L7
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L47
L7:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L29
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L29:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x90(%rbp)
  mov    -0xa8(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xa0(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x90(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <popen@plt>
  mov    %rax,-0x88(%rbp)
  cmpq   $0x0,-0x88(%rbp)
  jne    L26
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <print_debug@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L26
L12:
  lea    -0x80(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L26:
  mov    -0x88(%rbp),%rdx
  lea    -0x80(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L12
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <pclose@plt>
  mov    %r12,%rsp
  nop
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L43
  call   <__stack_chk_fail@plt>
L43:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D36
datatype: string
name: extract_symbolic_data
arguments: data_tag: D27
datatype: string
name: extract_symbolic_data
arguments: data_tag: D22
datatype: string
name: extract_symbolic_data
arguments: data_tag: D2
datatype: string

tool: D36:  2>&1

tool: D27: r

tool: D22: exec_shell: process pipe creation failed!

tool: D2: %s

assistant: ```c
void exec_shell(char *command) {
  FILE *shell_pipe;
  char output_buffer[81];
  char *postfix = " 2>&1";
  char total_command[strlen(command) + strlen(postfix) + 1];
  strcpy(total_command, command);
  strcat(total_command, postfix);
  shell_pipe = popen(total_command, "r");
  if (shell_pipe == NULL) {
    print_debug("exec_shell: process pipe creation failed!");
    exit(1);
  }
  while (fgets(output_buffer, 80, shell_pipe) != NULL) {
    printf("%s", output_buffer);
  }
  pclose(shell_pipe);
}
```