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

```asm
<CmdBox>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x786f6268,-0x50(%rbp)
  movw   $0x0,-0x48(%rbp)
  movq   $0x786f6276,-0x46(%rbp)
  movw   $0x0,-0x3e(%rbp)
  movq   $0x786f626d,-0x3c(%rbp)
  movw   $0x0,-0x34(%rbp)
  movq   $0x786f6266,-0x32(%rbp)
  movw   $0x0,-0x2a(%rbp)
  movabs $0x786f62726170,%rax
  mov    %rax,-0x28(%rbp)
  movw   $0x0,-0x20(%rbp)
  movabs $0x786f62656b616d,%rax
  mov    %rax,-0x1e(%rbp)
  movw   $0x0,-0x16(%rbp)
  movabs $0x786f62656d617266,%rax
  mov    %rax,-0x14(%rbp)
  movw   $0x0,-0xc(%rbp)
  mov    $0x0,%eax
  call   <getTexMode@plt>
  mov    %eax,-0x74(%rbp)
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  lea    -0x50(%rbp),%rcx
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <diagnostics@plt>
  cmpl   $0x1,-0x84(%rbp)
  je     L108
  cmpl   $0x3,-0x84(%rbp)
  jne    L7
L108:
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <changeTexMode@plt>
L7:
  cmpl   $0x5,-0x84(%rbp)
  jne    L65
  mov    $0x0,%eax
  call   <getBracketParam@plt>
  cltq
  mov    %rax,-0x70(%rbp)
  mov    $0x0,%eax
  call   <getBraceParam@plt>
  cltq
  mov    %rax,-0x68(%rbp)
  cmpq   $0x0,-0x70(%rbp)
  je     L76
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L76:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L65:
  cmpl   $0x6,-0x84(%rbp)
  je     L94
  cmpl   $0x7,-0x84(%rbp)
  jne    L109
L94:
  mov    $0x0,%eax
  call   <getBracketParam@plt>
  cltq
  mov    %rax,-0x60(%rbp)
  mov    $0x0,%eax
  call   <getBracketParam@plt>
  cltq
  mov    %rax,-0x58(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  je     L90
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L90:
  cmpq   $0x0,-0x58(%rbp)
  je     L109
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L109:
  lea    D0(%rip),%rax
  mov    %rax,%rsi
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <diagnostics@plt>
  mov    $0x0,%eax
  call   <Convert@plt>
  lea    D39(%rip),%rax
  mov    %rax,%rsi
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <diagnostics@plt>
  cmpl   $0x2,-0x84(%rbp)
  jne    L87
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <CmdEndParagraph@plt>
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <CmdIndent@plt>
  jmp    L30
L87:
  mov    -0x74(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <changeTexMode@plt>
L30:
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  lea    -0x50(%rbp),%rcx
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  mov    %rax,%rdx
  lea    D30(%rip),%rax
  mov    %rax,%rsi
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <diagnostics@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L95
  call   <__stack_chk_fail@plt>
L95:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D7
data_type: string
name: retrieve_data
arguments: data_label: D0
data_type: string
name: retrieve_data
arguments: data_label: D39
data_type: string
name: retrieve_data
arguments: data_label: D30
data_type: string

tool: D7: Entering CmdBox() [%s]

tool: D0: Entering Convert() from CmdBox

tool: D39: Exiting Convert() from CmdBox

tool: D30: Exited CmdBox() [%s]

assistant: ```c
void CmdBox(int code) {
  char BoxName[7][10] = {"hbox", "vbox", "mbox", "fbox", "parbox", "makebox", "framebox"};
  int mode = getTexMode();
  diagnostics(4, "Entering CmdBox() [%s]", BoxName[code - 1]);
  if (code == 1 || code == 3)
    changeTexMode(3);
  if (code == 5) {
    char *position, *width;
    position = getBracketParam();
    width = getBraceParam();
    if (position)
      free(position);
    free(width);
  }
  if (code == 6 || code == 7) {
    char *position, *width;
    position = getBracketParam();
    width = getBracketParam();
    if (position)
      free(position);
    if (width)
      free(width);
  }
  diagnostics(4, "Entering Convert() from CmdBox");
  Convert();
  diagnostics(4, "Exiting Convert() from CmdBox");
  if (code == 2) {
    CmdEndParagraph(0);
    CmdIndent(2);
  } else {
    changeTexMode(mode);
  }
  diagnostics(4, "Exited CmdBox() [%s]", BoxName[code - 1]);
}
```