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

```asm
<send_code_param>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x110,%rsp
  mov    %edi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x60(%rsp)
  movq   $0x0,0x68(%rsp)
  movq   $0x0,0x70(%rsp)
  movq   $0x0,0x78(%rsp)
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0xa0(%rsp)
  movq   $0x0,0xa8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movq   $0x0,0xb8(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movq   $0x0,0xf0(%rsp)
  movq   $0x0,0xf8(%rsp)
  cmp    $0x96,%esi
  je     L54
  cmp    $0x101,%esi
  jg     L140
  cmp    $0xc7,%esi
  jle    L107
  sub    $0xc8,%esi
  cmp    $0x39,%esi
  ja     L107
  mov    %esi,%esi
  lea    D74(%rip),%rcx
  movslq (%rcx,%rsi,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
L54:
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D141(%rip),%rsi
  call   <strncpy@plt>
L145:
  mov    %rsp,%r12
  mov    $0xff,%edx
  lea    D60(%rip),%rsi
  mov    %r12,%rdi
  call   <strncat@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    %eax,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  cmp    %eax,%ebx
  jne    L225
L161:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L218
  add    $0x110,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L140:
  cmp    $0x1f4,%esi
  je     L67
  cmp    $0x226,%esi
  jne    L26
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D144(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
L26:
  cmp    $0x14b,%esi
  jne    L107
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D156(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D91(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    %rdx,%rcx
  lea    D165(%rip),%rdx
  mov    $0xff,%esi
  call   <snprintf@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D149(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D151(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D116(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    %rdx,%rcx
  lea    D109(%rip),%rdx
  mov    $0xff,%esi
  call   <snprintf@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D17(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D160(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
  mov    %rsp,%rdi
  mov    %rdx,%rcx
  lea    D138(%rip),%rdx
  mov    $0xff,%esi
  call   <snprintf@plt>
  jmp    L145
L67:
  mov    %rsp,%rdi
  mov    $0xff,%edx
  lea    D12(%rip),%rsi
  call   <strncpy@plt>
  jmp    L145
L107:
  lea    D81(%rip),%rdi
  call   <epicfail@plt>
  jmp    L145
L225:
  lea    D121(%rip),%rdi
  call   <epicfail@plt>
  jmp    L161
L218:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D141
datatype: string
name: unpack_data
arguments: label: D60
datatype: string
name: unpack_data
arguments: label: D144
datatype: string
name: unpack_data
arguments: label: D156
datatype: string
name: unpack_data
arguments: label: D91
datatype: string
name: unpack_data
arguments: label: D165
datatype: string
name: unpack_data
arguments: label: D149
datatype: string
name: unpack_data
arguments: label: D151
datatype: string
name: unpack_data
arguments: label: D116
datatype: string
name: unpack_data
arguments: label: D109
datatype: string
name: unpack_data
arguments: label: D17
datatype: string
name: unpack_data
arguments: label: D160
datatype: string
name: unpack_data
arguments: label: D138
datatype: string
name: unpack_data
arguments: label: D12
datatype: string
name: unpack_data
arguments: label: D81
datatype: string
name: unpack_data
arguments: label: D121
datatype: string

tool: D141: 150 Opening connection

tool: D60: 


tool: D144: 550 Requested action not taken.

tool: D156: 331 User name ok, need password

tool: D91: 200 Okay

tool: D165: 215 %s

tool: D149: 220 Service ready

tool: D151: 221 Goodbye

tool: D116: 226 Transfer complete

tool: D109: 227 Entering Passive Mode (%s).

tool: D17: 230 User logged in

tool: D160: 250 Command successful

tool: D138: 257 "%s"


tool: D12: 500 Syntax error, command unrecognized

tool: D81: Invalid code.

tool: D121: write

assistant: ```c
void send_code_param(int fd, int code, char *p1) {
  char buf[256] = {0};
  if (code == 150)
    strncpy(buf, "150 Opening connection", 256 - 1);
  else if (code == 200)
    strncpy(buf, "200 Okay", 256 - 1);
  else if (code == 215)
    snprintf(buf, 256 - 1, "215 %s", p1);
  else if (code == 220)
    strncpy(buf, "220 Service ready", 256 - 1);
  else if (code == 221)
    strncpy(buf, "221 Goodbye", 256 - 1);
  else if (code == 226)
    strncpy(buf, "226 Transfer complete", 256 - 1);
  else if (code == 227)
    snprintf(buf, 256 - 1, "227 Entering Passive Mode (%s).", p1);
  else if (code == 230)
    strncpy(buf, "230 User logged in", 256 - 1);
  else if (code == 250)
    strncpy(buf, "250 Command successful", 256 - 1);
  else if (code == 257)
    snprintf(buf, 256 - 1, "257 \"%s\"\r\n", p1);
  else if (code == 331)
    strncpy(buf, "331 User name ok, need password", 256 - 1);
  else if (code == 500)
    strncpy(buf, "500 Syntax error, command unrecognized", 256 - 1);
  else if (code == 550)
    strncpy(buf, "550 Requested action not taken.", 256 - 1);
  else
    epicfail("Invalid code.");
  strncat(buf, "\r\n", 256 - 1);
  int len = strlen(buf);
  int bytes_written = write(fd, buf, len);
  if (bytes_written != len)
    epicfail("write");
}
```