user: Translate the below assembly code into C programming language:

```asm
<output_element>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x2c(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L57
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L57:
  mov    -0x2c(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  jne    L65
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  jmp    L153
L65:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L116
L12:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <fputc@plt>
  addl   $0x1,-0xc(%rbp)
L116:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L12
L153:
  mov    -0x2c(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L149
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L110
L149:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x3d,%edi
  call   <fputc@plt>
L110:
  mov    -0x2c(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L73
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x7b,%edi
  call   <fputc@plt>
  jmp    L191
L73:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x22,%edi
  call   <fputc@plt>
L191:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L44
L147:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xd(%rbp)
  cmpb   $0x22,-0xd(%rbp)
  je     L129
  movsbl -0xd(%rbp),%eax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  jmp    L202
L129:
  mov    -0x2c(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  jne    L46
  cmpl   $0x0,-0xc(%rbp)
  jle    L20
  mov    -0xc(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L20
L46:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x22,%edi
  call   <fputc@plt>
  jmp    L202
L20:
  mov    -0x8(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L171
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L139
L171:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L139:
  addl   $0x1,-0x8(%rbp)
L202:
  addl   $0x1,-0xc(%rbp)
L44:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L147
  mov    -0x2c(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L80
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x7d,%edi
  call   <fputc@plt>
  jmp    L158
L80:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x22,%edi
  call   <fputc@plt>
L158:
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D49
type_infered: string
name: unpack_data
arguments: data_label: D9
type_infered: string
name: unpack_data
arguments: data_label: D4
type_infered: string
name: unpack_data
arguments: data_label: D8
type_infered: string
name: unpack_data
arguments: data_label: D37
type_infered: string

tool: D49: ,


tool: D9:   

tool: D4:  = 	

tool: D8: ``

tool: D37: ''

assistant: ```c
void output_element(FILE *fp, char *tag, char *data, int format_opts) {
  int i, len, nquotes = 0;
  char ch;
  fprintf(fp, ",\n");
  if (format_opts & (8))
    fprintf(fp, "  ");
  if (!(format_opts & (32)))
    fprintf(fp, "%s", tag);
  else {
    len = strlen(tag);
    for (i = 0; i < len; ++i)
      fprintf(fp, "%c", toupper((unsigned char)tag[i]));
  }
  if (format_opts & (8))
    fprintf(fp, " = \t");
  else
    fprintf(fp, "=");
  if (format_opts & (16))
    fprintf(fp, "{");
  else
    fprintf(fp, "\"");
  len = strlen(data);
  for (i = 0; i < len; ++i) {
    ch = data[i];
    if (ch != '\"')
      fprintf(fp, "%c", ch);
    else {
      if (format_opts & (16) || (i > 0 && data[i - 1] == '\\'))
        fprintf(fp, "\"");
      else {
        if (nquotes % 2 == 0)
          fprintf(fp, "``");
        else
          fprintf(fp, "\'\'");
        nquotes++;
      }
    }
  }
  if (format_opts & (16))
    fprintf(fp, "}");
  else
    fprintf(fp, "\"");
}
```