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

```asm
<writeParagraph>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x450,%rsp
  mov    %rdi,-0x438(%rbp)
  mov    %rsi,-0x440(%rbp)
  mov    %edx,-0x444(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x428(%rbp)
  movl   $0x0,-0x424(%rbp)
  jmp    L56
L273:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  jne    L175
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L175:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3c,%al
  jne    L47
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L47:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3e,%al
  jne    L54
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L54:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L213
  cmpl   $0x0,-0x444(%rbp)
  jne    L213
  addq   $0x1,-0x438(%rbp)
  lea    -0x410(%rbp),%rax
  mov    %rax,-0x420(%rbp)
  jmp    L109
L187:
  mov    -0x438(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x438(%rbp)
  mov    -0x420(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x420(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L109:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L187
  mov    -0x420(%rbp),%rax
  movb   $0x0,(%rax)
  lea    -0x410(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x418(%rbp)
  cmpq   $0x0,-0x418(%rbp)
  je     L55
  mov    -0x418(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x418(%rbp),%rax
  lea    0x1(%rax),%rcx
  lea    -0x42c(%rbp),%rax
  mov    %rax,%rdx
  lea    D41(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L120
  mov    -0x42c(%rbp),%edi
  mov    -0x42c(%rbp),%ecx
  lea    -0x410(%rbp),%rsi
  lea    -0x410(%rbp),%rdx
  mov    -0x440(%rbp),%rax
  mov    %edi,%r9d
  mov    %rsi,%r8
  lea    D37(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  jmp    L260
L213:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  jne    L114
  cmpl   $0x0,-0x428(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x428(%rbp)
  cmpl   $0x0,-0x428(%rbp)
  je     L179
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L179:
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x7,%edx
  mov    $0x1,%esi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L114:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L9
  cmpl   $0x0,-0x444(%rbp)
  jne    L9
  cmpl   $0x0,-0x424(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x424(%rbp)
  cmpl   $0x0,-0x424(%rbp)
  je     L14
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L14:
  mov    -0x440(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x7,%edx
  mov    $0x1,%esi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L260
L9:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L234
  addq   $0x1,-0x438(%rbp)
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x440(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  jmp    L260
L234:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x440(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  jmp    L260
L55:
  nop
  jmp    L260
L120:
  nop
L260:
  addq   $0x1,-0x438(%rbp)
L56:
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L273
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L45
  call   <__stack_chk_fail@plt>
L45:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D82
type: string
name: parse_data
arguments: label: D13
type: string
name: parse_data
arguments: label: D23
type: string
name: parse_data
arguments: label: D41
type: string
name: parse_data
arguments: label: D37
type: string
name: parse_data
arguments: label: D27
type: string
name: parse_data
arguments: label: D2
type: string
name: parse_data
arguments: label: D22
type: string

tool: D82: &amp;

tool: D13: &lt;

tool: D23: &gt;

tool: D41: %d

tool: D37: <a href="%s.%d.html">%s(%d)</a>

tool: D27: <span class="ref">

tool: D2: </span>

tool: D22: <span class="emph">

assistant: ```c
void writeParagraph(const char *scan, FILE *out, int codeMode) {
  int refState = 0;
  int emphState = 0;
  for (; *scan != 0; scan++) {
    if (*scan == '&') {
      fprintf(out, "&amp;");
    } else if (*scan == '<') {
      fprintf(out, "&lt;");
    } else if (*scan == '>') {
      fprintf(out, "&gt;");
    } else if ((*scan == '[') && (!codeMode)) {
      char buffer[1024];
      scan++;
      char *put = buffer;
      while (*scan != ']') {
        *put++ = *scan++;
      };
      *put = 0;
      char *dot = strchr(buffer, '.');
      if (dot == NULL)
        continue;
      *dot = 0;
      int chapter;
      if (sscanf(dot + 1, "%d", &chapter) != 1)
        continue;
      fprintf(out, "<a href=\"%s.%d.html\">%s(%d)</a>", buffer, chapter, buffer, chapter);
    } else if (*scan == '\'') {
      refState = !refState;
      if (refState) {
        fprintf(out, "<span class=\"ref\">");
      } else {
        fprintf(out, "</span>");
      };
    } else if ((*scan == '*') && (!codeMode)) {
      emphState = !emphState;
      if (emphState) {
        fprintf(out, "<span class=\"emph\">");
      } else {
        fprintf(out, "</span>");
      };
    } else if (*scan == '\\') {
      scan++;
      fprintf(out, "%c", *scan);
    } else {
      fprintf(out, "%c", *scan);
    };
  };
}
```