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

```asm
<make_html_table>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8d,-0x34(%rbp)
  mov    %r9d,-0x38(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  lea    D168(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L13
  lea    D173(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L13:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x10,%edx
  mov    $0x1,%esi
  lea    D121(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x11,%edx
  mov    $0x1,%esi
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x7,%edx
  mov    $0x1,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x18,%edx
  mov    $0x1,%esi
  lea    D170(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    0x10(%rbp),%edx
  lea    D51(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x27,%edx
  mov    $0x1,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  lea    D115(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x39,%edx
  mov    $0x1,%esi
  lea    D177(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0xc,%edx
  mov    $0x1,%esi
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0xc(%rbp)
  jmp    L7
L27:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    0x30(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  lea    D99(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0xc(%rbp)
L7:
  mov    -0xc(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L27
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x15,%edx
  mov    $0x1,%esi
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    0x20(%rbp),%r9
  mov    0x18(%rbp),%r8
  mov    -0x38(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  sub    $0x8,%rsp
  mov    0x28(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <get_data_for_query@plt>
  add    $0x10,%rsp
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x10,%edx
  mov    $0x1,%esi
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D168
datatype: string
name: parse_data
arguments: label: D173
datatype: string
name: parse_data
arguments: label: D121
datatype: string
name: parse_data
arguments: label: D86
datatype: string
name: parse_data
arguments: label: D47
datatype: string
name: parse_data
arguments: label: D170
datatype: string
name: parse_data
arguments: label: D61
datatype: string
name: parse_data
arguments: label: D43
datatype: string
name: parse_data
arguments: label: D51
datatype: string
name: parse_data
arguments: label: D67
datatype: string
name: parse_data
arguments: label: D115
datatype: string
name: parse_data
arguments: label: D177
datatype: string
name: parse_data
arguments: label: D112
datatype: string
name: parse_data
arguments: label: D99
datatype: string
name: parse_data
arguments: label: D79
datatype: string
name: parse_data
arguments: label: D128
datatype: string
name: parse_data
arguments: label: D19
datatype: string
name: parse_data
arguments: label: D144
datatype: string
name: parse_data
arguments: label: D84
datatype: string

tool: D168: w

tool: D173: Error opening file!

tool: D121: <!DOCTYPE html>


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


tool: D47: <head>


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


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


tool: D43: </head>


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


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


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


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


tool: D112: <thead><tr>


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


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


tool: D128: </tbody></table>

tool: D19: </body>


tool: D144: </html>


tool: D84: %s file created.


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);
}
```