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

```asm
<make_html_table>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x78(%rsp),%rax
  mov    0x70(%rsp),%r13d
  mov    %rsi,0x10(%rsp)
  lea    D120(%rip),%rsi
  mov    %rdi,0x8(%rsp)
  mov    0x90(%rsp),%rbx
  mov    %rax,0x18(%rsp)
  mov    0x80(%rsp),%rax
  mov    %r9d,0x28(%rsp)
  mov    %rax,0x20(%rsp)
  mov    0x88(%rsp),%eax
  mov    %eax,0x2c(%rsp)
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L7
L24:
  mov    %rbp,%rcx
  mov    $0x10,%edx
  mov    $0x1,%esi
  lea    D153(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x11,%edx
  mov    $0x1,%esi
  lea    D47(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x7,%edx
  mov    $0x1,%esi
  lea    D65(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x18,%edx
  mov    $0x1,%esi
  lea    D152(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D31(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D39(%rip),%rdi
  call   <fwrite@plt>
  mov    %r13d,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D32(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x27,%edx
  mov    $0x1,%esi
  lea    D81(%rip),%rdi
  call   <fwrite@plt>
  mov    %r15,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D68(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x39,%edx
  mov    $0x1,%esi
  lea    D158(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xc,%edx
  mov    $0x1,%esi
  lea    D178(%rip),%rdi
  call   <fwrite@plt>
  test   %r12d,%r12d
  jle    L9
  lea    -0x1(%r12),%eax
  lea    D182(%rip),%r12
  lea    0x8(%r14,%rax,8),%r13
L34:
  mov    (%r14),%rcx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x8,%r14
  call   <fprintf@plt>
  cmp    %r13,%r14
  jne    L34
L9:
  mov    %rbp,%rcx
  mov    $0x15,%edx
  mov    $0x1,%esi
  lea    D179(%rip),%rdi
  call   <fwrite@plt>
  sub    $0x8,%rsp
  mov    %r15,%rdx
  mov    %rbp,%rdi
  mov    0x34(%rsp),%eax
  push   %rax
  mov    0x30(%rsp),%r9
  mov    0x28(%rsp),%r8
  mov    0x38(%rsp),%ecx
  mov    0x20(%rsp),%rsi
  call   <get_data_for_query@plt>
  mov    %rbp,%rcx
  mov    $0x10,%edx
  mov    $0x1,%esi
  lea    D106(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D175(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x1,%esi
  mov    $0x8,%edx
  lea    D111(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x18(%rsp),%rsi
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  lea    D95(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <printf@plt>
L7:
  lea    D25(%rip),%rdi
  call   <puts@plt>
  jmp    L24
```

tool_calls: name: unpack_data
arguments: data_tag: D120
type: string
name: unpack_data
arguments: data_tag: D153
type: string
name: unpack_data
arguments: data_tag: D47
type: string
name: unpack_data
arguments: data_tag: D65
type: string
name: unpack_data
arguments: data_tag: D152
type: string
name: unpack_data
arguments: data_tag: D31
type: string
name: unpack_data
arguments: data_tag: D39
type: string
name: unpack_data
arguments: data_tag: D32
type: string
name: unpack_data
arguments: data_tag: D81
type: string
name: unpack_data
arguments: data_tag: D68
type: string
name: unpack_data
arguments: data_tag: D158
type: string
name: unpack_data
arguments: data_tag: D178
type: string
name: unpack_data
arguments: data_tag: D182
type: string
name: unpack_data
arguments: data_tag: D179
type: string
name: unpack_data
arguments: data_tag: D106
type: string
name: unpack_data
arguments: data_tag: D175
type: string
name: unpack_data
arguments: data_tag: D111
type: string
name: unpack_data
arguments: data_tag: D95
type: string
name: unpack_data
arguments: data_tag: D25
type: string

tool: D120: w

tool: D153: <!DOCTYPE html>


tool: D47: <html lang="en">


tool: D65: <head>


tool: D152: <meta charset="UTF-8"/>


tool: D31: <title>Table Test</title>


tool: D39: </head>


tool: D32: <body style="font-size:%ipx">


tool: D81: <h1 align="center">Database Query</h1>


tool: D68: <h4 align="center">%s</h4>


tool: D158: <table align="center" style="border-collapse:collapse;">


tool: D178: <thead><tr>


tool: D182: <th scope="col" bgcolor="%s" style="border:1px solid #000000">&nbsp%s&nbsp</th>


tool: D179: </tr></thead><tbody>


tool: D106: </tbody></table>

tool: D175: </body>


tool: D111: </html>


tool: D95: %s file created.


tool: D25: Error opening file!

assistant: ```c
void make_html_table(char *html_file_name, char *database_name, char *sql, char *field_names[], int fields, int precision, int font_size, char *bg_color1, char *bg_color2, int alternate, char *field_bg_color, bool fields_found) {
  int i = 0;
  FILE *f = fopen(html_file_name, "w");
  if (f == NULL) {
    printf("Error opening file!\n");
  }
  fprintf(f, "<!DOCTYPE html>\n");
  fprintf(f, "<html lang=\"en\">\n");
  fprintf(f, "<head>\n");
  fprintf(f, "<meta charset=\"UTF-8\"/>\n");
  fprintf(f, "<title>Table Test</title>\n");
  fprintf(f, "</head>\n");
  fprintf(f, "<body style=\"font-size:%ipx\">\n", font_size);
  fprintf(f, "<h1 align=\"center\">Database Query</h1>\n");
  fprintf(f, "<h4 align=\"center\">%s</h4>\n", sql);
  fprintf(f, "<table align=\"center\" style=\"border-collapse:collapse;\">\n");
  fprintf(f, "<thead><tr>\n");
  for (i = 0; i < fields; i++) {
    fprintf(f, "<th scope=\"col\" bgcolor=\"%s\" style=\"border:1px solid #000000\">&nbsp%s&nbsp</th>\n", field_bg_color, field_names[i]);
  }
  fprintf(f, "</tr></thead><tbody>\n");
  get_data_for_query(f, database_name, sql, precision, bg_color1, bg_color2, alternate);
  fprintf(f, "</tbody></table>");
  fprintf(f, "</body>\n");
  fprintf(f, "</html>\n");
  fclose(f);
  printf("%s file created.\n", html_file_name);
}
```