user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<output_element>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  mov    $0x1,%esi
  push   %r12
  mov    %rdx,%r12
  mov    $0x2,%edx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  mov    %rdi,%rcx
  lea    D28(%rip),%rdi
  mov    %ebx,%r14d
  sub    $0x8,%rsp
  call   <fwrite@plt>
  and    $0x8,%r14d
  jne    L162
L42:
  test   $0x20,%bl
  jne    L136
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <fputs@plt>
L188:
  test   %r14d,%r14d
  je     L113
L9:
  mov    $0x1,%esi
  mov    %rbp,%rcx
  mov    $0x4,%edx
  lea    D35(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  and    $0x10,%ebx
  je     L95
L59:
  mov    $0x7b,%edi
  xor    %ebx,%ebx
  call   <fputc@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jle    L133
L205:
  movsbl (%r12,%rbx,1),%edi
  mov    %rbp,%rsi
  cmp    $0x22,%dil
  jne    L218
  mov    $0x22,%edi
L218:
  call   <fputc@plt>
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jg     L205
L133:
  mov    %rbp,%rsi
  mov    $0x7d,%edi
L27:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <fputc@plt>
  nopl   0x0(%rax)
L136:
  mov    %r13,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L188
  sub    $0x1,%eax
  lea    0x1(%r13,%rax,1),%r15
  nopl   0x0(%rax,%rax,1)
L56:
  movsbl 0x0(%r13),%edi
  add    $0x1,%r13
  call   <toupper@plt>
  mov    %rbp,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  cmp    %r15,%r13
  jne    L56
  test   %r14d,%r14d
  jne    L9
L113:
  mov    %rbp,%rsi
  mov    $0x3d,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  and    $0x10,%ebx
  jne    L59
L95:
  mov    $0x22,%edi
  call   <fputc@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jle    L71
  xor    %r14d,%r14d
  lea    D45(%rip),%r15
  jmp    L176
  nopl   0x0(%rax)
L78:
  test   %r14,%r14
  je     L15
  cmpb   $0x5c,-0x1(%r12,%r14,1)
  je     L200
L15:
  test   $0x1,%bl
  jne    L161
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <fwrite@plt>
L28:
  add    $0x1,%ebx
L81:
  add    $0x1,%r14
  cmp    %r14d,%r13d
  jle    L71
L176:
  movsbl (%r12,%r14,1),%edi
  cmp    $0x22,%dil
  je     L78
  mov    %rbp,%rsi
  add    $0x1,%r14
  call   <fputc@plt>
  cmp    %r14d,%r13d
  jg     L176
L71:
  mov    %rbp,%rsi
  mov    $0x22,%edi
  jmp    L27
  nopl   0x0(%rax)
L200:
  mov    %rbp,%rsi
  mov    $0x22,%edi
  call   <fputc@plt>
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L161:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rdi
  call   <fwrite@plt>
  jmp    L28
  nopl   0x0(%rax,%rax,1)
L162:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D7(%rip),%rdi
  call   <fwrite@plt>
  jmp    L42
```

tool_calls: name: parse_data
arguments: tag: D28
data_type: string
name: parse_data
arguments: tag: D35
data_type: string
name: parse_data
arguments: tag: D45
data_type: string
name: parse_data
arguments: tag: D3
data_type: string
name: parse_data
arguments: tag: D7
data_type: string

tool: D28: ,


tool: D35:  = 	

tool: D45: ``

tool: D3: ''

tool: D7:   

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(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, "\"");
}
```